Question

I'm working with Codeception/phantomjs, and would like a screenshot to be captured upon the test failing/erroring out, with the reason for the error being the file name. I've done similar in casperjs, but can't find the best place/way to implement this in Codeception/phantomjs, as the makeScreenshot is only available to WebGuy, not in Console.php

Thanks!

Était-ce utile?

La solution

Codeception automatically makes screenshots on each test fail. (if you use Selenium web driver). Just check your tests/_log directory where Codeception saves screenshot of last shown page.

The name of screenshot is concatenation of failed cept/cest name and ".fail.png" (i.e. MyTestCept.php.fail.png).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top