1.内置测试报告 npx cypress run --reporter=spec
2.指定运行用例 npx cypress run --reporter=spec --spec cypress\integration\cypress-study\web\page\should_demo.spec.js
3.生成json格式的测试报告: npx cypress run -r json -o "toConsole=true" -s cypress\integration\cypress-study\web\page\should_demo.spec.js
4. 生成junit格式的测试报告:npx cypress run -r junit -o "mochaFile=results/test-output.xml,toConsole=true" -s cypress\integration\cypress-study\web\page\should_demo.spec.js
5.执行命令安装插件,生成html/css的测试报告: npm install --save-dev [email protected] mochawesome
生成报告的执行命令: npx cypress run -r mochawesome -s cypress\integration\cypress-study\web\page\should_demo.spec.js
上面1,2,3,4都属于cyress自带的内置测试报告,5属于自定义测试报告
标签:run,测试报告,demo,cypress,npx,无头,spec From: https://www.cnblogs.com/51testing/p/16706456.html