필터 지우기
필터 지우기

Link a sltest.tes​tmanager.T​estCase to a slreq.Reference in Matlab 2017b

조회 수: 2 (최근 30일)
punch powertrain
punch powertrain 2020년 4월 4일
답변: Jian Fan 2020년 12월 4일
How can I link a Simulink Test Case (sltest.testmanager.TestCase) to a Simulink Requirement (slreq.Reference) in Matlab 2017b?
When I try to do it using slreq.createLink(src,dst), I get the error:
Error using slreq.createLink
slreq.createLink() failed: slreq.utils.resolveDest() does not support input of type sltest.testmanager.TestCase
slreq.getSrcId() does not support input of type sltest.testmanager.TestCase
Error in LinkExample (line 10)
slreq.createLink(Reference,MyTestCase);
Example:
MyTestFile = sltest.testmanager.TestFile('MyTestFile.mldatx',true);
MyTestSuite = MyTestFile.createTestSuite('MyTestSuite');
MyTestCase = MyTestSuite.createTestCase('simulation','MyTestCase',false);
RequirementSet = slreq.new('MyRequirement');
Reference = add(RequirementSet,'Domain','linktype_rmi_mylinktype','Artifact','MyDoc.txt' ...
'Id', 'MyReq1','Summary', 'Summary Req 1',...
'Description', 'Description Req 1');
slreq.createLink(Reference,MyTestCase);

답변 (1개)

Jian Fan
Jian Fan 2020년 12월 4일
This limitation of the API is addressed in R2018a. It is recommened to update Matlab.

Community Treasure Hunt

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

Start Hunting!

Translated by