...
- Use the
cpptestcli
utility, with appropriate options, to launch analysis in the command-line mode. A complete list of options is provided in cli Options. Key options are:- -config: Specifies Test Configuration.
- -resource: Specifies the resource (e.g., project, folder, file) to be tested.
- -publish: Publishes test results to DTP.
- -publishteamserver: Publishes test results to Team Server.
- -report: Generates a report.
- -localsettings: Passes advanced settings for Team Server/Parasoft Report CenterDTP/mail reporting. Options are described in Local Settings (Options) Files.
...
-config
Specifies that you want to run the Test Configuration available at%CONFIG_URL% -
This parameter is required except when importing projects.%CONFIG_URL%
.
%CONFIG_URL%
is interpreted as a URL, the name of a Test Configuration, or the path to a local file. Examples:- By filename:
-config "mylocalconfig.properties"
- By URL:
-config "http://intranet.acme.com/cpptest/team_config.properties"
- Built-in configurations:
-config "builtin://Demo Configuration"
-config "Demo Configuration"
- User-defined configurations:
-config "user://My First Configuration"
- Team configurations:
-config "team://Team Configuration"
-config "team://teamconfig.properties"
- By filename:
-help
- Displays help information. Does not run testing.Anchor localsettings %LOCALSETTINGS_FILE% localsettings %LOCALSETTINGS_FILE% -localsettings
%LOCALSETTINGS_FILE% -
Reads the options file%LOCALSETTINGS_FILE%
for global preferences. These settings specify details such as Parasoft Report Center DTP settings, email settings, and Team Server settings.
The options file is a properties file. These files can control reporting preferences (who should reports be sent to, how should those reports be labelled, what mail server and domain should be used, etc.) Team Server settings, Parasoft Report Center DTP settings, email settings, and more. For details on creating options files; see Local Settings (Options) Files.-nobuild
- Prevents C++test from rebuilding the project before testing it. Use this option if the project is already built before the test run.-fail
- Fails the build by returning a non-zero exit code if any violations are reported.-publish
- Publishes the report to DTP. You can enable sending reports to DTP in the GUI or in the command line mode; see Connecting to Development Testing Platform.-publishteamserver
- Publishes the report to the Team Server. The Team Server location can be specified in the GUI or in the options file (described in the-localsettings %LOCALSETTINGS_FILE%
entry).-report
%REPORT_FILE% -
Generates an XML report to the given file%REPORT_FILE%
and adds an HTML (or PDF or custom format—if specified using the report.format option) report with the same name (and a different extension) in the same directory.
All of the following commands will produce an HTML reportfilename.html
and an XML reportfilename.xml
.-report filename.xml
-report filename.htm
-report filename.html
If the specified path ends with an ".html"/".htm"/".xml" extension, it will be treated as a path to the report file to generate. Otherwise, it will be treated as a path to a directory where reports should be generated.
If the file name is explicitly specified in the command and a file with this name already exists in the specified location, the previous report will be overwritten. If your command doesn’t explicitly specify a file name, the existing report file will not be overwritten—the new file will be named repXXXX.html, where XXXX is a random number.
If the-report
option is not specified, reports will be generated with the default names "report.xml/html" in the current directory.-dtp.autoconfig
%PROJECT_NAME@SERVER
_NAME:port% -
Pulls settings stored on the DTP server (recommended for ease of maintenance — especially if you do not already have a locallocally stored settings file).
For example:-dtp.autoconfig
[email protected]:8080
-encodepass <plainpassword> -
Generates an encoded version of a given password. Prints the message 'Encrypted password: <encpass>' and terminates the cli application.
If your nightly process will 1) login to Team Server and b) send emails, you can use this option to encrypt the required passwords.-showdetails
- Prints detailed test progress information.
...
Setting | Purpose |
---|---|
report.associations | Specifies whether the report shows requirements, defects, tasks, and feature requests that are associated with a test. |
report.authors_details | Determines whether the report includes an overview of the number and type of tasks assigned to each developer. The default is |
report.contexts_details | Determines whether the report includes an overview of the files that were checked or executed during testing.The default is |
| Specifies the location and extension of the XSL file for a custom format. Used with For details and examples, see Configuring Reporting Settings. |
report.developer_errors=true|false | Determines whether manager reports include details about developer errors. |
report.developer_reports=true|false | Determines whether the system generates detailed reports for all developers (in addition to a summary report for managers). |
report.format=html|pdf|custom | Specifies the report format. |
report.generate_htmls=true|false | Determines whether HTML reports are generated and saved on the local file system. XML reports are generated and saved regardless of this setting’s value. The default setting is |
report.graph.cs_start_date=[MM/dd/yy] | Determines the start date for trend graphs that track static analysis tasks over a period of time. See Understanding Reports for more details on these reports. |
report.graph.ue_coverage_start_date=[MM/dd/yy] | Determines the start date for trend graphs that track coverage over a period of time. See Understanding Reports for more details on these reports. |
report.location_details=true|false | Specifies whether absolute file paths are added to XML data. This needs to be enabled on the Server installation if you want to relocate tasks upon import to desktop installations. |
report.mail.attachments=true|false | Determines whether reports are sent as attachments. All components are included as attachments; before you can view an HTML report with images, all attachments must be saved to the disk. The default setting is |
report.mail.cc=[email_addresses] | Specifies where to mail comprehensive manager reports. This setting must be followed by a semicolon-separated list of email addresses. This setting is typically used to send reports to managers or architects. It can also be used to send comprehensive reports to developers if developer reports are not sent automatically (for example, because the team is not using a supported source control system). |
report.mail.compact=trends|links | Specifies that you want to email a compact report or link rather than a complete report. If If |
report.mail.domain=[domain] | Specifies the mail domain used to send reports. |
report.mail.enabled=true|false | Determines whether reports are emailed to developers and to the additional recipients specified with the Remember that each developer that worked on project code will automatically be sent a report that contains only the errors/results related to his or her work. |
report.mail.exclude=[email_addresses] | Specifies any email addresses you do not want to receive reports. This setting is used to prevent C++test from automatically sending reports to someone that worked on the code, but should not be receiving reports. |
report.mail.exclude.developers=true|false | Specifies whether reports should be mailed to any developer whose email is not explicitly listed in the |
report.mail.format=html|ascii | Specifies the email format. |
| Specifies the "from" line of the emails sent. |
report.mail.include=[email_addresses] | Specifies the email addresses of developers that you want to receive developer reports. This setting must be followed by a semicolon-separated list of email addresses. This setting is typically used to send developer reports to developers if developer reports are not sent automatically (for example, because the team is not using a supported source control system). It overrides developers specified in the 'exclude' list. |
report.mail.on.error.only=true|false | Determines whether reports are sent to the manager only if an error is found or a fatal exception occurs. Developer emails are not affected by this setting; developer emails are sent only to developers who are responsible for reported errors. The default setting is |
report.mail.server=[server] | Specifies the mail server used to send reports. |
report.mail.subject=My New Subject | Specifies the subject line of the emails sent. The default subject line is "C++test Report." For example, if you want to change the subject line to "C++test Report for Project A", you would use |
report.mail.time_delay=[server] | Specifies a time delay between emailing reports (to avoid bulk email restrictions). |
| Specifies where to mail reports for errors assigned to "unknown". |
| Specifies the settings for SMTP server authentication. The |
report.active_rules=true|false | Determines if C++test reports contain a list of the rules that were enabled for the test. |
report.suppressed_msgs=true|false | Determines whether reports include suppressed messages. |
session.tag=[name] | Specifies a session tag used to label these results. This value is used for uploading summary results to Team Server. The tag is an identifier of the module checked during the analysis process. Reports for different modules should be marked with different tags. |
report.ue_coverage_details_htmls=[coverage_type] | Determines whether a test's HTML report links to another report that includes source code annotated with line-by-line coverage details. The following values can be used for LC - for line coverage SC - for statement coverage BCC - for block coverage DC - for decision coverage SCC - for simple condition coverage MCDC - for MC/DC coverage CC - for Call Coverage |
report.metrics_details=true|false | Determines whether an XML report with metrics summary information (as well as individual class and method detail data where applicable) is produced. This report will be generated only when a metricsenabled Test Configuration is run. |
Parasoft
...
DTP/
...
Project Center Settings
Setting | Purpose |
---|---|
dtp.enabled=true|false | Determines whether the current C++test installation is connected to ConcertoDTP. This setting is not needed if you want to use the value specified in the GUI. |
concerto.reporting=true|false | Determines whether the current C++test installation is connected to Parasoft Report Project Center. This setting is not needed if you want to use the value specified in the GUI. |
dtp.autoconfig=true|false | Enables autoconfiguration with Parasoft Test C++test settings stored on the Concerto DTP server |
dtp.server=[server] | Specifies the host name of the Parasoft Concerto DTP server. This setting is not needed if this information is specified in the GUI. |
concerto.data.port=[port] | Specifies the Parasoft Report Project Center port. This setting is not needed if you want to use the value specified in the GUI. |
dtp.port=[port] | Specifies the Parasoft Concerto server portthe port number of the DTP server. This setting is not needed if you want to use the value specified in the GUI. |
concerto.user_defined_attributes=[attributes] | Specifies the user-defined attributes for Parasoft Report Project Center. Use the format For more details on attributes, see Connecting to Parasoft Report Center and Project Center. This setting is not needed if you want to use the value specified in the GUI. |
concerto.log_as_nightly=true|false | Determines whether the results sent to Parasoft Report Project Center are marked as being from a nightly build. |
concerto.use_resource_attributes=true|false | Determines whether Parasoft Report Project Center attributes specified in the GUI at the project level should be used. This allows you to disable projectlevel project level Parasoft Report Project Center attributes. |
dtp.project=[project_name] | Specifies the name of the Concerto DTP project that you want these results linked to. For more details on general projects, see the Connecting to Parasoft Report Center and Project Center. |
Team Server Settings
Setting | Purpose |
---|---|
tcm.server.enabled=true|false | Determines whether the current C++test installation is connected to the Team Server. This setting is not needed if you want to use the value specified in the GUI. |
tcm.server.name=[name] | Specifies the machine name or IP address of the machine running Team Server. This setting is not needed if you want to use the value specified in the GUI. |
tcm.server.port=[port] | Specifies the Team Server port number. This setting is not needed if you want to use the value specified in the GUI. |
| Determines whether username and password are submitted to connect to Team Server. Usernames/passwords are not always needed; it depends on your team’s setup. If the first setting is Note that Team Server must have the username and password setting already enabled before these settings can be used. |
...
Setting | Purpose |
---|---|
techsupport.auto_creation=true|false | Determines whether archives are automatically prepared when testing problems occur. |
techsupport.send_email=true|false | Determines whether prepared archives are emailed to Parasoft support. If you enable this, be sure to specify email settings from the GUI or with the options in Reporting Settings. |
techsupport.archive_location=[directory] | Specifies where archives are stored. |
techsupport.verbose=true|false | Determines whether verbose logs are included in the archive. Note that this option cannot be enabled if the logging system has custom configurations.
|
techsupport.verbose.scontrol=true|false | Determines whether verbose logs include output from source control commands. Note that the output could include fragments of your source code. |
techsupport.item.general=true|false | Determines whether general application logs are included. |
techsupport.item.environment=true|false | Determines whether environment variables, JVM system properties, platform details, additional properties (memory, other) are included in the archive. |
techsupport.advanced=true|false | Specifies if advanced options will be sent. |
techsupport.advanced.options=[option] | Specifies any advanced options that the support team asked you to enter. |
techsupport.dtp.engine=true|false | Specifies if additional data generated during analysis will be sent. |
Authorship/Scope Settings
...
Code Block |
---|
# Team Server settings tcm.server.enabled=true tcm.server.name=teamserver.mycompany.com tcm.server.port=18888 tcm.server.accountLogin=true tcm.server.username=tcm_user tcm.server.password=tcm_pass # Parasoft ReportDTP Center settings concerto.reporting=true dtp.server=concertodtp.mycompany.com dtp.port=32323 # Mail settings report.mail.enabled=true report.mail.server=mail.mycompany.com report.mail.domain=mycompany.com report.mail.cc=project_manager report.mail.subject=Coding Standards concerto.log_as_nightly=true |
...
The following variables can be used in reports, e-mail, Parasoft Report CenterDTP, Team Server, and license settings. Note that session tag value can't contain any ':' characters.
...
Code Block |
---|
# REPORTS #Determines whether reports are emailed to developers and to the additional recipients specified with the cc setting. #Remember that if the team is using CVS for source control and each developer's email address matches his or her CVS username + the mail domain, each developer that worked on project code will automatically be sent a report that contains only the errors/results related to his or her work. report.mail.enabled=true #Exclude developers emails (true/false) report.mail.exclude.developers=false # Append developers errors to manager emails (true/false) report.developer_errors=true # Send reports to developers (true|false) report.developer_reports=true # Append suppressed messages (true|false) report.suppressed_msgs=false#Determines where to mail complete test reports. #This setting is typically used to send reports to managers or architects. #It can also be used to send reports to developers if developer reports #are not sent automatically (for example, because the team is not using CVS). [email protected]; ${env_var:USERNAME} @domain.com # mail target for unknown developer errors [email protected] #Specifies the mail server used to send reports. report.mail.server=mail_server.domain.com #Specifies the mail domain used to send reports. report.mail.domain=domain.com #Specify mali from report.mail.from=nightly #Specifies any email addresses you do not want to receive reports. #This setting is used to prevent from automatically sending reports to someone that worked on the code, but should not be receiving reports. This setting is only applicable if the team is using CVS for source control and developer reports are being sent automatically. report.mail.exclude=developer1;developer2 # Specifies the subject line of the emails sent. report.mail.subject= ${tool_name} Report - ${config_name} # Report test params include (true|false) report.test_params=true # Team Server #Determines whether the current installation is connected to the Team Server. tcm.server.enabled=true #Specifies the machine name or IP address of the machine running Team Server. tcm.server.name=team_server.domain.com #Specifies the Team Server port number. tcm.server.port=18888 tcm.server.accountLogin=true tcm.server.username=user tcm.server.password=password session.tag= ${config_name} # Parasoft ReportProject Center #Determines if the current installation is connected to Parasoft ReportProject Center. concerto.reporting=true #Specifies the host name of the Parasoft Report CenterDTP server. dtp.server=grs_server.domain.com # Specifies the port number of the Parasoft ReportProject Center report collector. concerto.data.port=32323 # Specifies user-defined attributes for Parasoft ReportProject Center. #Use the format key1:value1; key2:value2 #Attributes help you mark results in ways that are meaningful to your organization. #They also determine how results are grouped in Parasoft ReportProject Center and how you can filter results in Parasoft ReportProject Center. #For example, you might want to label results by project name and/or by project component name. #Each attribute contains two components: a general attribute category name #and a specific identification value. For example, assume your organization wants to classify results by project. #You might then use the attribute project:projname1. For the next project, you could use a different #local settings file that specified an attribute such as project:projname2. concerto.user_defined_attributes=Type:Nightly;Project:Project1 # Determines whether the results sent to Parasoft ReportProject Center are marked as being from a nightly build. concerto.log_as_nightly=true # SCOPE #code authorship based on CVS scope.sourcecontrol=true #code authorship based on author tag scope.author=false #code authorship based on local user scope.local=false # LICENSE #override license settings #cpptest.license.autoconf.timeout=40 cpptest.license.use_network=true cpptest.license.network.host=license_server.domain.com cpptest.license.network.port=2222 cpptest.license.network.edition=server_edition # SOURCE CONTROL scontrol.rep1.type=cvs scontrol.rep1.cvs.root=:pserver:developer@cvs_server.domain.com:/home/cvs/ scontrol.rep1.cvs.pass=mypassword |
...