필터 지우기
필터 지우기

I want to write a MATLAB script that tests all test suites in Simulink with extension .mldatx?

조회 수: 10 (최근 30일)
Currently, my script is able to run specific tests in the Simulink Test Manager: I want this script to run ALL .mldatx files, not just TestingFile.mldatx, with continuous integration. How would I do this?
import matlab.unittest.TestRunner;
import matlab.unittest.TestSuite
import matlab.unittest.selectors.HasParameter;
import matlab.unittest.plugins.TestReportPlugin;
import sltest.plugins.TestManagerResultsPlugin;
import matlab.unittest.selectors.HasName;
suite = testsuite('tests\TestingFile.mldatx');
testRunner = TestRunner.withNoPlugins;
%Produce pdf file
pdfFile = 'TestReport.pdf';
trp = TestReportPlugin.producingPDF(pdfFile);
addPlugin(testRunner,trp)
%add test manager results
tmr = TestManagerResultsPlugin;
addPlugin(testRunner,tmr)
result = run(testRunner,suite);

답변 (1개)

Mark McBroom
Mark McBroom 2020년 11월 14일
https://www.mathworks.com/help/matlab/ref/matlab.unittest.testsuite.fromfolder.html

카테고리

Help CenterFile Exchange에서 Outputs에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by