詹金斯与NUnit的执行 [英] Execute NUnit with Jenkins

查看:148
本文介绍了詹金斯与NUnit的执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好。

我想配置詹​​金斯服务器与插件的詹金斯NUnit的插件运行NUnit的,但我尝试了很多事情,犯规作品。

I Want to configure Jenkins server to run NUnit with the plugin Jenkins NUnit plugin but i try many thing and doesnt works.

我点击按钮**添加构建步骤** >> 执行Windows批处理命令
,但我在这里看到的 http://stackoverflow.com/questions/9121312/how-do-you-run-nunit-tests-from-jenkins 的然后我被配置这种形式:

I click in the button ** Add a build step** >> Execute Windows Batch Command but i saw here http://stackoverflow.com/questions/9121312/how-do-you-run-nunit-tests-from-jenkins then i was configuring this form:

C:\program files\\\
unit\bin\\\
unit-console.exe
$(项目本地)\ $(DLLTest).dll文件

"c:\program files\nunit\bin\nunit-console.exe" $(project Local)\$(DLLTest).dll

这种形式返回一个错误,但我尝试在此bat文件,并没有任何反应,我把前开始第一道防线。
打开NUnit的,但什么也没有发生,在詹金斯建设开始,但从来没有结束。

this form return an error but i try this in bat file and nothing happens and i put start before first line. Open the NUnit but nothing happens, in Jenkins the building starting but never ending.

我有什么做错了吗?

推荐答案

下面是我如何运行一个特定的硬编码的项目

Here is how I run it for a specific hard-coded project

C:\计划Files\NUnit 2.6\bin\\\
unit-console.exenUnitTests\bin\Release\\\
UnitTests.dll/xml=nunit-result.xml

"C:\Program Files\NUnit 2.6\bin\nunit-console.exe" "nUnitTests\bin\Release\nUnitTests.dll" /xml=nunit-result.xml

我需要指定XML输出​​,以确保违规插件(我使用的)可以拿起输出,并正确地报告它可以帮助你一旦你得到它的工作。

I needed to specify the xml output to ensure that the Violations plugin (which I'm using) could pick up the output and report correctly which may help you once you've got it working.

您是否尝试过用%变量%,而不是$变量?在Windows的批处理命令它使用WORKSPACE%,而%超过$工作区例子。这就是我在我的FxCop / StyleCop的批处理命令所做的一切。

Have you tried using %variable% instead of $variable? Within the Windows Batch Command it uses %WORKSPACE% rather than $WORKSPACE for example. That's what I've done in my FxCop/StyleCop batch commands.

这篇关于詹金斯与NUnit的执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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