Install Polyspace Test on Server
You can use Polyspace® Test™ to manage and execute unit and integration tests for C and C++ code, and to perform code coverage analysis.
You can run Polyspace Test on server class machines and review the results from a web browser with these products:
Polyspace Test to manage and execute your tests.
Polyspace Access™ for web browser based review of test results.
By using these products with a build automation tool, you can incorporate a Polyspace analysis into continuous integration systems.
What You Need to Install
In a continuous integration process, developers submit code to a shared repository. An automated build system builds and tests each code submission at regular intervals or based on predefined triggers, and then integrates the code. You can run Polyspace as part of this process.
Product Installation
For this workflow, you must install the following products on the computer or computers that act as the server:
Polyspace Test — Run the MathWorks® installer, follow the prompts, and provide your product license. You can get the installer and license by purchasing the product or requesting a trial. For detailed instructions, see Installation and Licensing.
To install the products non-interactively or silently at the command line, see Install Products Noninteractively.
Polyspace Access — See Install Polyspace Access for Web Reviews (Polyspace Access).
Jenkins — Install a tool for continuous integration or build automation. See the Jenkins website.
Installation Folder
The installer selects a default installation folder based on your operating system and the release version. During installation, you can change this default folder if needed.
For instance, the default installation folder for release R2026a is listed here.
| Operating System | Default Installation Folder |
|---|---|
| Windows® | C:\Program Files\Polyspace\R2026a |
| Linux® (most distributions) | /usr/local/Polyspace/R2026a |
Polyspace Products to Run Tests
Install Polyspace Test to run the analysis and upload results to a web interface for review.
Check Polyspace Installation
To check if the installation of Polyspace Test was successful:
Open a command window. Navigate to
. Here,polyspaceserverroot\polyspace\binis the Polyspace Test installation folder, for instance,polyspaceserverrootC:\Program Files\Polyspace\R2026a.Enter:
polyspace-test -help
You should see the list of options allowed for the polyspace-test command.
To check if the Polyspace Access web interface is set up for upload:
Navigate again to
.polyspaceserverroot\polyspace\binEnter:
polyspace-access -host hostName -port portNumber -create-project testProject
Here,
is the name of the server hosting the Polyspace Access web server. For a locally hosted server, usehostNamelocalhost.is the optional port number of the server. If you omit the port number,portNumber9443is used.If the connection is successful, a project called
testProjectshould be created in the Polyspace Access web interface.Open this URL in a web browser:
Here,https://hostName:portNumber/metrics/index.html
andhostNameare the host name and port number from the previous step.portNumber
In the Project Explorer pane on the Polyspace Access web interface, you should see the newly created project testProject.
Install Polyspace with Other MathWorks Products
Install Other Polyspace Products
To install additional Polyspace base products, run the MathWorks installer again for each base product.
The Polyspace Test and the Bug Finder Server products are separate base products. You typically install the Code Prover server products as part of the Bug Finder server product installations.
For instance, to install Polyspace Test and Polyspace Bug Finder™ Server™, run the installer twice. In each run, select the appropriate license and follow the prompts. You cannot install Bug Finder and Code Prover server products in the same installation folder as the other Polyspace products.
Install Other MathWorks Products
To install Polyspace with other MathWorks products such as MATLAB®, run the MathWorks installer twice.
In the first run, choose the license that corresponds to the other MathWorks products, such as MATLAB, Simulink®, or Embedded Coder®.
In the second run, choose the license that corresponds to the Polyspace products. If you are installing multiple Polyspace base products, see Install Other Polyspace Products.
In this workflow, products such as MATLAB and Simulink are installed in a different root folder than the Polyspace products. You can link the two installations and use MATLAB scripts to run Polyspace. See Integrate Polyspace with MATLAB and Simulink (Polyspace Bug Finder).
Install Older Polyspace Product Versions
If you download the MathWorks installer from MathWorks Downloads, you get the latest update of the product release you are installing.
To install a previous update of the product, follow these steps:
From MathWorks Downloads, select the product release and from the I Want To dropdown, instead of Install Products, select Get ISOs and DMGs.
Select the release and update number that you want to install from the Select Release and Select Update dropdown.
From the section Get ISOs and DMGs for MATLAB and Simulink Products, download the MathWorks installer.
Start the installer and provide your MathWorks Account information. If you have a license for the Polyspace products, you should see the product licenses listed in the Select license table. Select the appropriate product license and continue the installation. For more information on this workflow, see Install Products Noninteractively.