[英]Jenkins/Hudson and Gallio Unit-Testing Integration
I am struggling to get it to run my tests. 我正在努力让它运行测试。 In the Execute Windows batch command on Jenkins, I have put the following command:
在Jenkins上的“执行Windows批处理”命令中,我输入了以下命令:
C:\Program Files (x86)\Gallio\bin\Gallio.Echo.exe" /report-type:Html /verbosity:quiet “Project.Tests\bin\Release\*.Tests.dll
It doesn't like the *.Tests.dll
bit, in that it says: 它不喜欢
*.Tests.dll
位,因为它说:
Cannot find directory containing file pattern Project.Tests\\bin\\Release\\*.Tests.dll
. 找不到包含文件模式
Project.Tests\\bin\\Release\\*.Tests.dll
。
My next question would be if I change the report-type to xml, is it straight forward to get my unit test reports published in hudson? 我的下一个问题是,如果我将报告类型更改为xml,是否可以直接在hudson中发布单元测试报告?
many thanks. 非常感谢。
The following extract runs Gallio tests in a Windows Batch command build step (Download Gallio from) 以下摘录在Windows Batch命令构建步骤中运行Gallio测试(从此处下载Gallio)
"c:\Program Files\Gallio\bin\Gallio.Echo.exe" %WORKSPACE%\YourTestPro\bin\Debug\YourTestPro.dll /report-directory:%WORKSPACE%\TestResults /report-type:Xml /working-directory:%WORKSPACE%
To setup Jenkins report generation 设置Jenkins报告生成
You can use Maven plugin for .Net: http://docs.codehaus.org/display/SONAR/.Net+plugin 您可以将Maven插件用于.Net: http : //docs.codehaus.org/display/SONAR/.Net+plugin
It takes care of Gallio command line generation: you can provide a filter : 它负责生成Gallio命令行:您可以提供一个过滤器:
<visual.test.project.pattern>*.Tests</visual.test.project.pattern>
<gallio.filter>Category:UnitTests</gallio.filter>
Then, the Maven plugin generates the command line. 然后,Maven插件生成命令行。
You also have a lot of advantages using maven: integration with Partcover/NCover, stylecop/fxcop/gendarme, etc. 使用maven还具有很多优点:与Partcover / NCover,stylecop / fxcop / gendarme等集成。
OR you can make a MSBuild script for that: 或者,您可以为此创建一个MSBuild脚本:
<itemGroup>
<TestsDll Include="**\bin\$(Configuration)\*.Tests.dll" />
</itemGroup>
<Exec Command="Gallio.Echo.exe @(TestsDll, ' ')"/>
I am pretty sure you want to look into using the Gallio Plugin instead of using the execute windows batch command. 我敢肯定,您想研究使用Gallio插件,而不是使用execute Windows batch命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.