Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding information to Behat output from custom context code

I am trying to determine how I would add additional information to Behat's output (pretty, html, junit, etc) so I can have more contextual information for the test purposes.

Specifically I have some unique data that gets generated during some of the tests. I have been echoing it to the console. But that never ends up in any of the files that are generated in reports. I would like this information that I have been outputting to the console to end up in the reports. How would I do that from my FeatureContext.php custom steps?

Thanks, Patrick

like image 779
Patrick Avatar asked Nov 18 '13 17:11

Patrick


1 Answers

If using behat 3.x just print, var_dump, var_export, etc in your code. It will be caught and printed from behat

database-setup-output

Reference: https://github.com/Behat/Behat/issues/347

like image 154
pscheit Avatar answered Nov 02 '22 23:11

pscheit