Home Corporate Contacts
TETware White Paper
You are here: TETworks > White Papers > Scenarios
As with many terms, scenario means different things to different people in the world of software testing. In TETware we use test scenarios to tell the test case controller which test cases to process and how to process them. The scenarios are stored in a scenario file. The file may contain one or more scenarios, and they may be cross-referenced. The file is written is a simple, but powerful, scenario language.
The scenario language is used to define the scenarios. Each scenario consists of a scenario name, the first word in a scenario, that may be followed by scenario elements. These elements may be simple elements or directives. Comments may also be included to describe the test scenarios and their purpose.
Simple ElementsSimple scenario elements include:
Scenario directives effect the way in which the simple elements are processed by the test case controller. A directive may have the simple element attached to it, or alternatively if an element is not attached to it subsequent elements will be processed within the scope of the directive until a matching end directive is reached.
List of scenario directives:
Directives may be grouped together, in which case elements are processed within the scope of all the directives in the group. Certain directives can appear within the scope of other directives, but others may not (for example a repeat directive cannot fall within the scope of a random directive, that does not make sense).
The scenario language provides the user with a great deal of flexibility in defining test scenarios, for example, take two instances of a timed loop execute in parallel. In each loop a single test case is chosen at random from the list of test cases. Each loop is repeated until its execution time has exceeded 300 seconds.
This scenario may be defined as follows:
or as follows:
or as follows:
The different versions of this scenario shown here illustrate how the same scenario may be written with or without the use of directive groups.
When TETware processes this scenario in execute mode, two instances of the timed loop are initiated at the same time. Each timed loop instance iterates until 300 seconds have expired. During each iteration of each loop instance, a single test case is selected at random from the list and executed.
The way in which TETware processes this scenario may be represented by the following diagram:
ConclusionThe TETware scenario language is a highly flexible tool for determining which test cases should be processed, and how they should be processed. It's one of the benefits of using TETware, an off-the-virtual-shelf test execution management system that helps developers take the drudge out of software test development (more . . . )
For more information please see Chapter 4 of the TETware Programmers Guide. Click here to download a copy.