我正在尝试在 Teamcity 中的每个开发构建结束时调用测试自动化脚本 (ranorex),它工作正常。
我在测试自动化结束时发送电子邮件通知,但我不知道如何将日志文件附加到代理端的电子邮件通知中,因为我无权访问 teamcity 服务器文件系统。
最佳答案
实际上可以指定与电子邮件一起发送的附件。
Ranorex 用户代码:
using Ranorex.Core.Reporting;
string RepName = TestReport.ReportEnvironment.ReportName;
System.Net.Mail.Attachment attachment;
attachment = new System.Net.Mail.Attachment(RepName + ".html");
mail.Attachments.Add(attachment);
可能您的实现有些不同,要使其正常工作,您将从此处找到所有必需的信息:http://www.ranorex.com/forum/send-mail-module-t2356.html
关于attachment - 将日志文件附加到 teamcity 中的电子邮件通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31616288/