获取MSTest输出以显示在CruiseControl.Net中 [英] Getting MSTest output to show in CruiseControl.Net

查看:68
本文介绍了获取MSTest输出以显示在CruiseControl.Net中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前已使用CruiseControl.Net设置了构建服务器,该服务器使用MSBuild运行构建,然后使用MSTest运行单元测试.问题是我在CC中看不到单元测试的输出-我知道它们正在运行,因为如果提交失败的测试,我可以使构建失败.

I currently have our build server set up with CruiseControl.Net running a build using MSBuild and then running unit tests using MSTest. The problem is I can't see the output of the unit tests in CC - I know they are being run because I can get the build to fail if I commit a failing test.

我遵循了 http://blogs.blackmarble.co.uk/blogs/bm-bloggers/archive/2006/06/14/5255.aspx

I have followed the online guides from http://blogs.blackmarble.co.uk/blogs/bm-bloggers/archive/2006/06/14/5255.aspx and http://www.softwarepassion.com/?p=89 but still having no luck.

我的ccnet.config文件包含

My ccnet.config file contains

    <tasks>
         <msbuild>
              <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
              <workingDirectory>C:\CCBuilds</workingDirectory>
              <projectFile>Application.sln</projectFile>
              <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
              <targets>Build</targets>
              <timeout>900</timeout>
              <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
        </msbuild>  

        <exec>
            <executable>deleteTestLog.bat</executable>
            <baseDirectory>C:\CCBuilds</baseDirectory>
            <buildArgs></buildArgs>
            <buildTimeoutSeconds>30</buildTimeoutSeconds>
        </exec>

        <exec>
            <executable>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe</executable>
            <baseDirectory>C:\CCBuilds</baseDirectory>
            <buildArgs>/testcontainer:UnitTests\bin\Debug\UnitTests.dll /runconfig:localtestrun.Testrunconfig /resultsfile:testResults.trx</buildArgs>
            <buildTimeoutSeconds>30</buildTimeoutSeconds>
        </exec>

    </tasks>

    <publishers>
        <merge>
            <files>
                <file>testResults.trx</file>
            </files>
        </merge>

        <xmllogger logDir="C:\Program Files\CruiseControl.NET\server\Checkin Build\Artifacts\buildlogs" />

    </publishers> 

C:\ Program Files \ CruiseControl.NET \ server \ Checkin Build \ Artifacts \ buildlogs中的日志文件包含单元测试结果,我错过了任何步骤吗?

The log file in C:\Program Files\CruiseControl.NET\server\Checkin Build\Artifacts\buildlogs contains the unit test results, have I missed any steps?

推荐答案

我进行了以下更改以使MSTest结果输出显示在CruiseControl.NET中

i made the following changes to get MSTest results output to be shown in CruiseControl.NET

1)对于仪表板-在dashboard.config中,在buildReportBuildPlugin下添加了对Mstest 2008 xsl文件的引用

1) For Dashboard - in dashboard.config added a reference to the Mstest 2008 xsl file under buildReportBuildPlugin

<xslFile>xsl\MsTestReport2008.xsl</xslFile>

2)对于电子邮件-在ccservice.exe.config中,将引用添加到xslFiles部分下的同一xsl文件中

2) For email - in ccservice.exe.config added the reference to the same xsl file under xslFiles section

<file name="xsl\MsTestSummary2008.xsl"/>

这篇关于获取MSTest输出以显示在CruiseControl.Net中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