importProfile
Class: slreq.ReqSet
Package: slreq
Syntax
importProfile(rs,fileName)
Input Arguments
rs
— Requirement set
slreq.ReqSet
object
Requirement set, specified as an slreq.ReqSet
object.
fileName
— Profile file name
string scalar | character vector
Profile file name, specified as a string scalar or character vector.
Example: "myProfile.xml"
Examples
Import Profile and Get and Set Stereotype Properties
This example shows how to assign a profile to a requirement set and get and set stereotype property values for requirements.
Open the ShortestPath
project.
openProject("ShortestPath");
Load the shortest_path_tests_reqs
requirement set.
rs = slreq.load("shortest_path_tests_reqs");
Assign the TestReqProfile
profile to the shortest_path_tests_reqs
requirement set.
importProfile(rs,"TestReqProfile");
Find the requirement with index 2.1.1
. Apply the TestRequirement
stereotype to the requirement.
testReq = find(rs,Index="2.1.1"); testReq.Type = "TestReqProfile.TestRequirement";
Get the value of the Reviewed
stereotype property.
val = getAttribute(testReq,"TestReqProfile.TestRequirement.Reviewed")
val = 0
Set the value of the Reviewed
stereotype property to 1
.
setAttribute(testReq,"TestReqProfile.TestRequirement.Reviewed",1)
Tips
To assign profiles to link sets, use
slreq.LinkSet.importProfile
.
Version History
Introduced in R2022b
See Also
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)