How to test that a script is running correctly ?
Mostrar comentarios más antiguos
Hello
I'm trying to implement an acceptance test for the matlab code I'm working on with other people. For this I would like to test some script to be sure that even after some change they're still working.
I saw that there's the functiun runtests but it only test that functiuns give the good output, it doesnt check for script.
I tried this but then all of the script are in the same workspace and they might interact with each other when we don't want. Also some script have "clc" or "clear all" in them wich also causes some issue.
try
fprintf("testing %s\n",filename)
[~] = evalc(filename);
fprintf("%s run properly\n",filename)
catch
fprintf("%s didn't run properly\n",filename)
end
The ideal situtation would be to be able to run the script in another session and just get the information that the script completed without displaying any of the output
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Testing Frameworks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!