If you are using Test Coverage from the command prompt, you need to use it with a configuration file. An example test coverage configuration file, default.tcf, is supplied in %ProgramFiles(x86)%\Micro Focus\Visual COBOL\etc (Windows) or $COBDIR/etc (UNIX). You can edit this or use it as is.
The configuration is a text file that has the format:
[TESTCOVER] ; comment RESULT filename.tcz [ACCUMULATE] ECHOLOG [YES|NO] LOGNAME [filename]
If you omit ACCUMULATE, on each run test coverage overwrites filename.tcz, unless you use the variable version of filename.tcz (see below).
filename.tcz can include the following:
RESULT tcresult.tcz
creates the results file tcresult.tcz in the current folder, while
RESULT ./results/tcresult.tcz
creates the results file tcresult.tcz in the folder results, which will be created below the current folder.
In this case, the filename should be specified in the form str????.tcz, where str can be any appropriate string. Test coverage then looks for files which match the wildcard string str????.tcz. It then takes the highest numeric value found in the wildcard character positions, increments that value, and uses this as the filename to which to write results.
For example, if you specify the filename as x????.tcz, and the files x0001.tcz and x0002.tcz already exist, then test coverage automatically creates x0003.tcz.
The number generated has as many digits as there are wild cards. For example x??.ccz generates x01.ccz, x02.ccz, and so on.
Using a variable filename enables you to create separate results files for multiple runs of test coverage, without needing to change the configuration file for each run.
RESULT myres_<pid>.tcz
creates the results file myres_2749.tcz, assuming a process id of 2749.
If you do not specify an option, or the keyword is omitted, the default is YES.
Use ECHOLOG NO if your application might have problems accessing the screen; for example, during debugging.
The filename specified for the LOGNAME keyword can include the token <pid>. See the description of the RESULT keyword for more information on this token.
We recommend that a configuration file should contain at least the following:
[TESTCOVER] ECHOLOG NO RESULT filename.tcz ACCUMULATE
Test coverage accumulates all results in the tcresult.tcz, located in the folder results relative to the current folder.
As the ACCUMLATE verb has been omitted, test coverage stores its results in the file tcresult.tcz, which will be overwritten on each run.
RESULT run????.tcz
Separate results files are used for each run. In this example, on the first run, test coverage would create the results file run0001.tcz. On the second run, test coverage would create the results file run0002.tcz. The number would increment for each additional run.