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

Error when no tests selected for execution #142

Closed
MarketaSebkova opened this issue May 22, 2017 · 2 comments
Closed

Error when no tests selected for execution #142

MarketaSebkova opened this issue May 22, 2017 · 2 comments

Comments

@MarketaSebkova
Copy link

MarketaSebkova commented May 22, 2017

If executing a test with a dependency to other test which was not executed an error occurs:

Example/ExampleTest ERR> PHP Notice:  Undefined index:  in /.../selenium-tests/vendor/lmc/steward/src/Listener/TestStatusListener.php on line 117
Example/ExampleTest ERR> PHP Stack trace:
Example/ExampleTest ERR> PHP   1. {main}() /.../selenium-tests/vendor/phpunit/phpunit/phpunit:0
Example/ExampleTest ERR> PHP   2. PHPUnit_TextUI_Command::main() /.../selenium-tests/vendor/phpunit/phpunit/phpunit:52
Example/ExampleTest ERR> PHP   3. PHPUnit_TextUI_Command->run() /.../selenium-tests/vendor/phpunit/phpunit/src/TextUI/Command.php:116
Example/ExampleTest ERR> PHP   4. PHPUnit_TextUI_TestRunner->doRun() /.../selenium-tests/vendor/phpunit/phpunit/src/TextUI/Command.php:186
Example/ExampleTest ERR> PHP   5. PHPUnit_Framework_TestSuite->run() /.../selenium-tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:517
Example/ExampleTest ERR> PHP   6. PHPUnit_Framework_TestCase->run() /.../selenium-tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php:722
Example/ExampleTest ERR> PHP   7. PHPUnit_Framework_TestCase->handleDependencies() /.../selenium-tests/vendor/phpunit/phpunit/src/Framework/TestCase.php:760
Example/ExampleTest ERR> PHP   8. PHPUnit_Framework_TestResult->endTest() /.../selenium-tests/vendor/phpunit/phpunit/src/Framework/TestCase.php:2062
Example/ExampleTest ERR> PHP   9. Lmc\Steward\Listener\TestStatusListener->endTest() /.../selenium-tests/vendor/phpunit/phpunit/src/Framework/TestResult.php:399
@OndraM OndraM added the bug label May 22, 2017
@OndraM OndraM changed the title Error while executing a test with dependency Error when no tests selected for execution May 22, 2017
@OndraM
Copy link
Member

OndraM commented May 22, 2017

This probably happens when none test from the testcase is selected to be run (using combination of --pattern and --filter options).

The proper behavior should probably be to not report anything, if there is no test name passed to the listener.

@OndraM OndraM added this to the 3.0 milestone Mar 16, 2018
@OndraM
Copy link
Member

OndraM commented Nov 5, 2018

It seems the root cause was actually a bug in PHPUnit: sebastianbergmann/phpunit#3379 - skipped tests has wrong status.

Should be fixed with PHPUnit 7.4.4 (= with Steward 3.0).

@OndraM OndraM closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants