attachment - 将日志文件附加到 teamcity 中的电子邮件通知

标签 attachment teamcity-8.0 email-notifications

我正在尝试在 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/

相关文章:

ruby-on-rails - rails 4 : replace/delete uploaded file in edit view form

teamcity - 如何从 Git 获取完整的变更日志作为 TeamCity 中的工件

php - 当用户位于 WooCommerce 结帐页面且购物车中有产品时,向用户发送电子邮件通知

php - Woocommerce 新订单电子邮件通知中的自定义 "reply to"电子邮件标题

javascript - jQuery 提交表单以获取文件下载吗?

java - jar 文件是什么 - "org.jvnet.jax_ws_commons.dime.binding.DimeBindingID"

java - JAX-WS 和 SWA 附件

build - 当多个 VCS 根附加到构建配置时 TeamCity VCS 触发

git - 在 TeamCity 成功电子邮件模板中包含 git 分支名称和最新提交 SHA

git - jenkins 下游作业如何通过 email-ext 向上游 git 提交者发送电子邮件通知