Import and Export Test Runs From MATLAB Test Manager
To improve collaboration and save test and coverage results as a reference, use the MATLAB Test Manager to import and export test runs as JSON files.
Export Test Runs
To export test runs:
Open a previous test run. In the menu, click the drop-down list on the left, and select the run under Previous Runs.
Export the test run by clicking the Export button
in the menu.
In the window that appears, save the test run.
The exported JSON file contains the test results. If the tests ran with code coverage or generated code coverage enabled, the JSON file also contains the coverage results.
Import Test Runs and View Results
To import test runs, click the drop-down list in the left of
the menu and select Import Test Run
. In the window that appears,
select the JSON file that contains the test run to import.
The MATLAB Test Manager opens the previous run and displays the test suite, the results, and lists the date and time that the suite ran.
If you ran the tests with coverage enabled, you can view a summary of the coverage results for
the previous run by pointing to the Statement button. Open the report
by clicking the Statement button. Alternatively, click the Report
button and select the report under Code Coverage
Reports.
If you ran equivalence tests that generated C/C++ code as a static library and executed in SIL or PIL mode, you can open the generated code coverage report by clicking the Report button and selecting the report under Generated Code Coverage Reports.
To generate a report from the test results in a previous run, click the Report button . Then, under Test Result Reports, click Generate Test Result Report.
To navigate to the current test run, click the drop-down list on the left of the menu and
select All Tests in Current
Project
or a custom test suite.
To navigate from the current test run to an imported test run, click the drop-down
list on the left of the menu, then select a run under Previous
Runs. The MATLAB Test Manager includes
(Imported)
at the end of the test suite name to indicate imported
test runs.