Download IBM Gotcha TCBeans Users guide
Transcript
Declarations Procedures Rules 1. Declarations 2. Functions and Procedures 3. Rules and Directives A GDL description consists of: • Declarations of constants, types, and global variables. • Declarations and descriptions of functions and procedures (optional). • A collection of transition rules. • A description of the states where test cases may start. • A description of the states where test cases may end (optional). • A set of coverage criteria (optional). • A set of state invariants and test constraints (optional). The behavioural part of GDL is a collection of transition rules. Each transition rule is a command with a pre-condition (a Boolean expression on the global variables) and an action (a block of statements that modify the values of the variables). In GDL Release 3.0 and higher, a transition rule may have several actions associated with it, each of which represents a possible outcome of the transition rule. A transition with more than one possible action is called a pluRule and is used to model non-deterministic behaviour of software. The condition and the action(s) are both written in a Pascal-like language. The action can be an arbitrarily complex statement block containing loops and conditionals. No matter how complex it is, the action is executed ATOMICALLY; no other rule can change the variables or otherwise interfere with it while it is being executed. A GDL Model implicitly determines a state graph (see A Sample Model – Hello World). A state is a node in the graph that is labeled by an assignment of a value to each global variable. The start states of the graph are defined by TC_StartTestCase clauses in the <rules> section of the program. The transitions or directed arcs of the graph are defined Writing a Behavioural Model Page 12 of 108 GOTCHA Users Guide