Some lines missed in code coverage report

Hello,
we work with matlab unit tests for matlab classes and want to improve our code coverage. We noticed that sometimes the coverage is not counted correctly in our tests.
We have set explicit breakpoints, which were also addressed, but the line in the report appears as not covered.
Can someone tell us what this could be or how we can debug it?
Thanks

4 件のコメント

Andy Campbell
Andy Campbell 2020 年 10 月 2 日
Hi Ricardo,
Which version ofr MATLAB are you using? Also, are you using the CodeCoveragePlugin?
Finally, are any of your tests issuing "clear all" or "clear classes", or using the profiler as part of the testing?
Thanks,
Andy
Ricardo Krause
Ricardo Krause 2020 年 10 月 5 日
編集済み: Ricardo Krause 2020 年 10 月 5 日
Hi Andy,
at the moment I use MATLAB 19b (without any update installed) and yes we use the CodeCoveragePlugin.
Micah Fry
Micah Fry 2021 年 6 月 17 日
Ricardo,
Did you ever get to any resolution on this? I'm having similar issues (https://www.mathworks.com/matlabcentral/answers/858045-coverage-report-from-unit-tests-is-inaccurate?s_tid=srchtitle)
Steven Apsel
Steven Apsel 2022 年 2 月 28 日
I had similar problems, and removing a "clear all" fixed it.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCollect Decision, Condition, and MC/DC Coverage for MATLAB Code についてさらに検索

製品

リリース

R2019b

質問済み:

2020 年 8 月 5 日

コメント済み:

2022 年 2 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by