Workflow Automation Using Python API
You can manage Polyspace® Test™ workflows entirely at the command line by using the Python® API for Polyspace. You can create and manage projects, configure projects based on your toolchain and other requirements, author tests, and build and run tests for C/C++ code. After you run the tests, you can save the results in a Polyspace Test results file or an HTML or XML report.
Before getting started with the Python API, make sure your Python version meets the requirements for use with Polyspace Test. For more information, see Set Up Python API for Polyspace.
polyspace Package
polyspace.__install_path__ | (Python) Get Polyspace installation folder |
polyspace.ErrorWithLog | (Python) Get error logs from actions on a Polyspace project |
polyspace.project Module
polyspace.test Module
Topics
- Set Up Python API for Polyspace
Import
polyspacemodules in Python to create and manage Polyspace projects and results. - Get Started with Python API for Polyspace
Create and configure project, build and run tests, generate reports.
- Calculate Code Coverage of C/C++ Code Using Python API for Polyspace
Run code profiling of C/C++ code using Python API for Polyspace.
- Generate Reports of C/C++ Test Results Using Python API for Polyspace
Save Polyspace Test results as XML or HTML reports.
- Create Project from Build System Using Python API for Polyspace
Dynamically generate source and build information for a project by tracing your build commands.
- Author Graphical Tests Using Python API for Polyspace
Create test suites and test cases, add assessments, build and run tests.
- Modularize Existing Project by Using Polyspace Python API
Use Python scripts to modularize existing projects by converting configurations and graphical tests to files referenced by the project.
- Create Project Dynamically by Using Polyspace Python API
Use Python scripts to dynamically generate projects from sources, configurations, and tests.