I am writing unit tests using the framework "matlab.unittest.TestCase". I want to calculate code coverage for the source file. By code coverage what I mean is the following: "I want to know that how many lines of the main code were touched when its unit tests were being executed?".
I have tried the following option for it and it shows me output in a html file. However, that output seems like it is showing that how many lines of the unittests were covered.
Whats wrong here? Any suggestions? Please feel free to ask for any clarifications.
test_dir = "unittest/sci";
suite = TestSuite.fromFolder(test_dir);
runner = TestRunner.withTextOutput;
result = runner.run(suite);