我想为我在柏树中的 BDD 测试附上 html 报告中失败步骤的屏幕截图。
我正在使用“multiple-cucumber-html-reporter”,并且能够生成所有测试用例的 BDD 报告。
下面是我生成 html 报告的 .js 文件:
const report = require("multiple-cucumber-html-reporter");
report.generate({
jsonDir: "cypress/reports", // ** Path of .json file **//
reportPath: "./cypress/reports/cucumber-htmlreport.html",
metadata: {
browser: {
name: "chrome",
version: "81",
},
device: "Local test machine",
platform: {
name: "mac",
version: "Catalina",
},
},
});
我知道在 cypress 的 BDD html 报告插件中,我们不能像以前在黄瓜中那样使用场景对象。
如何在此处添加截屏代码?