...
cpptestcli -solution "c:\MySolution" -resource "ProjectToTest" -config builtin://ShouldHaveRules -publish publishteamserver -localsettings acme_policy.settings
...
- 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 Center/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 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 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.-concerto.autoconfig
%PROJECT_NAME@SERVER
_NAME:port% -
Pulls settings stored on the Concerto server (recommended for ease of maintenance — especially if you do not already have a locallystored localsettings file).
For example:-concerto.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 |
---|---|
concerto.enabled=true|false | Determines whether the current C++test installation is connected to Concerto. 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 Center. This setting is not needed if you want to use the value specified in the GUI. |
concerto.autoconfig=true|false | Enables autoconfiguration with Parasoft Test settings stored on the Concerto server |
concerto.server=[server] | Specifies the host name of the Parasoft Concerto server. This setting is not needed if this information is specified in the GUI. |
concerto.data.port=[port] | Specifies the Parasoft Report Center port. This setting is not needed if you want to use the value specified in the GUI. |
concerto.web.port=[port] | Specifies the Parasoft Concerto server port. 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 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 Center are marked as being from a nightly build. |
concerto.use_resource_attributes=true|false | Determines whether Parasoft Report Center attributes specified in the GUI at the project level should be used. This allows you to disable projectlevel Parasoft Report Center attributes. |
general.project=[project_name] | Specifies the name of the Concerto 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. |
...