Test Case Planning for SysML Requirement
Requirement diagram is a useful tool for recording, describing and organization both functional and non-functional requirements of a system. In addition, you can describe how the requirements will be verified with test cases. In this tutorial, we will create a requirement about registration form, and add test cases to test the validity of age entry.
- Start Visual Paradigm for UML in new workspace.
- Create a new project by selecting File > New Project from the popup menu.
- Name the project as Online Application and click Create Blank Project to create the project.
- We are going to draw a simple requirement. To create a requirement diagram, right click on Requirement Diagram in Diagram Navigator and select New Requirement Diagram from the popup menu. At the top left corner of diagram, name the diagram as Registration Form and click on the diagram background to confirm.

- Select Requirement from diagram toolbar and click on the diagram to create one. Name the requirement as Registration Form and press Enter to confirm.

- The requirement Registration From represents the need of providing a page for user to enter and submit personal information. We want to model the need of validating user's input. We can make use of test case. Move the mouse pointer over requirement Registration Form, press on the resource icon Verify <- Test Case, drag it out and release the mouse button right to the requirement. Name the test case as Test Age Input.

- In addition to having a named test case shape, you may define the steps for testing. Open the specification by right clicking on test case Test Age Input and select Open Specification... from the popup menu.

- Open the tab Test Plans, where you how will the requirement by verified. There are three columns. The Steps column defines a set of steps to test the requirement in a more general angle. The Procedures column defines also the steps, but in a more concrete manner by providing also test data. The Expected Results column is the result expected to achieve by walking through the defined procedures.

-
Enter the steps as shown below:
| Step |
Procedure |
Expected Result |
| Enter user information |
Enter:
|
Entered data appear in form |
| Submit the form |
Click the submit button |
Message "Application is submitted" appear |
The screen should look like this:
- Click OK to confirm.
- Create another test case to test invalid age input. Repeat the previous steps to create test case Test Invalid Age Input from requirement Registration Form.

-
Enter the test plan as shown below:
| Step |
Procedure |
Expected Result |
| Enter user information |
Enter:
|
Entered data appear in form |
| Submit the form |
Click the submit button |
Message "Invalid age. Please re-enter." appear |
- Save the project. This is the end of the tutorial.
Rate this Article
Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).
One Moment Please
Thanks for rating this article.
Comments (2)
written by kavitha on September 2, 2011
confusing
written by Jick Yeung on September 2, 2011
Hi kavitha,
Thank you for your comment. May I know the part/step(s) that you felt confused? We would like to provide you with additional details.