我已按照此link中提到的指南安装了TestCafe报告程序插件。如果测试用例失败,则会在代码中提供错误屏幕截图。相反,是否有一项功能可以用来在安装了上述插件的情况下对应用程序进行截图?
答案 0 :(得分:2)
TestCafe可以在测试失败时制作网页(应用程序)的屏幕截图。请参考以下文章以找到有关此的更多信息:
https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-s-path---screenshots-path https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-s---screenshots-on-fails
因此,您只需要将-S -s screenshots
标志添加到CLI命令。
此外,我想提一提,您可以创建自己的报告并以自己的方式处理屏幕截图。请参阅
https://devexpress.github.io/testcafe/documentation/extending-testcafe/reporter-plugin/
如果这不是您想要的功能,请更详细地描述您的要求。