Skip to content

TEST - Create single-test-enviroment #3851

Closed

Description

@fsmeier

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

Activity

  1. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

    @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

  2. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

    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 :-/

  3. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

    but then i don't have the test enviroment

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

    There is nothing more you need

  4. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

    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

  5. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

    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
    
  6. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

    I used

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

    but this command executes all tests again :-/

  7. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

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

  8. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

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

  9. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

    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?

  10. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

    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...

  11. DeepDiver1975 commented on Jun 26, 2013

    @DeepDiver1975
    Contributor

    well - to be honest ... ;-)

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

  12. fsmeier commented on Jun 26, 2013

    @fsmeier
    ContributorAuthor

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

  13. locked as resolved and limited conversation to collaborators on Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions