Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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);

Antworten (1)

Jian Fan
Jian Fan am 4 Dez. 2020
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