How to Write Testing Procedure in Use Case Flow of Events?

You can define the steps needed to complete a use case. Furthermore, you can create test cases around the steps, to make sure the use case will be completed correctly in any situations. In this tutorial, we will create test case for a use case named Login.

February 22, 2010
Views: 74,332
PDF Download
Compatible: Enterprise, Professional
  1. Download Webmail System.vpp. You can also find this file at the bottom of this tutorial.
  2. Open the downloaded .vpp file in Visual Paradigm. To open a project, select Project > Open from the application toolbar.
  3. Open the use case diagram Webmail System Use Case Model. You should see this:
    Use case diagram
  4. We need to edit the test cases for a use case. To do so, open the Use Case Details for the Login use case by right-clicking on it and selecting Use Case Details from the popup menu.
    Open Use Case Details
  5. Open the Flow of Events page. The Login use case is formed by a few simple steps: enter username and password, and click Submit. What we need to do is write test cases to make sure these three steps will work as expected in the final product.
    Open Flow of Events
  6. Move the mouse pointer to the right-hand side of the flow of events, click the (Menu) dropdown menu, and select Main. This dropdown menu is for selecting a test case. Main is the default.
    Select Main test case
    Now, the flow of events page is divided into three columns: Steps, Procedures, and Expected Results. By walking through the steps, the use case is said to be completed. Procedures and expected results are made for testing purposes. Procedures are the steps needed to test a use case step, while expected results are the outcomes expected from performing the testing procedures.
    Three columns for testing
  7. We want to start by writing a valid test case. In step one, we will test entering a username by entering 'peter', assuming that 'peter' is a valid and existing user. We expect to have the name 'peter' show in the username field. Enter Fill in peter as username in the Procedures cell for step 1. Since there is no doubt that entering text in a field will make the text appear, we will omit the expected results here. If you like, you can still enter Text "peter" shown in username field, but it would be a bit cumbersome.
    Enter procedure for step 1
  8. For step two, Enter password, specify Fill in mypwd as password in the Procedures cell. To make sure a proper password field is used, we need to specify the expected result by entering Five asterisk (*) characters are shown in the Expected Results cell.
    Enter procedure for step 2
  9. For step three, specify Click [Submit] in the Procedures cell. Enter Peter's Inbox is shown in the Expected Results cell.
    Enter procedure for step 3
  10. The test case name Main is not descriptive enough. Let's change it. Click the ... button next to the Main dropdown menu.
    Edit test case
  11. In the Testing Procedures dialog box, right-click Main and select Rename from the popup menu. Enter Login with valid username and password as the name.
    Rename Main
  12. Let's add another test case for testing invalid usage. In the Testing Procedures dialog box, click the + button and enter Login without username and password as the name. Confirm the changes and go back to the Flow of Events page.
    New testing procedures
  13. The test case is now Login without username and password. Let's fill in the procedures and expected results as shown below:
    Steps Procedures Expected Results
    Enter username Do not enter anything  
    Enter password Do not enter anything  
    Click [Submit] to open the Inbox page Click [Submit] Warning: "Please specify username and password" appears. Login is aborted.
  14. Save the project. This ends the tutorial.