如何在onComplete挂钩中使用Result对象。实际上,我想获取通过/失败/跳过的计数,可以在执行完成后保存在文本文件中。我正在将webdriverIO与黄瓜一起使用。高度重视任何帮助或示例脚本!!!
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);
},