Compiling Tests

Restriction: Compiled fixture files with the base name mfunit will not run within the Micro Focus Unit Testing Framework.

The COBOL program that contains your test case(s) must be compiled to one of the executable formats: .so .int, or .gnt.

cob -z -e "" mytestfixture.cbl
cob -e "" mytestfixture.cbl

Once it is compiled, you must run the resulting file from the shell.

Procedural managed code

You must compile the procedural managed COBOL programs as .dll using the JVMGEN (sub) Compiler directive. For example:

UNIX:

mkdir bin
cob -j myunittest.cbl -C 'jvmgen(sub)' -C 'iloutput(bin)'
cobmfjarprogmap -directory bin
jar -cvf myunittest.jar -C bin .
cobmfurunj myunittest.jar