measure and monitor project quality -凯发k8网页登录

main content

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.

code quality dashboard with metric results for a project.

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.

code analyzer section of the dashboard with 1 error and 2 info.

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 section of the dashboard with results for all metric levels.

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.

tests section of the dashboard with some passed and some failed tests.

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.

requirements section of the dashboard with passed, failed, and unlinked requirements.

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.

code quality dashboard banner that indicates that project files 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.

code analyzer section of the dashboard with indication of stale metrics.

additionally, the dashboard displays a banner that indicates that there are stale results.

code quality dashboard banner that indicates that metric results are stale.

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

  • |

related topics

    网站地图