![](/img/trans.png)
[英]Is it possible to attach an html report in email body using protractor?
[英]Send email report with HTML file attached using node js after the run is complete using protractor
我正在使用nodemailer在我的代码中发送电子邮件。 我想在量角器执行完我的测试用例之后运行它。 目前,它是在运行完成之前通过邮件发送给我目录中的旧HTML文件。
我也尝试使用EmailJS,但是得到了相同的结果。
我希望它在测试完成并生成报告后运行,以便我收到最新报告。
将您的邮件发送脚本放在protractor.conf.js文件中的onComplete
函数中。
var mailer = require(/* Mail module */);
exports.config = {
// Other config...
onComplete: function () {
// Send mail...
}
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.