I'm trying to get Travis CI to output a coverage report to be used with scrutinizer later. But I'm having trouble to get it to work.
When I add --coverage-clover=coverage.clover to my phpunit command, the generation of the coverage report fails with the following error:
Generating code coverage report in Clover XML format ...PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/travis/.phpenv/versions/5.5.7/share/pyrus/.pear/php/PHP/Token.php on line 432
This puzzles me for several reasons:
generating the report takes only about 3 seconds on my local machine which actually seems to be slower than the test server (judging from the time the test suite needs)
command line PHP does not have a timeout usually, so this seems to be setup deliberately on Travis-CI?
it seems noone else is having this kind of problem as I couldn't find any similar reports when googling
my bootstrap.php file for phpunit explicitly calls set_time_limit(0);
Is there a way to fix this on my side?
Full build log at https://travis-ci.org/splitbrain/dokuwiki/jobs/16522833
Related
I have recently learned about the Embedded debug type, which seems to be great - no longer do I need to upload PDBs to the Symbol Server during the CI build, which takes eternity when using the standard Index Sources & Publish Symbols task (for about 150+ projects it takes on average 9 minutes !!!)
However, the VS code coverage feature does not work without PDBs. So running dotnet test --collect "Code coverage" yields nothing if there are no PDBs.
What am I missing?
It seems, that there is no way to do that right now, according to open GitHub issue 1748 for adding this functionality.
You can wait until it'll be implemented or avoid using embedded PDBs for now (use full debug type instead)
While generating log.html from output.xml after execution of robot related tests, we are observing issue of python process getting hung and windows is suggesting to close the program
this is happening when executed on windows.help is required as we were not able to proceed.
We have a test suite that runs 30 or more minutes and it is not uncommon for me to see a situation like this:
I don't generally want to break on a first failure (--stop-on-failure) but in this specific example, I also don't want to wait another 10-15 minutes for the test suite to finish. If I do Ctrl+C, the process stops immediately and I won't see any messages.
I'm specifically interested in the format that PHPUnit uses in the console which I find very useful. For example, logging to a file using --testdox-text produces a nice but not very detailed list. Logging with --log-teamcity is verbose and quite technical.
Is there a way to see "console-like" PHPUnit messages before the test suite fully finishes?
Update: I've also opened an issue in the official repo.
maybe you could register a listener in your phpunit.xml file and implement its addFailure() method to display some info in console or a file...
Can I run a PHP script automatically after all PHPUnit tests are finished?
I'd like to report some non-fatal issues (i.e. correct but suboptimal test results) after all tests are finished.
Assuming you can detect such sub-optimal results, PHPUnit (v9 and before) has a 'TestListener' facility, that can be extended with custom code and enabled in the phpunit.xml file. It can run code before and after tests, and for each potential result (pass/fail/errors, etc, etc).
PHPUnit 10 replaces the TestListener with a new events system.
Using VSTS (formerly know as VSO), I'm importing test results from a 3rd party testing tool.
This is working fine, however when the imported results have a failure in them, i would expect the build to fail, however it doesn't. As seen below.
Any advice? this seems like a bug.
The vNext build pass/fail base on the execution status of each steps in the build definition. It does not check the published test result. You can submit a feature request on VSTS User Voice.