質問

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!

役に立ちましたか?

解決

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).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top