polyspace-access -export
Export results from Polyspace Access database
Description
The system command polyspace-access -export
exports results from a Polyspace®
Access™ project to a text file.
polyspace-access
exports project results from the Polyspace
Access database to a text file whose location you specify with
-export <resultsToExport>
-output <filePath>
[export options
] -host <hostname>
[login options
] [output options
]<filePath>
. You can specify filters when you export the results or
export a comparison between two projects. You specify the project using either the full path
in Polyspace
Access or the run ID. Use this command to export results to other tools that you use
for custom reports. To get the paths to projects and their last run IDs, use the
command.polyspace-access -list-project
Examples
If you follow a component-based development approach, you can assign analysis results by component to their respective owners.
Get a list of projects currently stored on the Polyspace Access database and their last run IDs.
polyspace-access -list-project -host myAccessServer
Connecting to https://example-access-server:9443
Connecting as jsmith
Get project list with the last Run Id
Restricted/Code_Prover_Example (Code Prover) RUN_ID 14
multimodule/vxWorks_demo (Code Prover) RUN_ID 16
public/Bug_Finder_Example (Bug Finder) RUN_ID 24
public/CP/Code_Prover_Example (Polyspace Code Prover) RUN_ID 8
public/Polyspace (Code Prover) RUN_ID 28
Command Completed
Assign all red and orange run-time error results to the owner of all the files in
Component_A
of project vxWorks_demo
. Perform the
same assignment for the owner of Component_B
. To specify the
vxWorks_demo
project, use the run
ID.
polyspace-access -set-unassigned-findings 16 ^
-owner A_owner -source-contains Component_A ^
-owner B_owner -source-contains Component_B ^
-rte Red -rte Orange ^
-host myAccessServer
-source-contains
Component_A
matches all files with a file path that contains
Component_A
.-source-contains Component_B
matches all files with a file path
that contains Component_B
, but excludes files with a file path that
contains Component_A
.
Export the results and generate .csv
files for each owner that
contain the results assigned to
them.
polyspace-access -export 16 ^
-output C:\Polyspace_Workspace\myResults.csv ^
-output-per-owner ^
-host myAccessServer
myResults.csv
containing all results from the project with run ID
16. The command also generates files myResults.csv.A_owner.csv
and
myResults.csv.B_owner.csv
on the same file path.Input Arguments
Export Results
Absolute path or run ID of the project results that you export specified as a
string. Polyspace assigns a unique run ID to each analysis run you upload. If the path name
includes spaces, use double quotes. To get the project results path or most recent run
ID, use
.polyspace-access -list-project
Example: -export "public/Examples/Bug_Finder_Example (Bug
Finder)"
Example: -export 4
Path to the file that stores the output of the command, specified as a string. If the path name includes spaces, use double quotes.
Example: -output
C:\Polyspace_Workspace\myResults.txt
Example: -output "C:\Polyspace Workspace with
Spaces\myResults.txt"
Options to specify where to export results, and which subset of results you export. Use these options to export results to other tools you use to create custom reports or other custom review templates.
You can also use a combination of options. For instance, using the option s
-coding-rules -severity High
exports coding rule violations that
have been assigned a status of High
in the Polyspace
Access web interface.
Option | Description |
---|---|
| Use this option to generate files that only contain results
assigned to a particular user. The files are stored on the path you specify
with For an example of how to assign results to owners at the command line, see Assign Results to Component Owners and Export Assigned Results. |
| Type of RTE result to export specified as To specify more than one argument, use the option for each argument. Example:
|
| Impact category of defect results to export specified as
To specify more than one argument, use the option for each argument. Example: |
| Export all custom coding rules results. |
| Export all coding rules results. |
| Export all code metrics results. |
| Export all global variables results. |
| Review status of the results to export specified as
To specify more than one argument, use the option for each argument. Example: |
| Severity of the results to export specified as
To specify more than one argument, use the option for each argument. Example: |
| Export all unassigned results. |
| Software quality objective or SQO level that must be satisfied
specified as an SQO level from 1 to 6. If you specify an SQO level,
The SQO levels 1 to 6 specify an increasingly stricter set of predefined or user-defined requirements in terms of Polyspace results. To customize the requirements in the Polyspace Access web interface, see Customize Software Quality Objectives For more information on the SQO levels, see Evaluate Polyspace Bug Finder Results Against Bug Finder Quality Objectives (Polyspace Bug Finder). For example, SQO
level 2 in Code Prover requires that you must not have unjustified red
checks. This specification means that if you use
|
| Resolution corresponds to the type of comparison that the software
performs between the current run and a baseline run that you specify with
option The resolution types are:
If you do not specify a baseline, Polyspace compares the current run to the run that immediately precedes it. You can
specify only one resolution type at a time. To export a comparison for
multiple resolution types, run the See also Comparison Mode at the Command Line. |
| Run ID of a run that you use as a baseline for comparison with a
current run. This option requires option
If you do not specify a baseline, Polyspace compares the current run to the run that immediately precedes it. If the project contains only one run, Polyspace issues an error. See also Comparison Mode at the Command Line. |
| Use this option to export a list of results from a project (target) whose review information was imported from another project (source). Specify one of these types of imports:
See also Import Review Information from Existing Polyspace Access Projects |
Connection Configuration
Polyspace Access machine hostname
that you specify in the URL
of the Polyspace
Access interface, such as
https://
.
If you are unsure about which hostname to use, contact your Polyspace
Access administrator. hostname
:portNumber
/metrics/index.html
You must specify a hostname with all polyspace-access
commands,
except the -generate-migration-commands
and
-encrypt-password
commands.
Example: -host myAccessServer
Port number that you specify in the URL of the Polyspace
Access interface, such as
https://
.
If you are unsure about which port number to use, contact your
Polyspace
Access administrator.hostname
:portNumber
/metrics/index.html
HTTP protocol used to access Polyspace
Access, specified as http
or
https
.
Full path to the text file where you store your login credentials. Use this option if you use a command that requires your Polyspace Access credentials in a script but you do not want to store your credentials in that script. While the script runs, someone inspecting currently running processes cannot see your credentials.
You can store only one set of credentials in the file, either as
-login
and -encrypted-password
entries on separate lines, for instance:
-login jsmith -encrypted-password LAMMMEACDMKEFELKMNDCONEAPECEEKPL
-api-key
entry:-api-key keyValue123
login.txt
in Linux®, use this
command:chmod go-rwx login.txt
API key you use as a login credential instead of providing your login and encrypted password. To assign an API key to a user, see Configure User Manager or contact your Polyspace Access administrator.
Use the API key if you use a command that requires your Polyspace Access login credentials as part of an automation script with a CI tool such as Jenkins®. If a user updates their password, you do not need to update the API key associated with that user in your scripts.
It is recommended that you store the API key in a text file and pass
that file to the command by using the -credentials-file
option.
Login username that you use to interact with Polyspace Access.
Use the options -login
and
-encryped-password
together. If you do not use
these two options together, you are prompted to enter your credentials
at the command line, unless you use -api-key
.
Login password you use to interact with Polyspace
Access. <ENCRYPTED_PASSWORD>
is the output
of the
command.polyspace-access -encrypt-password
Use the options -login
and
-encryped-password
together. If you do not use
these two options together, you are prompted to enter your credentials
at the command line, unless you use the -api-key
option.
Number of times the polyspace-access
command
retries to upload results when you upload from a client machine to the
server machine that hosts Polyspace
Access before failing. Specify this option to retry the upload
command in the event of sporadic network outages. The command waits 10
seconds between retries.
Full path to command outputs.
Path to the folder for storing temporary files generated by
polyspace-access
commands. The default folder
path depends on your platform:
Windows —
C:\Users\%username%\AppData\Local\Temp\ps_results_server
Linux —
tmp/ps_results_server
File path where you store the command output log. By default the command does not generate a log file.
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)