Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
punch powertrain
punch powertrain le 4 Avr 2020
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);

Réponses (1)

Jian Fan
Jian Fan le 4 Déc 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