MATLAB: How to save results of a Class-Based Unittest without ToFile Plugin

class-basedooppluginstesttofileunitunittest

Hi, Is there any replacement for
matlab.unittest.plugins.ToFile
class? I have Matlab 2013 and my Matlab does not have this Plugin. This ToFile class creates an output stream that writes text output to a UTF-8 encoded file.
Thanks, Arsalan

Best Answer

Create a test class with test cases
classdef Test_Class < matlab.unittest.TestCase
Then import the the test classes to a suite. If you have created test classes in a folder you can import all the test cases to Testsuite using below command.
suite = matlab.unittest.TestSuite.fromFolder(folder)
Then Run the suite to get the test results.
uniTestresult = run(suite);
uniTestresult will give you the information about the test carried.