如何在CruiseControl.NET中看到嵌入/附加到我的Gallio测试日志的项目?

时间:2010-05-25 11:18:25

标签: cruisecontrol.net gallio

我可以使用以下代码将日志文件附加到我的Gallio 3.2验收测试报告中:

TestLog.AttachPlainText("Attached log file", File.ReadAllText(path));

当我在本地运行测试时,我可以通过在Web浏览器中查看报告来查看日志文件内容。所以,我希望能够在CCNET中查看附件。我有运行MsBuild的CCNET项目,它生成测试日志(Regression.Acceptance.tests.xml)和附件(排列在文件夹Regression.Acceptance.tests中)。在CCNET运行构建之后,我可以看到这些存在。

我添加了以下内容以将结果和附加文件合并到我的构建日志中:

<merge>
    <files>
        <file>Source\Reports\Regression.Acceptance.tests.xml</file>
        <file action="Copy">Source\Reports\Regression.Acceptance.tests</file>
    </files>
</merge>

如果我查看CCNET服务器日志,我会看到它在测试结果中合并的以下行:

2010-05-26 13:39:36,359 [DashboardAcceptanceTests:INFO] Merging file 'Regression.Acceptance.tests.xml'

但是没有提到附件文件夹,如果我查看artefacts文件夹,我可以看到合并的构建日志,但是没有附件的文件夹,当我尝试浏览到时,我收到以下错误通过Web仪表板在报告中附加文件:

Exception Message

The attachment was not inlined into the XML report.

Exception Full Details

System.InvalidOperationException: The attachment was not inlined into the XML report.
   at CCNet.Gallio.WebDashboard.Plugin.GallioAttachmentBuildAction.CreateResponseFromAttachment(XPathNavigator attachmentNavigator)
   at CCNet.Gallio.WebDashboard.Plugin.GallioAttachmentBuildAction.Execute(ICruiseRequest cruiseRequest)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ServerCheckingProxyAction.Execute(ICruiseRequest cruiseRequest)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.BuildCheckingProxyAction.Execute(ICruiseRequest cruiseRequest)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ProjectCheckingProxyAction.Execute(ICruiseRequest cruiseRequest)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CruiseActionProxyAction.Execute(IRequest request)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CachingActionProxy.Execute(IRequest request)
   at ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ExceptionCatchingActionProxy.Execute(IRequest request)

当我尝试使用以下代码嵌入文件时,我得到了类似的结果:

TestLog.EmbedPlainText("Embedded log file", File.ReadAllText(path));

有可能让这个工作吗?据我了解,Regression.Acceptance.tests文件夹中的目录结构需要在merge任务复制时保留,但the documentation有点模糊,我没有把它做到什么都没有!

0 个答案:

没有答案