JUnit result for PHPUnit#102
Conversation
|
There is still a shortcoming: Skipped and ignored tests have no message in the current JUnit format (sebastianbergmann/phpunit#2740). And I would prefer to use the CommandExecutor to see if --log-json is supported. But I do not see a possibility to do this without writing to the log file. (I could disable logging, but not enable thereafter.) This is why |
|
Oops, I found an error. When there is output AND failure, the result may be wrong. I will fix it, but am already interested in feedback. |
|
Thank you @SimonHeimberg for the work. I will review changes soon and will write feedback. |
fd71086 to
575edd0
Compare
|
updated
|
|
the repo to generate phpunit_money* from is https://github.com/SimonHeimberg/testResultGenerating-php-censor |
|
@SimonHeimberg Yesterday I started review/test your pull request and I will try to finish it at this week. |
Test data is generated by real test suite, with phpunit 6.2
use json as long as available, since junit does not list skipped tests before phpunit 6
|
@SimonHeimberg I catched error on PHPUnit 6 (May be my tests will need update): RUNNING PLUGIN: PHP Unit (Stage: Test)
Plugin options: {"priority_path":"global","config":["phpunit.xml"]}
Looking for binary: phpunit
Found in vendor/bin (global): phpunit
Looking for binary: phpunit
Found in vendor/bin (global): phpunit
Args: ["\/home\/corpsee\/Projects\/php-censor.local\/vendor\/bin\/phpunit %s %s","--log-junit \"\/home\/corpsee\/Projects\/php-censor.local\/runtime\/builds\/477_e9e1a\/jLog_oFVPbo\" --configuration \"\/home\/corpsee\/Projects\/php-censor.local\/runtime\/builds\/477_e9e1a\/phpunit.xml\" ",null]
Command: /home/corpsee/Projects/php-censor.local/vendor/bin/phpunit --log-junit "/home/corpsee/Projects/php-censor.local/runtime/builds/477_e9e1a/jLog_oFVPbo" --configuration "/home/corpsee/Projects/php-censor.local/runtime/builds/477_e9e1a/phpunit.xml"
Warning: is_dir() expects parameter 1 to be a valid path, object given in /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php on line 56
Call Stack:
0.0001 353128 1. {main}() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/phpunit:0
0.0050 1057520 2. PHPUnit\TextUI\Command::main() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/phpunit:53
0.0050 1057632 3. PHPUnit\TextUI\Command->run() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/TextUI/Command.php:136
0.0177 2602096 4. PHPUnit\TextUI\TestRunner->getTest() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/TextUI/Command.php:159
0.0177 2602096 5. is_dir() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php:56
Catchable fatal error: Object of class PHPUnit\Framework\TestSuite could not be converted to string in /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php on line 32
Call Stack:
0.0001 353128 1. {main}() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/phpunit:0
0.0050 1057520 2. PHPUnit\TextUI\Command::main() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/phpunit:53
0.0050 1057632 3. PHPUnit\TextUI\Command->run() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/TextUI/Command.php:136
0.0177 2602096 4. PHPUnit\TextUI\TestRunner->getTest() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/TextUI/Command.php:159
0.0178 2602128 5. PHPUnit\TextUI\TestRunner->loadSuiteClass() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php:73
0.0181 2620592 6. PHPUnit\Runner\StandardTestSuiteLoader->load() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php:130
0.0181 2620592 7. str_replace() /home/corpsee/Projects/php-censor.local/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php:32 |
|
It was my fault. I reviewed and merged into |
|
to run php-censor itself with phpunit v6, #105 is necessary. But I get some fatal error as well (different ones). How did you set up your system? Update phpunit in composer.json of php-censor? |
|
Yes, I updated PHPUnit in PHP Censor to v6 and used this feature - #104 (Used global PHPUnit instead of build local PHPUnit). I don't see reason now to test PHP Censor itself with PHPUnit v6, I already tested your request on PHPUnit v6 repo as a project with tests for PHPUnit v6 😄 |
No description provided.