Home Corporate Contacts

TETware White Paper




You are here: TETworks > White Papers > Scenarios

Test 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 Elements

Simple scenario elements include:
  • the scenario information line, this is text enclosed in double quotes which is printed to the journal file.  It may then be picked up by a report writer or written to a database.
  • The test case name, with an optional list of invocable components which gives the user the flexibility to select only certain tests from a group of tests
  • A referenced scenario name, so we can call another scenario from within a scenario.
  • Include file name, which contains the test case names and the scenario information lines to they don't have to be entered into every scenario file, and a single change will update all our scenarios.


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:

repeat Process elements a specified number of times
timed_loop Process elements for a specified period of time
random Process a test case selected at random from a list
parallel Process elements in parallel
remote Process test cases on remote systems
distributed Process distributed test cases
include Process elements listed in an include file

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:


The 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.



Home Contacts Legal Copyright Corporate News

Copyright © The Open Group 1995-2012, All Rights Reserved