【发布时间】:2019-09-18 15:27:27
【问题描述】:
我的套件中有许多测试,我想在运行测试时打印出文件名,或者在所有测试失败中包含文件名。
我可以在browser.getProcessedConfig() 中使用console.log(config.specs) 打印出规格,但它只显示glob 模式,而我想要完整的文件名。我试过config.suites,但它会打印出所有套件,而不仅仅是测试中运行的那个。
conf.shared.ts
await browser.getProcessedConfig().then(async function(config: any) {
});
console.log(config.specs)
console.log(config.suites)
return config.specs;
config.specs 的输出
'../../../../lib/tests/home/**/*.myparam*.js'
config.suites 的输出
mysuite:
'../../../../lib/tests/home/**/market/**/*.*.myfilename.js',
mysuite2:
'../../../../lib/tests/home/**/market2/**/*.*.myfilename.js',
mysuite3:
'../../../../lib/tests/home/**/market3/**/*.*.myfilename.js',
mysuite4:
'../../../../lib/tests/home/**/market4/**/*.*.myfilename.js'
【问题讨论】:
标签: typescript protractor mocha.js