Main Content

Fix Test Execution Failures in Polyspace Platform User Interface

Issue

You can build and run C/C++ tests in the Polyspace Platform user interface. If the build succeeds but test execution fails, you have most likely encountered a run-time error.

Test execution failures due to run-time errors can manifest in multiple ways:

  • When you select Run Tests on the toolstrip, the Results pane indicates a test execution error by displaying an exclamation mark next to the Tests node.

    Exclamation mark next to Tests node when the test has a run-time error.

    If you try to open the dashboard or review the test results by right-clicking on the Tests node and using context menu options, you see this error message:

    Result file not found

  • The tests reach completion but the test results might show a failure. When you open the test results, on the Result Details pane, you see that a run-time error occurred during execution of the test setup, the test teardown, or the test body.

Possible Solutions

Diagnose and fix the run-time error that leads to failed test execution. You can use one of these methods to detect the run-time error.

Debug Test

If you use one of the debuggers supported in Polyspace® Platform, you can build your test with debugging enabled and then run the test in a debugger, placing breakpoints at appropriate places in the code.

For more information on debugging, see Debug Test Failures from Polyspace Platform User Interface.

Detect Error Using Static Analysis

You can use one of the Polyspace static analysis tools to detect the run-time errors using static analysis.

  • Use Polyspace Bug Finder™ to run a quick check for issues such as overflows and array access out of bounds.

  • If the Bug Finder analysis does not reveal the run-time error, run a more exhaustive analysis using Polyspace Code Prover™.

For more information on how to run Bug Finder or Code Prover on a specific test (instead of the entire project), see Check for Bugs and Run-Time Errors in C/C++ Tests and Functions Under Test.

See Also

Topics