Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space CPPTDESKDEV and version 10.4.2

...

The command line mode requires a command line interface license (available with C++test Server Automation Edition).

Info
titleExtended Command Line Mode vs. Desktop Command Line Mode

There are two command line interface licenses available for C++test:

  1. Extended Command Line Mode is provided in Server Automation Edition and Server Edition IT, and available for Custom Editions.
  2. Desktop Command Line Mode is available for Custom Editions. The Desktop Command Line Mode provides similar functionality to the Extended Command Line Mode, except that parallel processing is limited to simultaneously executing 8 parallel threads for a given task (e.g. static analysis) in the Desktop Command Line Mode.
  • To access the full functionality available with the Server Automation Edition, you also need to install and configure Parasoft Team Server. 
  • We strongly recommend that you configure C++test preferences (for Team Server, task assignment, reporting, etc.) and team Test Configurations as described in the Configuration before you start testing.
  • For command line execution, you will need to ensure that the installation directory is on the path, or launch cpptest with the full path to the executable (for example, c:\parasoft\c++test\cpptestcli.exe).Before you can test code with C++test, it must be added to an Eclipse C/C++ project. For instructions on creating a new project, see Creating a Project.

...

Parasoft C++test has two user modes: interactive desktop usage in the GUI and command line mode via the command line interface (CLI). The CLI interface is a standard feature of the Server Automation Edition. 

CLI mode is typically used to perform regular or continuous code analysis and test in conjunction with regular/continuous builds or as a part of an automatic regression test infrastructure. C++test CLI can be invokedon the specified project resourcesAs part of the CLI execution, C++test can perform one or more of the following:

...

  • License: Specify the license or License Sever settings.
  • Team: Check Enable Team Server. If Team Server is not autodetected, enter the Team Server’s IP address in Server Information> Host Name. If you are running Team Server on the same machine as your Server Edition productC/C++test, enter localhost . Unless you changed the Team Server default port (18888) when it was installed, do not change the port here. Click Test Connection to verify the correct settings.
  • Source Controls: These settings enable automatic mapping of the tool results to the individuals who last changed the affected code or test artifact. Check your source control system, and use the instructions in Connecting to Source Control to set the options appropriate for your SCM.
  • Scope and Authorship: Check the appropriate options for your environment as described in Configuring Task Assignment and Code Authorship Settings.
  • Reports: The following options are enabled by default and are a good starting point:

    • Detailed report for developers (includes task breakdown with details).

    • Overview of tasks by authors (summary table).

    • Generate formatted reports in command line mode.

    • Suppressions Details (applies to static analysis only).

  • E-mails: Enter settings that will be used to send emails with reports. This needs to be an existing email account on an email server accessible from the C++test test machine.

  • Reports> Email Notifications:

    • If desired, enable Send Reports by Email. Regardless of this setting, reports will always be uploaded to Parasoft Team Server for later viewing (controlled by the CLI option). Email distribution will use the settings for E-mails above.

    • Manager reports contain a rollup of all test results generated by C++test Developer reports contain only results for individual developers. Enable options and specify email addresses accordingly.

...

  • -config %CONFIG_URL% - Specifies that you want to run the Test Configuration available at %CONFIG_URL%.
     
    This parameter is required except when importing projects. %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"
  • -helpDisplays 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 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 DTP settings, email settings, and more. For details on creating options files; see Local Settings (Options) Files.
  • -nobuildPrevents C++test from rebuilding the project before testing it. Use this option if the project is already built before the test run.
  • -failFails 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 PlatformDTP.
  • -publishteamserverPublishes 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 report filename.html and an XML report filename.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.

  • -showdetailsPrints detailed test progress information.
  • -buildscript %SCRIPT_FILE% - Executes the specified build script prior to any testing. See Using the cli with an Eclipse-Based Builder.

