| |
|
|
Part V
Command Line Tools
Chapter 27 cmreport - Code Coverage Report Generation
Syntax: cmreport -m <csmes_file> -s <selection> ...
Where:
-
-m <argument> | --csmes=<argument>
- CSMes file name
- -l <argument> | --level=<argument>
- Code coverage level
- -s <argument> | --select=<argument>
- Select executions using regular expression
- -d <argument> | --deselect=<argument>
- Deselect executions using regular expression
- --deselect-to-check
- Deselect all executions which status are to check manually
- --select-passed
- Select all executions which status are passed
- --deselect-passed
- Deselect all executions which status are passed
- --select-failed
- Select all executions which status are failed
- --deselect-failed
- Deselect all executions which status are failed
- --select-unknown
- Select all executions which status are unknown
- --deselect-unknown
- Deselect all executions which status are unknown
- -h <argument> | --html=<argument>
- Browsable HTML report output file name
- --html-single=<argument>
- HTML report output file name (single file)
- -t <argument> | --text=<argument>
- Text report output file name
- --stat
- Print global coverage statistics on the standard output
- -x <argument> | --xml=<argument>
- XML report output file name
- --csv-method=<argument>
- Generate a CSV report file for each method
- --csv-function=<argument>
- Generate a CSV report file for each file
- --emma=<argument>
- Generate an EMMA-XML report
- -j <argument> | --junit=<argument>
- Generate an JUnit report
- --executions-reference-from-csmes=<argument>
- Select all executions present in the specified CSMes file.
- -mr <argument> | --csmes-reference=<argument>
- CSMes reference file name. When specified, the report is generated compares two software releases together.
- --release-comparison=<argument>
- Comparison mode when comparing two software releases together. Possible values:
-
none
- Only displaying the differences between two software released.
- modified_functions
- Code coverage only on modified functions.
- unmodified_functions
- Code coverage only on identical functions.
- --source-type=<argument>
- Source type used for the analysis. Possible values:
-
preprocessed
- the preprocessed code is analyzed.
- original
- the original source code written by the used is analyzed.
The contains of C macros are ignored inthis mode
- -sr <argument> | --select-reference=<argument>
- Select reference executions using regular expression. This option activates the comparison of executions together.
- -dd <argument> | --deselect-reference=<argument>
- Deselect reference executions using regular expression. This option activates the comparison of executions together.
- --deselect-to-check-reference
- Deselect all reference executions which status are to check manually
- --select-passed-reference
- Select all reference executions which status are passed
- --deselect-passed-reference
- Deselect all reference executions which status are passed
- --select-failed-reference
- Select all reference executions which status are failed
- --deselect-failed-reference
- Deselect all reference executions which status are failed
- --select-unknown-reference
- Select all reference executions which status are unknown
- --deselect-unknown-reference
- Deselect all reference executions which status are unknown
Specific options for EMMA-XML output:
-
--emma-source-pattern=<argument>
- Source file pattern for EMMA-XML reports
- --emma-package-pattern=<argument>
- Package name pattern for EMMA-XML reports
The patterns have following format:
-
%f
- file name (without path)
- %b
- file name without path and extension
- %e
- file extension
- %p
- file path (without file name)
- %P
- absolute file path (without file name)
For Jenkins-CI users, it is not recommended to set these parameters. The default values are chosen to work with the EMMA-XML plugin. Specific options for HTML/XML output:
-
--execution-level=<argument>
- Code coverage level for executions
- --method-level=<argument>
- Code coverage level for methods
- --css=<argument>
- CSS style sheet
- --icon=<argument>
- Icon
- --title=<argument>
- Title
- --global=<argument>
- Global statistics, values=
all, selected or selected_and_first
- --method=<argument>
- Method statistics, values=
all, selected or selected_and_first
- --execution=<argument>
- Execution statistics, values=
all, selected or selected_and_first
- --source=<argument>
- Source file statistics, values=
all, selected or selected_and_first
- --method-sort=<argument>
- Method sorting, values=
name or coverage
- --execution-sort=<argument>
- Execution sorting, values=
name or coverage
- --source-sort=<argument>
- Source file sorting, values=
name or coverage
- --global-watermark-low-medium=<argument>
- Global watermark setting
- --global-watermark-medium-high=<argument>
- Global watermark setting
- --source-watermark-low-medium=<argument>
- Source watermark setting
- --source-watermark-medium-high=<argument>
- Source watermark setting
- --method-watermark-low-medium=<argument>
- Method watermark setting
- --method-watermark-medium-high=<argument>
- Method watermark setting
- --execution-watermark-low-medium=<argument>
- Execution watermark setting
- --execution-watermark-medium-high=<argument>
- Execution watermark setting
- --source-sublevels=<argument>
- Maximum number of intermediate levels for sources
- --execution-sublevels=<argument>
- Maximum number of intermediate levels for executions
- --global-sublevels=<argument>
- Maximum number of intermediate levels for global statistics
- --method-sublevels=<argument>
- Maximum number of intermediate levels for methods
- --source-filter-min=<argument>
- Filtering out source files according the statistic
- --source-filter-max=<argument>
- Filtering out source files according the statistic
- --method-filter-min=<argument>
- Filtering out methods according the statistic
- --method-filter-max=<argument>
- Filtering out methods according the statistic
- --execution-filter-min=<argument>
- Filtering out executions according the statistic
- --execution-filter-max=<argument>
- Filtering out executions according the statistic
- --coverage-branch-mixed-line
- Code coverage on branch level only and line coverage for non-instrumented lines
- --coverage-condition-mixed-line
- Code coverage at decision/condition level and line coverage for non-instrumented lines
- -b | --coverage-branch
- Code coverage on branch level only
- --coverage-condition
- Code coverage at decision/condition level
- --line-coverage
- Line coverage analysis
- --function-coverage
- Function coverage analysis
- -t | --test-coverage
- Test count mode
- -D | --debug
- Debug flag
- --toc
- Table of contents
- --manually-validated
- Manually validated code fragments
- --unexecuted
- Unexecuted code fragments
- --dead-code
- Dead code fragments
- --executed
- Executed code fragments
- --bargraph
- Coverage data displayed in a bargraph
Specific options for text output:
-
--format-executed=<argument>
- Line format for the executed for code fragments
- --format-unexecuted=<argument>
- Line format for the unexecuted for code fragments
- --format-dead-code=<argument>
- Line format for dead code fragments
Following keywords are substituted:
-
%f
- Source code file name
- %l
- Line number
- %c
- Column number
- %m
- Explanation
It is allowed to to set the output file to an empty string (i.e.: --text=), in this case the standard output of the console is used.
Specific options for CSV output:
-
--csv-field-separator=<argument>
- Field separator for a CSV file
- --csv-coma=<argument>
- Coma (
, or .) used for floats in a CSV file
cmreport is a utility which permits to generate Text, HTML XML or CSV reports from an instrumentation data base (.csmes file).
It generates exactly the same reports as these generated by CoverageBrowser (see chap. export-statistics). Chapter 28 cmcsexeimport - Command Line Import Utility
Syntax: cmcsexeimport -m <csmes_file> -e <csexe_file> -t <title> [-p <policy>]
Where:
-
-m <argument>|--csmes=<argument>
- CSMes file name
- -e <argument>|--csexe=<argument>
- CSExe file name
- -t <argument>|--title=<argument>
- Execution title
- -p <argument>|--policy=<argument>
- Import policy (
ignore_duplicates, import_duplicates_and_empty, import_duplicates or merge)
- -d|--delete
- Delete the imported file after processing it.
- -P|--passed
- Execution marked as passed.
- -F|--failed
- Execution marked as failed.
- -C|--check-manually
- Execution marked as to be checked manually.
cmcsexeimport is a utility which permits to import an execution report (.csexe file) into an instrumentation data base (.csmes file).
It behaves exactly like CoverageBrowser load of execution report function (see chap. load-execution-report). Chapter 29 cmmerge - Merging Utility
Syntax: cmmerge -o <output_file> <input_file> ... <input_file>
Where:
-
-o <argument>|--output=<argument>
- CSMes output file
- -a|--append
- Do not create new output file but merge into an existing CSMes file.
- -v|--verbose
- Verbose output
- -i <argument>|--instrumentation-and-execution=<argument>
- Merge only instrumentations and executions present in the reference file (for importing unittests)
cmmerge is a small utility which permits to merge several instrumentation databases (.csmes file) together.
It behaves exactly like CoverageBrowser merge function (see chap. mergedatabase). Chapter 30 cocolic - License Activation
Syntax: cocolic <arguments>
Where:
-
--fetch-license-key=<argument>
- Retrieve a license key using a product code.
- --no-proxy
- Disabling proxy server usage.
- --http-proxy=<server>:<port>
- Retrieve a license key using the HTTP proxy server
<server> (port <port>)
- --socks5-proxy=<server>:<port>
- Retrieve a license key using the SOCKS5 proxy server
<server> (port <port>)
- --proxy-user=<argument>
- Proxy user identification.
- --proxy-password=<argument>
- Proxy user password.
- --license-key=<argument>
- Set a license key directly.
- --machine-identifier
- Display the machine identifier.
cocolic can be use to activate Squish Coco on a computer without graphical interface available.
|
|
|