سؤال

I have configured NUnit tests to run after build completed.(Jenkins)

I added following on Excecute windows batch command window in Jenkins.

rmdir ClickOnceInstall /Q /S

mkdir ClickOnceInstall

CD BuildScripts

Start.bat

"C:\Program Files (x86)\NUnit 2.6.2\bin\nunit-console-x86.exe" AA.Tests\bin\x86\Release\AA.Tests.dll /xml=nunit-result.xml

It seems Execute unit test command doesn't create result file as specified name and marked as failed. However, when I run the nunit test command manually it creates the file. Next time build through Jenkins, result xml file does not seem to be updated but it doesn't fail.

am I missing any configuration or something else?

هل كانت مفيدة؟

المحلول

It would help if you would paste the console log.

However, my first guess is to ask you to add call to your batch file statement:
call Start.bat

If that batch file has an exit /b statement (even with 0), it will quit the whole calling step (i.e. "Execute windows batch command") without getting to your last statement (i.e nunit command).

Using call in front of the batch file will make sure that control is returned to the calling step.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top