-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Group exclusions are ignored on folder level #358
Comments
It seems this has been fixed. My tests for this work fine in 3.6.3 just using My phpunit.xml looks like the linked one so i think this is solved. Feel free to reopen if the problem persists for you. Maybe with the complete reproduce code including the folder structure :) |
We faced the same issue. OS: Ubuntu 11.10. PHPUnit installed using apt-get. $ phpunit --version $ uname -a |
I tried PHPUnit installed by PEAR. The problem is still present. $ phpunit --version |
Like stated without a reproduce case there is nothing much I can do |
We were having the same "problem" here, so we created a repository to try to reproduce the "bug": https://github.com/diogobaeder/phpunit-bug-358 But, actually, /eriksencosta discovered that the tests excluded by "--exclude-group" are not being run, which is the expected behaviour, but the number of tests being shown at each pointed line end is not consistent with the total number of tests which is printed at the execution. For example, this is the output of the complete test suite of our internal project: PHPUnit 3.6.10 by Sebastian Bergmann. ............................................................. 61 / 1505 ( 4%) Time: 03:16, Memory: 503.75Mb OK, but incomplete or skipped tests! Therefore I think this is not properly a "bug", but a bad communication about the number of tests, which can be improved if we show the correct number ("1488" instead of "1505", at the case above) |
I am not sure what it was, because I did not conclude this purely on statistics. In the Zend Framework test suite some tests grouped under However, with above repository I forked I cannot reproduce this anymore. Meanwhile I am on phpunit 3.6.10 so this can stay closed, perhaps it was a bug but solved between 3.5.15 and 3.6.10 :) |
The test count numbers can be off. That happens because with the current test runner not all the filters (like exclude group) are applied before the tests are started but they should not be executed. If it works for you with 3.6.10 thats great :) Thanks for the reproduce @diogobaeder. |
In both the phpunit.xml declarations as for the command line arguments, my excluded test are still running. This happens when I try to run a directory of tests, a single file works fine.
So assume I have this phpunit.xml:
And a testcase which looks like this
And assume the testcase is loaded fine by the autoloader, then the following occurs:
This works (ie. test does NOT run):
$ phpunit path/To/SomeTest.php
$ phpunit -c phpunit.xml path/To/SomeTest.php
$ phpunit --exclude-group disable path/To/SomeTest.php
This does not work (ie test DOES run):
$ phpunit path/To/
$ phpunit -c phpunit.xml path/To/
$ phpunit --exclude-group disable path/To/
This gave me the following conclusion:
To complete the info, I use phpunit 3.5.15 which is installed through pear. Though this bug report is a simplified version, this problem occurs with the current zf2 code base (https://github.com/zendframework/zf2). Users with 3.5.14 didn't have this problem, they told me all was working fine.
The text was updated successfully, but these errors were encountered: