用于组合NUnit或MSTest XML结果的MSBuild任务 [英] MSBuild task for combining NUnit or MSTest XML results
问题描述
我有一组NUnit XML结果文件(由xUnit.NET通过NUnitXml参数生成给Xunit.Runner.MSBuild.xunit msbuild任务,与 http://jonnekats.wordpress.com/2009/05/07/integrate-xunit-tests-into-your-daily-team-build/)
I have a set of NUnit XML result files (produced by xUnit.NET via the NUnitXml parameter to the Xunit.Runner.MSBuild.xunit msbuild task pretty much as in How do I get Team Build to show test results and coverage for xUnit.net test suite? and http://jonnekats.wordpress.com/2009/05/07/integrate-xunit-tests-into-your-daily-team-build/)
该脚本单独发布每个测试运行,这很慢,因为它每次都会拉入所有TestResults工件.因此,我想先将它们组合到客户端上,然后再提交[使用带有/publish参数的mstest.exe到TFS中].
The script publishes each of the test runs individually, which is slow as it pulls in all the TestResults artifacts each time. Thus I'd like to combine them into a single consolidated set on the client side first prior to submission [to TFS using mstest.exe with the /publish parameter].
xUnit.net具有一个CombineXunitXml任务,该任务在xunit.tests.msbuild中被调用,如下所示:-
xUnit.net has a CombineXunitXml Task which is invoked in xunit.tests.msbuild as follows:-
<CombineXunitXml InputFiles="@(TestXmlFiles)" OutputFile="TestResults.xml" />
有人知道以类似的方式合并NUnit结果文件的等效任务吗? (我猜想这并不常见,因为NUnit任务在其Assemblies参数中包含多个程序集,而xUnit.net具有一个奇异的Assembly参数.)
Does anyone know of an equivalent task to merge NUnit result files in a similar way? (I'm guessing this doesnt arise as commonly as the NUnit task takes multiple assemblies in its Assemblies parameter whereas xUnit.net has a singular Assembly parameter).
推荐答案
xUnit 1.1中不存在CombineXunitXml任务.将类从源代码的1.5版(当前为CTP2版)复制到1.1版的解决方案中,对我来说还不错.
The CombineXunitXml task does not exist in xUnit 1.1. Copying the class from the source for 1.5 (currently CTP2) into the solution for 1.1, it built just fine for me.
这篇关于用于组合NUnit或MSTest XML结果的MSBuild任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!