Creating a simple SysML requirement diagram
- Select Project > New from the application toolbar.
- In the New Project window, enter Tutorial as Name.
- Click Create Blank Project.
- Create a SysML requirement diagram first. You can create a requirement diagram by selecting Diagram > New from the application toolbar. Select Requirement Diagram in the New Diagram window and then click Next. Click OK again to create the diagram.
- Click a requirement Support registration.
Creating test cases
Let's create some test cases for the requirement Support registration.- Move your mouse pointer over the requirement.
- Press on the Resource Catalog icon and drag it out.
- Release the mouse button. Select Verify <- Test Case from Resource Catalog.
- Name the test case as Test Age Input
- In addition to having a named test case shape, you can define the steps to test as well. Open the specification by right clicking on test case Test Age Input and selecting Open Specification... from the popup menu.
- Open the tab Test Plans. 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:
- User name: john
- Age: 20Entered data appear in form Submit the form Click the submit button Prompt: Application is submitted
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:
- User name: john
- Age: -1Entered data appear in form Submit the form Click the submit button Prompt: Invalid age. Please re-enter.
The screen should look like this:
Producing a document of requirements and test cases
In this section you are going to produce a Word document that contains the details of requirements and test cases.- Select Tools > Doc. Composer from the application toolbar.
- Select Build Doc from Scratch.
- Find the requirement diagram in Diagram Navigator. Press on the diagram and drag it onto the document.
Your document should look like this:
- Press on the requirement Support registration in Diagram Navigator and then drag it onto the document.
Your document should look like this:
- Select the two test cases in Diagram Navigator.
- Select the Details template under the Template pane and then drag it onto the document.
Finally, your document should look like this:
- Click on Export > Word Document... at the top right of Doc. Composer.
- In the Export Word Doc. window, provide the output path of the .docx file to be exported and then click Export at bottom right.
Open the Word file. You can obtain a detailed requirement specification with test cases defined, like this:
- Save the project. This is the end of the tutorial.