Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3. List Validation (List of, Set of, Superset of, Subset of)

Definition

Panel
bgColor#FFFFFF
titleBGColor#F0F0F0
titleDEFINITION
borderStylesolid

The collection interpreters are used to express any kind of groups, lists or sets of values.

When a collection interpreter is executed,  compares the list of values expected with the list of values returned by the system under development. The test result depends on the specific collection interpreter selected.

  • As for all other interpreters, the first row of the collection interpreters specifies the name of the interpreter and the name of the collection to be tested.
  • The next row is used to define the name of each attribute related to the members of the collection of data.
  • The following rows are used to specify the set of values to test.

...

4. Workflow validation

Definition

Panel
bgColor#FFFFFF
titleBGColor#F0F0F0
titleDEFINITION
borderStylesolid

The DoWithInterpreter is used to express interactions with the system under development that must be performed in a particular order. This form of specification provides information about the business flow.

When a sequence of action is executed,  confirms that each action has successfully been performed.

  • As for all other interpreters, the first row of the DoWithInterpreter specifies the name of the interpreter and the name of the sequence of actions to be tested. What makes the DoWithInterpreter particular is that it only have to be defined once for all the sequences of actions expressed in a page. Obviously, the DoWithInterpreter must be define before any sequence of actions.
  • The following rows are used to express specific actions.
  • The form of each row of a DoWithInterpreter shall respect the following rules:
    • a row shall begin with a part of the action description,
    • each parameter shall be isolated in a cell,
    • each parameter shall be separated by parts of the action description.
  • An action description can be left blank in order to separate two parameters.
  • The DoWithInterpreter provide a minimum of keyword used to define specific action.
  • The DoWithInterpreter may also be expressed in Bullet List form or Number List form.

...

5. Scenario specification

Definition

Panel
bgColor#FFFFFF
titleBGColor#F0F0F0
titleDEFINITION
borderStylesolid

The ScenarioInterpreter is used to express interactions with the system under development that must be performed in a particular order. This form of specification provides information about the business flow.

When a sequence of action is executed, Image Removed Image Added confirms that each action has successfully been performed.

ScenarioIdentification of the set of rule
Action 1
Action 2
...
Action i
  • As for all other interpreters, the first row of the ScenarioInterpreter specifies the name of the interpreter and the name of the sequence of actions to be tested. What makes the ScenarioInterpreter particular is that it only have to be defined once for all the sequences of actions expressed in a page. Obviously, the ScenarioInterpreter must be define before any sequence of actions.
  • The ScenarioInterpreter may also be expressed in Bullet List form or Number List form.

 

...

Info

The examples provided in this page are used to explain how to write the fixture for the ScenarioInterpreter.

6. Context definition (Setup)

Definition

Panel
bgColor#FFFFFF
titleBGColor#F0F0F0
titleDEFINITION
borderStylesolid

The SetUpInterpreter is used to simplify the creation of a particular state for the system under development. Once the state is created, we can focus on the business process to test.

When a setup table is executed, Image Added enter data in the system under development to create the desired state.

Image Added

  • The first row of the table indicates the name of the interpreter and the name of the desired state.
  • The second row is called the header row and serves to identify the data to be inserted in the system under development.
  • Finally, the remaining rows captures the data to be inserted.

Coloring

Image Added will visually show the test result by coloring each testing cell:

Panel
bgColorlightgreen
titleBGColorlightgreen
titleGreen
borderStyledashed

When the insertion has been executed successfully, Image Added add a green cell at the end of the data row with the word entered.

Panel
bgColor#f08080
titleBGColor#f08080
titleRed
borderStyledashed

If the insertion has failed because the values specified does not respect a business rule, Image Added add a red cell at the end of the row with the word not entered.

Panel
bgColor#f0e68c
titleBGColor#f0e68c
titleYELLOW
borderStyledashed

If the insertion has failed because a specified value generates an error, Image Added colors the cell of the data in error yellow and provides information about the error.
If the system encounters an error not related to a specific data, Image Added add a yellow cell at the end of the data row and provides information about the error.

Writing a Setup specification

When do we use the SetUpInterpreter

The SetUpInterpreter is used to simplify the creation of a particular state for the system under development. Once the state is created, we can focus on the business process to test.

When a setup table is executed, Image Added enter data in the system under development to create the desired state.

First row: Identification of the Set Up

As for all other interpreters, the first row of the setup table specifies the name of the interpreter and the name of the desired state.

Example of a bank Account management system

Example context : A customer should be allowed to transfer money from his or her accounts.

In order to create examples that would test this particular business rule, we need to create a set of customer. The first line of our setup table could be expressed as

setupa group of customers

Second row: the Header

The second row is called the header row and serves to identify the data to be inserted in the system under development.

Example: In our bank example, the header row could take the following form.

setupa group of customers
typenumberfirst namelast namebalance

Following rows: Data

The remaining rows captures the data to be inserted. They are the executable rows.

Final expression of our example

setupa group of customers
typenumberfirst namelast namebalance
checking11111-11111FredFlintstone$250.00
savings22222-22222FredFlintstone$10 000.00
savings44444-44444WilmaFlintstone$10 000.00
checking44444-44444BarneyRubble$999.54
checking55555-55555GreatGazooabc

From that point, we can now used those accounts to specify examples that define a business rule.

do withbank

Transfer from a savings account to a checking account of the same customer

acceptTransfer$1 000.00from account22222-22222to account11111-11111
checkthat balance of account11111-11111is$1 250.00
checkthat balance of account22222-22222is$9 000.00

Execution of specification

Based on those executable specifications, the developers are now ready to code the functionality and the fixture (the fixture is the link between the system under development and the executable specification). Once this is done, the specification can be executed by clicking on the Execute button on the top of the page.

During execution, Image Added confirm that the value has been entered by adding a green cell at the end of each data rows containing the word entered.

If the data could not have been entered because it does not respect a known business rule, the cell will be yellow and will specify the stacktrace. Finally, if the data could not have been entered because of an unknown error, Image Added will add a yellow cell at the end of the row containing information about the exception. Note that if the error is specific to a data provided, Image Added will color this specific cell yellow and will include the information about the exception.

Info

The examples provided in this page are used to explain how to write the fixture for the SetupInterpreter.