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.

April 14, 2010
User Rating: / 7
Views: 5,921
PDF Link Add comments
Edition: Standard or above (Edition comparison)

  1. Start Visual Paradigm for UML in new workspace.
  2. Create a new project by selecting File > New Project from the popup menu.
  3. Name the project as Online Application and click Create Blank Project to create the project.
  4. 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.
    new requirement diagram
  5. Select Requirement from diagram toolbar and click on the diagram to create one. Name the requirement as Registration Form and press Enter to confirm.
    create requirement
  6. 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.
    test case created
  7. 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 test case spec
  8. 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.
    test plans tab
  9. Enter the steps as shown below:
    Step Procedure Expected Result
    Enter user information Enter:
    • User name: john
    • Age: 20
    Entered data appear in form
    Submit the form Click the submit button Message "Application is submitted" appear

    The screen should look like this:
    test plan specified
  10. Click OK to confirm.
  11. 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.
    test case invalid age created
  12. Enter the test plan as shown below:
    Step Procedure Expected Result
    Enter user information Enter:
    • User name: john
    • Age: -1
    Entered data appear in form
    Submit the form Click the submit button Message "Invalid age. Please re-enter." appear
  13. 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).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of 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.

Write comment

Rating

Comment

Enter the calculation result

security code