Prev Next

Generate Test Cases

When you have defined a scenario, you can generate one of a number of Test Cases from it, including:

  • A Test Suite - Horizontal Layout
  • A Test Suite - Vertical Layout
  • An Internal Test Case or
  • An External Test Case

Access

On a diagram or in the Project Browser, select an element and use one of these access paths to display the Structured Specification tab, then click on and select the testcase type.

Ribbon

Design > Element > Responsibilities > Scenarios > Structured Specification  or

Design > Element > Properties > Properties Dialog > Responsibilities > Scenarios > Structured Specification

Context Menu

Right-click on element | Properties | Responsibilities > Scenarios > Structured Specification

Keyboard Shortcuts

Alt+Enter > Scenarios > Structured Specification  or

Ctrl+Shift+3 > Scenarios > Structured Specification  or

Shift+Alt+S > Structured Specification

Other

Double-click on element > Scenarios > Structured Specification

Test Cases Generated

Test Case

Detail

See also

Test Suite - Horizontal Layout

A Test Case element is created, which acts as a container for the created diagram and Test Suite elements.

The basic path and each alternate and exception path is represented by a Test Case element. Each step in the basic, alternate and exception paths is represented by a Test element.

A diagram is created under the container Test Case element, to which the Test Case and Test elements are added.

The elements are displayed on the diagram in a matrix-like format, with the basic path and its steps forming the first column followed by the alternate and exception paths.

Note that the name of each created Test Case and Test element is truncated to 25 characters.

Test Case Test Suite Test Element

Test Suite - Vertical Layout

A Test Case element is created, which acts as a container for the created diagram and Test Suite elements.

The basic path and each alternate and exception path is represented using a Test Case element. Each step in the basic, alternate and exception paths is represented by a Test element.

A diagram is created under the container Test Case element, to which the Test Case and Test elements are added.

The elements are displayed on the diagram in a single column with the basic path and its steps at the top followed by each alternate and/or exception path and its steps.

Test Case Test Suite Test Element

Internal Test Case

A test is generated for the basic path and each alternate and exception path in the scenario, and added to the selected element.

In addition, for each step in the basic, alternate and exception paths that has a value in the 'Results' column, a test is generated and added to the selected element.

A diagram is created under the selected element, to which that element and a Note (showing the element's Structured Specification) is added.

The created tests are displayed in the Test Scripts compartment of the selected element on the diagram. Another way to view these tests is to click on the element and display the Testing window.

These generated tests are written to the Scenario Class Type of the Testing window; you can change the tests to another test-type if required.

Show Test Scripts compartment Move Or Copy Tests Between Categories

External Test Case

A Test Case element is created, linked to the selected element using the Trace connector.

A diagram is created under this Test Case element, to which the selected element, the Test Case element and a Note (showing the element's Structured Specification) is added.

The created tests are displayed in the Test Scripts compartment of the Test Case element on the diagram.

A test case is generated and added to the Test Case element for the basic path, and for each alternate and exception path.

In addition, for each step in the basic, alternate and exception paths that has a value in the 'Results' column, a test is generated and added to the Test Case element.

You can review the tests within the Test Case element using the Testing window, as for Internal Test Cases.

Test Case Trace Show Test Scripts compartment

Learn more