【发布时间】:2019-08-28 16:14:37
【问题描述】:
如何在 onComplete 钩子中使用 Result 对象。实际上,我想获得通过/失败/跳过的计数,我可以在执行完成后将其保存在文本文件中。我正在将 webdriverIO 与黄瓜一起使用。 任何帮助或示例脚本都非常受欢迎!!!!
【问题讨论】:
标签: cucumber hook resultset webdriver-io
如何在 onComplete 钩子中使用 Result 对象。实际上,我想获得通过/失败/跳过的计数,我可以在执行完成后将其保存在文本文件中。我正在将 webdriverIO 与黄瓜一起使用。 任何帮助或示例脚本都非常受欢迎!!!!
【问题讨论】:
标签: cucumber hook resultset webdriver-io
onComplete: function (exitCode, config, capabilities, results) {
const resultString = `Finished tests: ${results.finished} \nPassed tests: ${results.passed} \nRetries: ${results.retries} \nFailed tests: ${results.failed}`;
fs.writeFileSync('./result.txt',resultString);
},
【讨论】: