How to test that a script is running correctly ?
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Testing Frameworks dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!