The following command runs all test cases in myFullTestsuite, using the default options:
Windows:
mfurun myFullTestsuite.dll
UNIX:
cobmfurun32 myFullTestsuite.so
The following command only runs the mySecondTestcase test case within the test suite, producing verbose output:
Windows:
mfurun -testcase:mySecondTestcase -verbose myFullTestsuite.dll
UNIX:
cobmfurun32 -testcase:mySecondTestcase -verbose myFullTestsuite.so
The following command runs all test cases in myFullTestsuite and produces a JUnit-style report (.xml file), and also produces a core dump file for each test case that encounters an error:
Windows:
mfurun -report:junit -jit:core myFullTestsuite.dll
UNIX:
cobmfurun64 -report:junit -jit:core myFullTestsuite64.so
The following command runs all test cases in myFulltestsuite, and invokes just-in-time debugging each time a test case encounters an error. The test run continues when the debugger is closed:
Windows:
mfurun -jit:debug myFulltestsuite.dll
UNIX:
cobmfurun32 -jit:debug myFulltestsuite.so
The following command runs all test cases in myFulltestsuite, ignoring any errors encountered:
Windows:
mfurun -ignore-return-code:true myFulltestsuite.dll
UNIX:
cobmfurun32 -ignore-return-code:true myFulltestsuite.so
The following set of commands rebuild an executable program so that it can be called from a test suite. The example uses an executable and main entry point called bookmaint that also consists of a number of other program files.
The following command will generate a new main entry point (using the original entry point name) in a file named mfunit_application_entrypoint.cbl.
Windows:
mfurun -verbose -generate-app-exe-ep:bookmaint
UNIX:
cobmfurun32 -verbose -generate-app-exe-ep:bookmaint
You now need to rebuild the executable, utilizing the new entry point. The following command rebuilds the executable to include the newly-generated program and entry point:
Windows:
cbllink -Mmfunit_application_entrypoint bookmaint.cbl booklibrarian.cbl HomeBookCatalogue.cbl mfunit_application_entrypoint.cbl
UNIX:
cob32 -e mfunit_application_entrypoint -x bookmaint.cbl booklibrarian.cbl HomeBookCatalogue.cbl mfunit_application_entrypoint.cbl
A test fixture can now call into the executable to test its source code. Run it through the testing framework using the -application-exe option:
Windows:
mfurun -application-exe:bookmaint.exe tests.dll
UNIX:
cobmfurun32 -application-exe:bookmaint tests.so
To run the executable outside of the testing framework, run it as normal; none of the additional programs/entry points are used or required.
The following command tests whether a JCL job card was successfully submitted to a JES environment:
(The submission of the JCL emulates the cassub /r command.)
Windows:
mfurun -es-server-name:ESDEMO -es-use-mfcc:false -es-syscat:c:\ESDEMO\CATALOG.DAT MYJCL.JCL
UNIX:
cobmfurun32 -es-server-name:ESDEMO -es-use-mfcc:false -es-syscat:/usr/ESDEMO/CATALOG.DAT MYJCL.JCL
The following command runs the MFUT_TXTDIFF1.dll test program, which specifies the JCL job card to submit to the enterprise server region corresponding to the -es-service details.
(The submission of the JCL emulates the cassub /s command.)
Windows:
mfurun -sp -es-service:tcp:localhost:9003 -es-syscat:c:\ESMFUJCL\CATALOG.DAT MFUT_TXTDIFF1.dll
UNIX:
cobmfurun32 -sp -es-service:tcp:localhost:9003 -es-syscat:/ESMFUJCL/CATALOG.DAT MFUT_TXTDIFF1.so
The following command produces an .mfu file with the same base name as the test suite file:
Windows:
mfurun -generate-mfu myFulltestsuite.dll
UNIX:
cobmfurun32 -generate-mfu myFulltestsuite.so
The following command runs all test cases in the test fixture file:
Windows:
mfurun myFulltestsuite.mfu
UNIX:
cobmfurun32 myFulltestsuite.mfu
The following command runs all test cases in the test fixture file, but any options in the .mfu are ignored:
Windows:
mfurun -ignore-options-in-mfu:true myFulltestsuite.mfu
UNIX:
cobmfurun32 -ignore-options-in-mfu:true myFulltestsuite.mfu