< Previous | Next >

Lesson 6: Linking requirements to Rational Rhapsody model elements

The lesson explores how to associate requirement documents to Rational® Rhapsody® model elements of your project.

Before you begin, you must complete Lesson 4: Importing requirements into Rhapsody and DOORS®.

To get the full benefit of the Rhapsody Gateway analysis, requirements need to be associated to model elements. For example, a particular requirement can be associated to a specific use case. Requirements can be shown directly on Rational Rhapsody diagrams with the corresponding use case. Creating a dependency link with a trace stereotype indicates how requirements trace to use cases. The trace stereotype specifies the way in which the requirement relates to the model elements.

This lesson shows how to link requirements to model elements in a Use Case diagram, the analytic information such as forward and backward coverage, percentage of requirements covered, and the specific model element providing coverage for a requirement.

  1. Open Rational Rhapsody, and load the same elevator project you have been using in this tutorial previously by opening elevator.rpy file.
  2. Expand the Use Case Diagrams folder and locate the main uses diagram. Double-click the main uses diagram to open in the work area.
  3. Select Doors Requirement 2 in the browser and drag it onto the main uses diagram.
  4. Right click the selected Doors Requirement 2 on the Use Case diagram, and select Notation Style > Box Style.

    Notice Doors Requirement 2 on the use case diagram changes to a box with text information.

  5. Click the Dependency button converter and drag the Dependency line from the call elevator use case to Doors Requirement 2 on the diagram, and release it. The dependency link is shown.
  6. Double-click the dependency line so the window shown below opens. Select trace from the Stereotype drop-down list, and click OK. converter
  7. Double-click Doors Requirement 2 on the diagram and view the requirement text.
  8. Click Doors Requirement 3 in the browser and drag it onto the main uses diagram. Right click the selected Doors Requirement 3 on the Use Case diagram, and select Notation Style > Box Style.

    Notice Requirement 3 on the Use Case diagram changes to a box with text information.

  9. Click the Dependency button.
  10. Drag the dependency line from the enter elevator use case to Requirement 3 on the diagram and release it. The link is shown. Double-click the dependency line so the dependency dialog box opens. Select trace from the Stereotype dropdown list, and click OK.
  11. Save the changes, and right click on the elevator project and select Rhapsody Gateway to start the Gateway.

    Select Yes when asked Do you want to reanalyze the project? to open the Management view. In the Project Synthesis information box, there are 3 uncovered requirements. Take note of the orange symbols that indicate modifications that have occurred. In the left of Management view box, confirm that 40% is to the right of the Document1 Doors XML indicating two out of five requirements are covered.

  12. Select the Coverage Analysis View.
  13. In the middle Selection column, expand the Document1 Doors XML folder and view the requirements listed. Confirm Doors Requirement 2 and Doors Requirement 3 have turned to black indicating they have coverage. Under the UML Model Rhapsody in the center Selection column select the elevator project. In the left Backward Coverage column confirm the Req 2 and Req 3 appear indicating the requirements are covered by elevator model elements.
  14. Click Req 2 in the middle Selection column. Confirm that in the right Forward Coverage column, the call elevator use case is shown indicating it provides coverage for Req 2. Click Req 3 in the middle Selection column. Confirm that in the right Forward Coverage column, then the enter elevator use case is shown indicating it provides coverage for Req 3.

You are now aware of how to link requirements to model elements and how Rhapsody Gateway analyzes coverage of requirements.

Stereotypes are shown in the Rational Rhapsody window as follows: converter As shown above, the call elevator use case has a dependency link with trace to requirement 2. An alternative to the dependency link is an anchor. Either option creates a link between requirements and model elements.

Once the link is made between a requirement and a model element, the Rhapsody Gateway provides analytic information. The covered requirements appear in black color, and uncovered requirements appear in red color.

The number of uncovered requirements is indicated in the Management view by default. Specific information about what model element covers a specific requirement is shown. Requirement text descriptions are provided so the text of a requirement can be seen directly in Rhapsody Gateway.

The percentage of total DOORS requirements covered by the Rational Rhapsody model elements is indicated in Rhapsody Gateway window. For example, in the diagram below there is a 40% coverage of requirements. Two out of five requirements are covered by the Rational Rhapsody model elements.

converter

You are ready to learn how to change a requirement.

< Previous | Next >

Feedback