Open amenk opened 9 years ago
@amenk The behavior is correct, since the PHP unit test if failing the plugin return "failed" status and the build is completed. There is a copy plugin that you can use to copy screenshot files before complete (and delete build folder).
The screenshots storage is not the problem. They are stored outside the build folder. My problem is, that I do not see the output of PHPunit with the link to the screenshot. Is there some kind of verbose mode for preserving the PHPunit output somewhere?
@amenk can you configure a report file in phpunit.xml file as described on config. I'm not sure you can log this informations here, but you can test and let us know :)
eg:
<logging>
<log type="xml" target="/tmp/logfile.xml"/>
</logging>
I used
<logging>
<log type="json" target="/tmp/logfile.json"/>
</logging>
as there is no type="xml"
option (correct link is https://phpunit.de/manual/current/en/appendixes.configuration.html)
So the output, including the screenshot location is written to that file.
But how can I have the contents of this file displayed in PHPCI ?
@amenk I'm sorry but currently is not possibile display external file in logs without alter the default phpci behavior.
so can that be added as a feature? Could also be displayed in a seperate "details section"
You can consider to introduce a new project config to "embed" a file in the build result page using interpolation token so you can see generated markup (should be useful also for display some other plugin output) but I'm not sure is a good way to procede.
Another solution is to create a new mail template and customize template to add embed the result file with file url o create and external app to list all generated files and display the generated screenshot.
IMO a plugin to store files created during the build would be a good idea. However, this also would require some kind of cleanup when the build are removed.
Hi,
Are there updates on this? the tap output is not the most useful as it does not really tells you what went wrong with an error or failure. Ideally the phpunit plugin uses the --log-tap
instead of --tap
, this way is possible to display the useful output in the "Build Log" tab.
I have a PHP Unit test with selenium tests. I would like to see the screenshot URLs.
When I execute PHPunit manually I get
But in the build protocol I just see
my phpci.yml:
phpunit.xml: