views:

99

answers:

0

I can use the following code to attach a log file to my Gallio 3.2 acceptance test report:

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

When I run my tests locally I can see the log file contents by viewing the report in my web browser. So, I want to be able to view the attachments in CCNET. I have my CCNET project running MsBuild, which produces the test log (Regression.Acceptance.tests.xml) and attachments (which are arranged in the folder Regression.Acceptance.tests). I can see that these exist after CCNET runs the build.

I have added the following to merge the results and attached files into my build log:

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

If I look at the CCNET server log I see the following line where it merges in the test results:

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

But there is no mention of the attachments folder, and if I look in the artefacts folder I can see the merged build log but there is no folder with the attachments, and I get the following error when I try to browse to an attached file in the report via the web dashboard:

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)

I get similar results when I try to embed the file instead with:

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

Is it possible to get this working? As I understand it, the directory structure within the Regression.Acceptance.tests folder needs to be preserved when copied by the merge task, but the documentation is a little vague and I haven't got it to do anything yet!