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
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
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, Image Added confirms that each action has successfully been performed.

Image Added

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

Specific Keywords

Image Added offers a list of useful keywords to support the Business Expert. Those keywords are placed at the beginning of an action row.

AcceptConfirm that the action as been executed by the system under development.
CheckVerify the specified expected value with the value returned by the system under development
RejectThe action should not be performed by the system under development (expected errors).
DisplayPrint the value returned by the system under development.

Coloring

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

Panel
bgColorlightgreen
titleBGColorlightgreen
titleGreen
borderStyledashed

When the action has been executed successfully, Image Added color the cell(s) in green.

Panel
bgColor#f08080
titleBGColor#f08080
titleRed
borderStyledashed

If the action execution has failed, Image Added color the cell(s) in red.

Panel
bgColor#f0e68c
titleBGColor#f0e68c
titleYELLOW
borderStyledashed

If the system encounters an execution error, the cell is colored yellow and Image Added provides information about the error.

Panel
bgColorlightgrey
titleBGColorlightgrey
titleGrey
borderStyledashed

When the action has been executed successfully, Image Added will display the returned value in gray.

Standard form (without keyword)Only the Action description will be colored.
AcceptOnly the cell containing the keyword Accept will be colored.
CheckThe cell containning the expected value will be colored. In the case of a failure, Image Added will show the expected and the returned values.
RejectOnly the cell containing the keyword Reject will be colored.
DisplayA new cell at the end of the row will be colored containing the returned value.

Writing a Do With specification

When do we use the DoWithInterpreter

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, Image Added confirms that each action has successfully been performed.

First row: Identification of the Do With

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 defined before any sequence of actions.

Example of a bank Account management system

Example context : The system under development must be able to manage two different types of bank account. The system should allow to execute the usual transactions within an account.

So the first line could be expressed as

do withbank account management

or more simply as

do withbank

Following rows: Actions & Verifications

The second and following rows are used to express specific actions or verifications. The business expert should express the action in human readable format rather than using computer like language.

Info

The form of each row of a DoWithInterpreter must follow these rules:

  • a row begins with a part of the action description.
  • each parameter is isolated in a cell
  • each parameter is separated by parts of the action description.
  • an action description can be blank

More visually:

Action description part 1parameter 1Action description part 2parameter 2Action description part 3Parameter 3...

Example: In our bank example, the first action would be to create a bank account .

If we want to take the account number as a parameter, we would have:

open checking account12345-67890

But, if we want to consider the type of account, the account number, the owner first name and last name as parameters, we would have:

opencheckingaccount12345-67890under the name ofSpongebob Squarepants

Example: Verify the balance of an account

To verify the success of a particular action, we write the keyword "Check" prior to the first part of the action description.
In our example, there would be two parameters: the account number and the amount of balance.

checkthat balance of account12345-67890is$0.00

Final expression of our example

do withbank

Our first business rule says that a new account should have a balance of 0.00 dollars.

opencheckingaccount12345-67890under the name ofSpongebob Squarepants
checkthat balance of account12345-67890is$0.00

Our next rule says that the bank should not take any fees when we deposit money in our account.

deposit$100.00in account12345-67890
checkthat balance of account12345-67890is$100.00

The following rule says that a customer should be able to withdraw funds if the balance of his account is sufficient.

withdraw$50.00from account12345-67890
checkthat balance of account12345-67890is$50.00
rejectwithdraw$75.00from account12345-67890
checkthat balance of account12345-67890is$50.00
acceptwithdraw$25.00from account12345-67890

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 will color cells in green if the execution has passed and color it in red if the execution has failed. The colored cells depends on the type of action described:

  • in a standard action row (without a keyword at the beginning), only the Action description will be colored,
  • if the action begins with the keyword Check, the value tested will be colored and in the case of a failure, Image Added will show the expected and the returned values,
  • if the action begins with the keywords Reject or Accept, only the cell containing the keyword will be colored.
  • if the action begins with the keywords Display, only a new cell at the end of the row containing the returned value will be colored.
Info

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