Use the following syntax from the
Visual COBOL command line or
shell prompt to run a test suite.
At the prompt, enter:
test-runner [options] [test-suite]
where:
- test-runner
-
The name of the executable that will run the test suite, and then produce the test results
. It can be one of:
- mfurun
(Windows) - for use with procedural COBOL
- mfurunil
(Windows) - for use with .NET COBOL
- mfurunj
(Windows) - for use with JVM COBOL
- cobmfurun32[_t](UNIX) - for use with procedural COBOL
- cobmfurun64[_t]
(UNIX) - for use with procedural COBOL
- cobmfurunj
(UNIX) - for use with JVM COBOL
The optional _t runs the test suite in the multi-threaded run-time system.
- options
-
The options that apply to the test run. These are optional, and you can apply one or more of the following:
- -testcase:testcase-name
- Only run the specified test case from the test suite; all other test cases are skipped. Not set by default.
Alternatively, you can specify multiple test cases using one of the following approaches:
- List the test cases using comma as a separator:
-testcase:testcase-name1,testcase-name2,... everything.dll
Or:
- Specify a side file that includes a list of test cases:
-testcase:@filelist.txt everything.dll
Where:
- everything.dll - all your source code compiled
- filelist.txt - the file that includes all test cases to execute
- -ignore-return-code:{true|false}
- When set to true, the return-code indicating a test pass or fail is ignored, and the test continues running. The default is
false.
- -verbose:{true|false}
- Displays verbose output to the screen. The default is
true.
- -process:{single|separate}
- Use a single process for the entire test run, or multiple separate processes (one for the test runner and one for each test case within the run). If you are using separate processes, the parent test runner process can log errors and continue with the test run in the event of a test case failure. The default is
separate.
- -isolate:{true|false}
- Isolates each test case, so that any resources shared between test cases start from their correct initial state for each test case. The default is
true.
- -report{printfile|noprintfile|junit|nojunit|}...
- Outputs the test results to a
.txt file (printfile option) or
.xml file (junit option). The default is to produce a
.txt file.
- -report:markdown
- Outputs the test results to a github style markdown format file (.md).
Note: You can use various external utilities such as the pandoc utility (see http://pandoc.org/) to convert the markdown file into an
.html or a
.pdf file. Here are some example commands for converting the
.md file when you use pandoc:
pandoc -thtml5 -s -S --toc -c pandoc.css -fmarkdown_github mfumeta.md -o mfumeta.html
Or
pandoc -s -S --toc -c pandoc.css -fmarkdown_github mfumeta.md -o mfumeta.pdf
- -reportfile:filename
- Changes the name of the
.txt report file. It defaults to
<test suite-name>-report.txt.
- -junit-packname:package-name
- Packages the JUnit formatted
.xml files under
package-name. Not set by default.
- -outdir:directory
- Specifies a directory for the reports. If not specified, the reports are created in the directory in which the tests were run.
- -jenkins-ci
- Enables support for producing test results that will be used on a Jenkins CI server.
- -jenkins-ci:junit-attachments
- Enables support for producing test results that will be used on a Jenkins CI server, and also enables the Jenkins plugin for JUnit formatted results.
- -jit:{core|debug}
- Produces a core dump file or invokes just-in-time debugging when a test case errors.
Note: This option has no effect when asserting a test failure.
- -generate-mfu
filename
- Produces a skeleton test fixture file (.mfu file) from the test cases within
filename (a
.dll file or
.so file).
-
Note: An
.mfu file of the same name must not already exist; otherwise the new
.mfu file will not be created.
- test-suite
- A COBOL program compiled to
.dll(Windows) or
.so
(UNIX), or an
.mfu batch file.