Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST - Create single-test-enviroment #3851

Closed
fsmeier opened this issue Jun 26, 2013 · 12 comments · Fixed by #3857
Closed

TEST - Create single-test-enviroment #3851

fsmeier opened this issue Jun 26, 2013 · 12 comments · Fixed by #3857

Comments

@fsmeier
Copy link
Contributor

fsmeier commented Jun 26, 2013

At the moment you can test ALL with the autotest - files.

but what if you just want to test your current test and you need the autoloader and the test enviroment? If you want to test your tests before upload...

Maybe with this feature it's simplier to test new commits. And if it's simple you can say "new commits only with tests" ...

@DeepDiver1975 the autotest-file is from you... can you create a second one for single tests with parameters which funtion to test?

@butonic @LukasReschke @icewind1991 @karlitschek

greetz

@DeepDiver1975
Copy link
Member

@IMM0rtalis the easiest solution is most probably to pass the args from autotest.sh on to the phpunit call.
(In case the first parameter is the database this one has to be stripped)

Feel free to give that a try. THX

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

but then i don't have the test enviroment... like autoconfig, test-db etc ?

i started this thread because butonic and I had similiar problems :-/

@DeepDiver1975
Copy link
Member

but then i don't have the test enviroment

  1. clone the repo
  2. ./autotest.sh sqlite

There is nothing more you need

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

here the situation:

  • i have a testfile lib/goodTests.php
  • now i want to test just that single file...

with your solution i just can test all tests with sqlite as example.. but not just the tests in goodTests.php with any db-system

@DeepDiver1975
Copy link
Member

as I said above pass additional parameters from autotest.sh on to the phpunit call.

./autotest.sh sqlite GoodTest lib/goodTests.php

The parameters GoodTest and lib/goodTests.php will be passed on to phpunit call:

phpunit <..> GoodTest lib/goodTests.php

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

I used

C:\Users\fscholz\localhost\owncloud_pullrequest\core>autotest sqlite Test_TemplateLayoutFunctions "tests/lib/templatelayout.php"

but this command executes all tests again :-/

@DeepDiver1975
Copy link
Member

Just in case you missunderstood me:
The passing on of arguments within autotest.sh is not yet implemented.
Feel free to implement this feature. ;-)

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

ahh... yeah... i though you meant I was just too stupid to call it.. but it isn't coded yet :D

@DeepDiver1975
Copy link
Member

i though you meant I was just too stupid to call it

hehe - I'd talk different in such a case ;-)

Can you implement that on both scripts autotest.cmd as well as autotest.sh?

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

well.. to be honest... the priority in the company i am working for is atm at something different... and tomorrow i am in spain for two weeks :D so i have time in the middle of july :-/ i opened this ticket because i though you can fix this fast... maybe i must do this in my spharetime in july...

@DeepDiver1975
Copy link
Member

well - to be honest ... ;-)

I don't need that feature and there is plenty of other stuff to be done - sorry

@fsmeier
Copy link
Contributor Author

fsmeier commented Jun 26, 2013

so it's on my todo-list for july :D

@ownclouders ownclouders mentioned this issue May 29, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants