![](/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.