...

  • -appconsole stdout|% OUTPUT_FILE%Redirects C++test's console output to standard output or an %OUTPUT_FILE% file. 
    Examples:
    -appconsole stdout (console redirected to the standard output)
    -appconsole console.out (console redirected to console.out file)
  • -list-compilersPrints a list of valid compiler family values. 

  • -list-configs - Prints a list of valid Test Configuration values. 

  • -include %PATTERN%, -exclude %PATTERN% - Specifies files to be included/excluded during testing. 
    You must specify a file name or path after this option.
    Patterns specify file names, with the wildcards *and ? accepted, and the special wildcard ** used to specify one or more path name segments. Syntax for the patterns is similar to that of Ant filesets.
    Examples:
    -include **/Bank.cpp (test Bank.cpp files)

    -include **/ATM/Bank/*.cpp (test all .cpp files in folder ATM/Bank)

    -include c:/ATM/Bank/Bank.cpp (test only the c:/ATM/Bank/Bank.cpp file)

    -exclude **/internal/** (test everything except classes that have path with folder "internal")

    -exclude **/*Test.cpp (test everything, but files that end with Test.cpp)

    Additionally if a pattern is a file with a .lst extension, it is treated as a file with a list of patterns.
    For example, if you use -include c:/include.lst and include.lst contains the following (each line is treated as single pattern):
    **/Bank.cpp

    **/ATM/Bank/*.cpp

    c:/ATM/Bank/Bank.cpp

    then it has same effect as specifying:
    -include **/Bank.cpp -include **/ATM/Bank/*.cpp

    -include c:/ATM/Bank/Bank.cpp"

...


Options for Importing and Creating Projects

...

SettingPurpose
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 true.

report.contexts_details

Determines whether the report includes an overview of the files that were checked or executed during testing.The default is false.

report.custom.extension
report.custom.xsl.file

Specifies the location and extension of the XSL file for a custom format. Used with report.format=custom

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|customSpecifies 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 true.

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 See Understanding Reports for more details on these reports.

report.graph.ue_coverage_start_date=[MM/dd/yy]
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 false.

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 trends is used, the email contains a trend graphs, summary tables, and other compact data; detailed data is not included.

If links is used, the email contains only a link to a report (which is available on Team Server)

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 cc setting.

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.cc property. This setting is used to prevent reports from being mailed to individual developers.

report.mail.format=html|asciiSpecifies the email format.

report.mail.from=[email_address OR
user_name_of_the_same_domain]

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 false.

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.subject=C++test Report for Project A

report.mail.time_delay=[server]

Specifies a time delay between emailing reports (to avoid bulk email restrictions).

report.mail.unknown=[email_address OR
user_name_of_the_same_domain]

Specifies where to mail reports for errors assigned to "unknown".

report.mail.username=[username]
report.mail.password=[password]
report.mail.realm=[realm]

Specifies the settings for SMTP server authentication.

The realm value is required only for those servers that authenticate using SASL realm.

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.
The default setting is false.

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 [coverage_type]:
FC - for function coverage

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.

...

SettingPurpose
dtp.enabled=true|false

Determines whether the current C++test installation is connected to DTP. 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 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 C++test settings stored on the DTP server

dtp.server=[server]

Specifies the host name of the DTP server. This setting is not needed if this information is specified in the GUI.

concerto.data.port=[port]

Specifies the Parasoft Project Center port. This setting is not needed if you want to use the value specified in the GUI.

dtp.port=[port]

Specifies the 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 Project Center.

Use the format key1:value1; key2:value2

For more details on attributes, see Connecting to 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 Project Center are marked as being from a nightly build.

concerto.use_resource_attributes=true|false

Determines whether Parasoft Project Center attributes specified in the GUI at the project level should be used. This allows you to disable project level Parasoft Project Center attributes.

dtp.project=[project_name]

Specifies the name of the DTP project that you want these results linked to.

...

Licensing Settings


SettingPurpose
1

cpptest.license.use_network=true|false

Determines whether the current C++test installation retrieves its license from LicenseServer. This setting is not needed if you want to use the value specified in the GUI.

Example: cpptest.license.use_network=tru

2

cpptest.license.network.host=[host]

Specifies the machine name or IP address of the machine running LicenseServer Configuration Manager. This setting is not needed if you want to use the value specified in the GUI.

Example: cpptest.license.network.host=10.9.1.63

3

cpptest.license.network.port=[port]

Specifies the LicenseServer port number. This setting is not needed if you want to use the value specified in the GUI.

Example: cpptest.license.network.port=2222

4

cpptest.license.network.edition=[edition_name]

Specifies the type of license that you want this C++test installation to retrieve from LicenseServer. This setting is not needed if you want to use the value specified in the GUI.

[edition_name] can be serverautomation_edition. To use a custom edition, do not set anything after the "="; simply leaving the value empty.

Example: cpptest.license.network.edition=cpptest.license.network.edition=serverautomation_edition

5

cpptest.license.autoconf.timeout=[seconds]

Specifies the maximum number of seconds C++test will wait for the license to be automatically configured from LicenseServer. Default is 10.

6

cpptest.license.local.expiration=[expiration]

Specifies the local license that you want this C++test installation to use. This setting is not needed if you want to use the value specified in the GUI.

7

cpptest.license.local.password=[password]

Specifies the local password that you want this C++test installation to use. This setting is not needed if you want to use the value specified in the GUI.

8

cpptest.license.wait.for.tokens.time=[time in minutes]

Specifies the time that C++test will wait for a license if a license is not currently available.

For example to make C++test wait 3 minutes for license tokens, use cpptest.wait.for.tokens.time=3.

...

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 Project Center
#Determines if the current installation is connected to Parasoft Project Center.
concerto.reporting=true
#Specifies the host name of the Parasoft DTP server.
dtp.server=grs_server.domain.com
# Specifies the port number of the Parasoft Project Center report collector.
concerto.data.port=32323
# Specifies user-defined attributes for Parasoft Project 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 Project Center and how you can filter results in Parasoft Project 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 Project 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=serverautomation_edition
# SOURCE CONTROL
scontrol.rep1.type=cvs
scontrol.rep1.cvs.root=:pserver:developer@cvs_server.domain.com:/home/cvs/
scontrol.rep1.cvs.pass=mypassword

...