使用 Testcafe-Reporter-HTML 可防止测试运行



我正在使用testcafe-reporter-html从testcafe测试运行中生成报告,并使用上述链接中提供的文档进行说明。

第二步说$ testcafe chrome test_folder/ --reporter html

但是,这会导致以下错误

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-e2e@1.0.0 test:debug: `testcafe chrome test_folder/ --reporter html:/path/to/test_folder/report.html`
npm ERR! Exit status 1

我在test_folder内几乎没有测试文件.他们都没有跑。 但是当我使用以下命令运行单个测试时:

$ testcafe chrome test_folder/my_favorite_test.spec.js --reporter html

运行完成并发布报告。

这里的一些专家可以帮助我确定我的步骤是否正确遵循文档或此错误的原因是什么?

您需要通过通配符提供一个或多个文件的路径。这样:$ testcafe chrome test_folder/*.js

下面的命令对我来说很好用:

testcafe chrome automation/tests/*.js --reporter html:tests/myreports.html"

最新更新