Clear Filters
Clear Filters

Can I create a slmx file separated from the model-slmx file to save only links between requirements and Test Assessments steps?

17 views (last 30 days)
Hello,
I am working on a Harness that test a Simulink model. The harness was saved externally and also the requirement links are stored externally.
However, when creating the "Related To" links between the requirements and steps inside the Test Assessment block, links are saved in the same slmx file than the links to model itself ("Model.slmx"). Is it possible to change this configuration to create a separated slmx file that contains only the links between Harness and requirements (something like Harness.slmx)?
Many thanks in advance for the support.

Accepted Answer

Artem
Artem on 25 Jun 2024
Unfortunately, this will not be possible. Because Component Harnesses may be optionally stored in main model .slx, the links are stored in same .slmx file. When harness is saved into a separate file, links remain in the main .slmx.
It would help to understand, why you need the harness links stored seprately. If the goal is to have separate .slmx files for each harness used with the same main model, you can try to accomplish this using slreq.map() function:
slreq.map(pathToModel, pathToSlmx)
This allows to maintain multiple .slmx files for the same model, and load them selectively, depending on active harness. Overall workflow would look something like this:
1) slreq.map(pathToModel, harness1.slmx)
2) Open main model, open Harness 1, create some links, save the LinkSet. harness1.slmx will be created.
3) close everything, including the ReqSet
4) slreq.map(pathToModel, harness2.slmx)
5) Open main model, open Harness 2, create other links, save the LinkSet. harness2.slmx will be created
6) Open Requirements Editor, hanress2.slmx will contain links for Harness 2.
7) slreq.map(pathToModel, harness1.slmx) - harness1.slmx will get loaded, it will contain the links for Harness 1.
Note that this is an untested workflow. It is not clear how the 2nd set of links will behave at this point, if harness2.slmx is still loaded, along with harness1.slmx. Unfortunately, you cannot force-unload one of the LinkSets, while the linked ReqSet is loaded. This complication can be avoided by using multiple ReqSet files. For the example above, requirements for Harness 1 would be in ReqSet1.slreqx, and requirements for Harness 2 would be in ReqSet2.slmx. This way you could "Close" ReqSet2 before remapping main model to harness1.slmx, and only ReqSet1 would load to resolve the links loaded from harness1.slmx
Hope this helps.
Artem.

More Answers (1)

Maria
Maria on 27 Jun 2024 at 11:31
Thank you very much for your response Artem,
The goal of having different slmx files in our case, is to store separately the links to the Harness (managed by testing teams) and the links to the model implementation (managed by development team). Do you think that this could work as well with a similar approach to the one suggested in your workflow above?
I have played a little bit with the workflow that you suggested above, but no sure if understand how this will work. What I understand is:
  1. In the regular case, without using slreq.map function, the links are saved on a slmx file depending on the artifact that plays as source of the links. Always the same slmx file for the same artifact.
  2. With the slreq.map function, we have the option to set the path and name of the slmx file for a specific artifact (the model itself in our case)
  3. Meaning we could manage two different slmx files for the same artifact.
Is my understanding correct?
What I have seen during the test:
  1. I can create two different slmx files for the same model. The one that is loaded for the (Model and Harness) depends on the last one that is set with slreq.map function to the model.
  2. I can switch between them with the slreq.map function, and created links for the two of them.
  3. I can not see them loaded at the same time. No sure if this will be possible.
  4. I can see other slmx files associated with other artifacts like TestManager or other requirements.
Many thanks for your support,
Maria Belandria
  1 Comment
Artem
Artem on 27 Jun 2024 at 17:34
Maria, Yes, this is all correct. Only one LinkSet can be associated with a given linked artifact at a time, no multiple LinkSets in parallel.
Also, Yes to your other question: this same approach should allow to keep model's own links in a separate file.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!