Mbunit with Jenkins

198 views
Skip to first unread message

JenkinsUser

unread,
Apr 26, 2013, 4:12:56 PM4/26/13
to galli...@googlegroups.com
My project currently uses Jenkins and MSbuild for CI.
 
Does anyone know how to configure Gallio with Jenkins to run the Mbunit test?

Espen Albrektsen

unread,
May 2, 2013, 5:46:12 AM5/2/13
to galli...@googlegroups.com
I use gallio.echo and gallio.utility (For XML -> HTML reports)

Below is my unit test step (GALLIO_3_3_458 is a Jenkins environment variable pointing to the gallio installation folder).
Note the trick to keep the Gallio exit code if one of the two test runs fails.
rem @echo off
echo Running "normal" tests 
call %TYPEMOCK_7_2%\mocking_off.bat
set GALLIO_ECHO_CMD=%GALLIO_3_3_458%\bin\Gallio.Echo.exe SirdasTest\bin\Release\SirdasTest.dll /rd:TestReports /rt:xml /v:Verbose
%GALLIO_ECHO_CMD% /rnf:SirdasTests  /f:"exclude Category:Isolator"
set ERROR=%ERRORLEVEL%

echo Running tests with isolator
call %TYPEMOCK_7_2%\mocking_on.bat
%GALLIO_ECHO_CMD%  /rnf:SirdasIsolatorTests /f:"include Category:Isolator"
IF %ERRORLEVEL% NEQ 0 set ERROR=%ERRORLEVEL%

echo Formatting test results into html
%GALLIO_3_3_458%\bin\Gallio.Utility.exe MergeReports TestReports/SirdasTests.xml, TestReports/SirdasIsolatorTests.xml /rt:html /rnf:SirdasTests /ro:TestReports /rfp:ReportPageSize=100 /v:Verbose
exit /B %ERROR%

I hope this is usefull to you.
Reply all
Reply to author
Forward
0 new messages