Requirement Diag.

1. Creation of a Requirement diagram

1.1. From the wizard

You can use the creation wizard to create a new Requirement diagram. Select the corresponding Template to initialize the model. By default, the Requirement diagram is selected.

The root element of the SysML model is a Model and it contains a Package. The diagram is then linked with the Package.

1.2. From an existing diagram

The Requirement diagram is associated with a Package model object.

create Requirement diagram from the Outline

To create a Requirement diagram from the Outline, select the 'Package' node, right click and select 'Add Diagram' then 'Requirement diagram'

Even if it is possible, the use of a 'RequirementDefinition' or a 'BlockDefinition' node is not recommended to create a Requirement Diagram. These two nodes will disappear in a future version of the editor and are actually 'Deprecated'.

2. Edit a Requirement Diagram

2.1. Description of the different elements contained in a Requirement Diagram

2.1.1. Requirement

A requirement specifies a capability or condition that must (or should) be satisfied. A requirement may specify a function that a system must perform or a performance condition a system must achieve.

2.1.2. Requirement Field

You can add your own attribute to a requirement. For this, select the 'Requirement field' creation tool in the palette and click on the requirement you want to add the field. You can edit your field through the Properties view.

create Requirement

2.1.3. TestCase

To create a Test Case in the diagram, select the 'Test Case' creation tool in the palette and click on the diagram. You can edit the Test Case through the Properties view or directly in the editor.

2.1.4. Relationship between elements from a Requirement Diagram

2.1.4.1. Containment

A dependency relationship between two requirements in which a client requirement contains the supplier requirement.

2.1.4.2. Satisfy

A dependency relationship between a requirement and a model element that fulfills the requirement. As with other dependencies, the arrow direction points from the satisfying (client) model element to the (supplier) requirement that is satisfied.

2.1.4.3. Derive Requirement

A dependency relationship between two requirements in which a client requirement can be derived from the supplier requirement.

2.1.4.4. Verify

A relationship between a requirement and a test case that can determine whether a system fulfills the requirement.

2.1.4.5. Refine

The refine requirement relationship can be used to describe how a model element or set of elements can be used to further refine a requirement. For example, a use case or activity diagram may be used to refine a text based functional requirement. Alternatively, it may be used to show how a text based requirement refines a model element. In this case, some elaborated text could be used to refine a less fine grained model element.

2.1.4.6. Copy

TBD

2.1.4.7. Trace

A generic trace requirement relationship provides a general purpose relationship between a requirement and any other model element. The semantics of trace include no real constraints and therefore are quite weak. As a result, it is recommended that the trace relationship not be used in conjunction with the other requirements relationships described above.

2.2. Advanced editing

2.2.1. Test Case Cover

This tool helps the user to select test case which verify a requirement. To access this tool, right click on the requirement you want to cover in the outline, and select 'Test Case Cover'.

The following window appears:

Test Case Cover

On the left of the window, you find all the test case that can verify this requirement. The other side contains all the test case that verify the requirement.

To add a new verification to the requirement, select the 'TestCase' from the list 'Choices' and click on 'Add'. To remove an existing verification from the requirement, select the 'TestCase' from the list 'Feature' and click on 'Remove'.

When you have finished, click on 'Ok' and it will automatically create or delete the relationships according to the changes made.

If you want to see the new relationships in your diagram view, you will have to refresh the connections on your requirement(right click on your requirement on the diagram then click on 'Restore Connections'). Note that both element (the Requirement and the Test Case related) need to be shown in the diagram.

2.2.2. Design Element Cover

This tool helps the user to select elements from all the model (including Additional Resources too) which satisfy the requirement. It works like the 'Test Case Cover' except that the relationship created will be a 'satisfy'.

2.2.3. Import Element from other diagrams

You can import in your requirement diagram, elements from other diagrams. If the element you want to import is in the same model than your requirement diagram, then you just have to drag and drop it from the outline to the diagram. Else, you will have to load the resource in your outline. Rigth click on 'Additional Resources' then click on 'Load Resource...' and select the file where your element is defined.Now, you just have to drag and drop it on your diagram

2.2.4. Define a Testcase

According to its meta-model, a testcase can be an operation or a behavioral model. As a result, Activity diagram, Sequence diagram and State Machine diagram can specify a TestCase.

To create one of those diagram, right click on your TestCase in the outline, and select "Create Child" then the submenu "UML" (if you are using the SysML Menu, otherwise the element will be found under the "Create Child" menu) and create an Interaction, an Activity or a State Machine. Then right click on that new element and create the diagram associated.

3. Diagram Example

requirementDiagram