@winning-test/autotest-local-reporter
v0.0.3
Published
globals: { batchId: new Date().valueOf() }, "reporters": [ "default", [ "@winning-test/autotest-local-reporter", { "resultFilePath": `${process.cwd()}/TestReports`,//html本地报告路
Downloads
19
Readme
01 使用方法
(1)jest.config.js中添加如下配置:
globals: {
batchId: new Date().valueOf()
},
"reporters": [
"default",
[
"@winning-test/autotest-local-reporter",
{
"resultFilePath": `${process.cwd()}/TestReports`,//html本地报告路径
"testSuiteName": "门诊60测试", //测试集名称:可修改为当前项目名称
"screenshotPath":`${process.cwd()}/screenshot/` //截图文件路径,不需要修改(默认是TestRunTime.js中截图存储路径)
}]
]
(2)TestRunTime.js中,增加一行代码
TestRunTime.js的start()方法:新增一行,给this.name赋值,具体操作如下:
在 this.current.testName = currentTestName;前新增一行代码,如下:
this.name=currentTestName.substring(0,currentTestName.indexOf(" "))