hi,
I have a class inheriting from matlab.unittest.TestCase. This class runs through various test functions (test1, test2) which utilize matlab's unittest qualification methods. I'm recreating the class and running 'foo' for each idx.
However, I want to run some statistics on the data ITSELF across idx. This means , I need some way of either storing or passing 'MyData' for each run outside.
I thought about saving it locally and using it afterwards, but I would like something built-in.
classdef MyTest < matlab.unittest.TestCase properties (ClassSetupParameter) idx = num2cell(1:3); end properties MyData; end methods(TestClassSetup) function runfoo(testCase,idx) testCase.MyData = foo(testCase,idx); end end methods(Test) function runtestsonfoo(testCase) test1(testCase); test2(testCaes); end end end
Thank you!
Best Answer