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.
- https://www.mathworks.com/help/matlab/ref/matlab.unittest.testrunner.withtextoutput.html
- https://www.mathworks.com/help/matlab/ref/matlab.automation.verbosity-class.html
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!