The following example demonstrates how you can configure Jenkins to run MFUnit tests against a COBOL application.
Visual COBOL for Eclipse must be installed on the machine where you will run the MFUnit tests. You are going to use one of the samples stored in the \COBOL\AirportMFUnitDemo subfolder in the location of the Visual COBOL samples ($COBDIR/demo).
copy "C:\Users\Public\Documents\Micro Focus\Enterprise Developer\Samples\mfunit\*" %WORKSPACE% cd %WORKSPACE% call examples.bat
cp /opt/microfocus/xxxxxxxx cd $WORKSPACE examples.sh
After the project build completes, there is a blue icon next to the project on the Jenkins Home page which indicates that the build was successful. This, however, is not correct.
In the text output you'll see that some tests failed even though the blue indicator in the previous step suggests that everything ran successfully:
Micro Focus COBOL - mfurun Utility Unit Testing Framework for Windows/Native/32 Options : verbose=true,process=separate,junit=true,printfile=true Fixture filename : MFUTASCI.dll Preparing test case : MFUTASCI Executing test case : MFUTASCI Completed test case : MFUTASCI - Failed Generating junit xml : TEST-MFUTASCI.xml Generating report : MFUTASCI-report.txt Test Run Summary Overall Result : Failed Tests run : 1 Tests passed : 0 Tests failed : 1 Total execution time : 3
Although the tests ran to completion, there were a number of test failures that should have caused this build to fail.
You now need to enable test reporting.
Note that this time the icon indicating status has turned yellow. This indicates that the build ran to completion but there were some test failures.