1

我在集成文件夹中有多个规范文件。所有这些文件,我计划使用单个命令运行

node_modules\.bin\cypres run --spec .\cypress\integration\*.spec.js --env configFile=configuration_file

我正在使用 mochawsome 记者生成结果文件。但是我的输出文件有问题。

我不需要将这些 json 报告文件命名为mochawsone_xx,而是需要使用它们的规范文件名生成 json 文件。

柏树有没有办法做到这一点?

4

1 回答 1

0

赛普拉斯允许您通过命令行传递报告选项。查看文档。如果需要,您也可以在配置中设置它。

在您的情况下,它在命令行中看起来像这样:

node_modules\.bin\cypres run --spec .\cypress\integration\*.spec.js --env configFile=configuration_file --reporter-options="reportFilename=myCustomName"
于 2021-04-05T13:02:15.627 回答