- https://www.mathworks.com/help/matlab/ref/matlab.unittest.testrunner.withtextoutput.html
- https://www.mathworks.com/help/matlab/ref/matlab.automation.verbosity-class.html
Cut back on the stackdump, please
2 ビュー (過去 30 日間)
古いコメントを表示
When a unit test using the MATLAB Test Framework throws an exception, it produces a HUGE stackdump given all the layers of the Test Framework. Is there anything we can do to cut back on the stackdump since so much of information is not pertinent to the developer at that moment? I'm thinking I might have to add a plugin to do the editing of the stack but maybe there is a better solution?
0 件のコメント
回答 (1 件)
Spruha
2025 年 3 月 27 日
Hi Dan,
It looks like you want to reduce the stack dump that gets generated when an error occurs. This can be achieved by using
‘matlab.unittest.TestRunner.withTextOutput‘ or ‘matlab.automation.Verbosity’. These built-in methods in MATLAB allow you to customize the verbosity of the output. You can set it to ‘Terse’ to get minimal information in the output. Below are the links to the mentioned documentations.
As you mentioned, you can create a custom plugin to filter the stack trace. MATLAB allows you to extend the testing framework with plugins that can modify the test run behaviour. Refer to this documentation to learn about custom plugin creation:
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Testing Frameworks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!