Previous Topic Next topic Print topic


To create test coverage reports

Note: This facility is supported in native COBOL only.
  1. Locate the .tcz file in the location specified in your .tcf file.
  2. From a command prompt, enter:
    Windows:
    tcreport filename [NO]options
    UNIX:
    cobtcreport filename [NO]options

    where:

    • filename is one of the following:
      • One or more .tcz files, separated by a comma. For example:
        Windows:
        tcreport file1.tcz,file2.tcz,file3.tcz... [NO]options
        UNIX:
        cobtcreport file1.tcz,file2.tcz,file3.tcz... [NO]options
      • Or a text file, filelist.txt, containing a list of all .tcz files to be reported on.

        You can use either a space, a comma or new lines as separators for the .tcz files in filelist.txt.

        The file must be referenced using @ as follows:

        Windows:
        tcreport @filelist.txt [NO]options
        UNIX:
        cobtcreport @filelist.txt [NO]options
    • options are shown below. Many of the options can be prepended with no, which means the option will not be acted upon. Options are all off by default, unless otherwise stated. They can be specified in any order. None is mutually exclusive.
      [no]blocknum Displays the basic block number of each statement in the rightmost column. Blocks can be thought of as a number of contiguous statements with no jumps. They are executed consecutively. Lines within a block will have the same basic block number. There is a limit of 65535 basic blocks per program.
      [no]browse Opens your browser with the report file in HTML format.
      [no]calls Gives a summary of CALLed subroutines. Called subprograms are listed alphabetically. The CALL overhead in COBOL can be considerable, and this lets users identify the most commonly called routines.
      [no]combine Produces a single text and/or HTML file, instead of individual ones on a per program basis.
      [no]datafreq Computes the total execution count for each data item in the program. ie. it totals the execution counts for all statements in which a data item is referenced. This report also identifies misaligned 2-, 3- or 4-byte items.
      [no]echo Echoes output to the console.
      [no]html Creates the output in HTML format. If you do not specify an output format, HTML is on by default: use [no]html if you do not want an .htm output file.
      [no]leftcol Displays the columns for counts and block numbers on the left of the report.
      reportloc(location) Creates the report in the folder specified by location.
      rootname(rootname) Creates reports with a name prepended with rootname.
      [no]source Produces a listing of the program source, showing execution counts for every statement. This option is on by default. Both the .idy and .cbl source file need to be present for the execution counts to tally correctly.
      taglines(tagfile) Specifies the tag file, which identifies tags in your source code for which you want the report to generate specific information.
      text Creates the output in text format, with a .txt extension.
      [no]verbs Gives a summary of COBOL verbs used. Verbs are listed in descending order of execution. The columns used are:
      • occurs - which shows the number of occurrences of that verb in a program
      • coverage - which shows the number of this type of statement that were covered, and what percentage of these verbs it represents
      • executed - which is the total of all the execution counts for this type of statement, and the percentage of the program's total execution count this represents
  3. Open the resulting index file to view the tcindex.txt or .htm file.

If you want to simply list the programs in your .tcz file, without looking at the report file, from a command prompt enter:

Windows:
#tcscan filename
UNIX:
cobtcscan filename

where filename is the name of your .tcz file.

Previous Topic Next topic Print topic