how do I perform follow up tasks after failure
Afficher commentaires plus anciens
Hi,
I developed a unittest framework using matlab.unittest.testCase class. I want to perform some actions after a certain test passes or fails.
testCase.VerifyEqual(actualValue, ecxpectedValue);
%if failed perform may be the following
testCase.failureCount = testCase.failureCount +1 ;
How do I do this? I tried usinng onFailure method by adding some function, but that is not working as expected.
the following didn't work as expected
testcase.onFailure(@() functionCallOnFailure())
Can anyone answer this?
thanks in advance.
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!