Test output file
Specify test output file name and path
Since R2024b
Description
Specify the file name and path containing results of external tests in the current Polyspace® Platform project.
Set Option
In your Polyspace Platform project configuration, on the Project tab, select the External Tests node and then enter a file path for this option.
Why Use This Option
The location of the test output file is needed to open external test results in the Polyspace Platform user interface. You can avoid specifying an exact location and let the external test handling framework manage the location of test output files. When specifying flags for Test output options, use the variable $(TESTOUTPUT) with a command-line flag so that the test output is generated in a
predetermined location and can be opened from this location.
However, some test authoring frameworks do not allow you to explicitly specify a test result path during test execution. In these cases, you can indicate where external test results are stored by following these steps:
Leave the option
Test output optionsempty.Enable the option
Specify test output file explicitly.Specify an output file path using this option.
Even when a test authoring framework allows you to specify a test output path, you can force the test output to be generated in a specific location by following these steps:
Enter an appropriate command-line flag for the option
Test output optionsso that the test output is generated in a specific location.Enable the option
Specify test output file explicitly.Specify an output file path using this option.
For more information on the full workflow, see Run External C/C++ Tests in Polyspace Platform User Interface.
Settings
Enter the absolute or relative path to your test output file including the output file name. Relative paths are resolved with respect to the location of the generated test executable.
Make sure that your test output is generated in the specified location using appropriate command-line flags for the option Test output options. For instance, suppose you are running tests that use the Boost.Test library. This library provides a command-line flag --log_sink for test execution that allows you to specify
where the test output file is generated.
If you specify the path
output.xmlfor this option, then you must specify the command-line flag--log_sink output.xmlfor the optionTest output options.If you specify the path
C:\testRes\output.xmlfor this option, then you must specify the command-line flag--log_sink C:\testRes\output.xmlfor the optionTest output options.
Tips
You can use project variables or system environment variables as shorthands for root folders in the output file path. If you share the project with another user who has the output file in a different root location, utilizing environment variables can help ensure that the project stays in sync with the new location of the file. For more information, see:
Dependencies
This option is available only if you enable these options:
Version History
Introduced in R2024b