How to use runtests() command
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have created a test script Test1.m using classes located in a folder called "test".
classdef Test1 < matlab.unittest.TestCase
... code...
end
I can run the tests by entering
run(Test1)
in the command window. Some members of my team are familiar with clicking 'Run Tests' button (or the equivalent of runtests() in command window). However, runtests("Test1.m") does not work with the below error:
Error using runtests
Do not know what to run. Try "unit" or
"acceptance"
Is it due to the folder structure? How may i be able to run test script with 'Run Tests' button.
0 Kommentare
Antworten (1)
Viggnesh Venkatakrishnan
am 17 Dez. 2018
Hi doyz,
I understand your problem with using runtests() to run the test script that you have written. I can safely assume with your code snippet that you are working with class based unit tests in MATLAB. There is a specific way to write class based unit tests for it to be registered as tests in MATLAB. Refer to the following page and the example given in the page that talks in detail about class based unit tests in MATLAB.
Thanks and Regards,
Viggnesh Venkatakrishnan
0 Kommentare
Siehe auch
Kategorien
Mehr zu Testing Frameworks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!