measure and monitor project quality
measure and monitor the quality of matlab® code and tests in by
using the . the dashboard collects and displays the results for quality metrics for
matlab code and test files (.m
files) and requirement sets,
including code analysis, test results, coverage results, and requirements
verification.
monitor quality metrics
open a project, then, in the project tab, in the tools section, under apps, click code quality dashboard.
note
by default, the dashboard requests that you enable artifact tracing the first time you open a project. click enable and continue to allow the dashboard to track tool outputs and detect outdated metric results.
the dashboard has four sections:
code analyzer displays coding problems.
tests displays test results.
coverage displays coverage results from tests.
requirements displays requirements verification status.
check for coding problems
the code analyzer section displays information about coding errors, warnings, and improvement opportunities for the matlab code and test files in your project.
the code quality dashboard uses the matlab code analyzer to check matlab code and test files in the project for coding problems. for more information on the matlab code analyzer, see .
to collect and display code analyzer metric results, update the dashboard. for more information, see update the dashboard.
to view details about the coding problems, open the code analyzer report by clicking the code analyzer section. for more information, see .
collect coverage
the coverage section displays coverage results from the matlab test manager.
coverage indicates how your tests execute functions, statements, or conditional logic in your code files. for more information, see .
to collect and display coverage metric results, enable coverage in the matlab test manager, then run all tests in the project. running test suites or selected tests does not update the coverage metric results for the project.
to view detailed coverage results, open the coverage report by clicking the coverage section.
verify code by running tests
the tests section displays the current test results from the matlab test manager.
the matlab test manager manages matlab tests and test results for your project. for more information see, .
to collect test metric results, run tests by using the matlab test manager. running test suites or tests in the project updates the test metric results with aggregated results from multiple runs.
to view detailed test results, open the matlab test manager by clicking the tests section.
verify requirements
if you have requirements toolbox™ installed, the requirements section displays the requirements verification status for requirements in the project.
in requirements toolbox, requirement verification status reflects the results of verification items linked to requirements, including simulink® tests. in the code quality dashboard, requirement verification status reflects only the results for linked matlab tests run from the matlab test manager. for more information, see .
to collect requirements metric results, run tests by using the matlab test manager. running test suites or tests updates the requirements metric results with aggregated results from multiple runs.
to view requirements, open the requirements editor by clicking the requirements section.
note
collecting requirements metric results and opening the requirements editor requires requirements toolbox.
update the dashboard
monitor the quality of your project as you make changes and collect new results by updating the metrics. you can update all metrics in the dashboard or update individual sections.
update all metrics
when you make changes to artifacts in the project or collect new results, a banner indicates that project artifacts have changed.
to retrieve the current status of the project artifacts, click update artifacts. if there are more recent results for project artifacts than what is displayed in the dashboard, icons indicate that the metrics are stale.
additionally, the dashboard displays a banner that indicates that there are stale results.
to refresh all of the results in the dashboard, click refresh all.
update individual metrics
to update metric results for an individual section, in that section, click the three-dot icon and select refresh data.
alternatively, to simultaneously run tests and update metric results for the tests, coverage, and requirements sections, click the three-dot icon in the section and select run tests and refresh data.
see also
apps
- |