Testmanager, How is it possible to sort testcases within testsuite?
조회 수: 3 (최근 30일)
이전 댓글 표시
Dear ladies and gentlemen,
I´m worjing with the TestManager and I would like to change the sequnce of the testcases within a testsuite. Is it possible to move them via track and drop?
Thank you very much and best regards
Damian Kreis
댓글 수: 0
답변 (1개)
Abhisek Pradhan
2019년 9월 18일
Test case can be rearragned inside a test suite. Following code sorts the test cases in descending and random order.
s = matlab.unittest.TestSuite.fromFolder(pwd)
s = s(end:-1:1)
s.run % run in descending order
s = s(randperm(numel(s)))
s.run % run in random order
But as testing should be independent of the order of test cases. So, it doesn’t matter in which order one has the test cases.
참고 항목
카테고리
Help Center 및 File Exchange에서 Function-Based Unit Tests에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!