hi, I've got a parametrized test (using a Test Class) which produces the following text when an assertion fails: p1 and p2 are cell arrays in the ClassSetupParameter properties section.
properties(ClassSetupParameter) p2 = {{'foo',1},{'foo',2},{'bar',1},{'bar',2},{'bar',3}}; p1 = {'a', 'b'}; end
When I run a test suite based on this class
suite = matlab.unittest.TestSuite.fromClass(?myTest) res = runner.run(suite);
I get this text which references the current cell in p1.
Assertion failed while setting up or tearing down myTest[p1=a,p2=value1]. As a result, all myTest[p1=a,p2=value1] tests failed and did not run to completion.
How do I edit this text? I'd like to get rid of the text 'value6' and replace with a concatenated value of both the cells, i.e: something like this
Assertion failed while setting up or tearing down myTest[p1=a,p2=foo-1]. As a result, all myTest[p1=a,p2=foo-1] tests failed and did not run to completion.
or
Assertion failed while setting up or tearing down myTest[p1=a,p2=bar-3]. As a result, all myTest[p1=a,p2=bar-3] tests failed and did not run to completion.
Best Answer