...
3. List Validation (List of, Set of, Superset of, Subset of)
Definition
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.
|
...
4. Workflow validation
Definition
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.
|
...
5. Scenario specification
Definition
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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, confirms that each action has successfully been performed.
|
...
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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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, enter data in the system under development to create the desired state.
|
Coloring
will visually show the test result by coloring each testing cell:
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
When the insertion has been executed successfully, add a green cell at the end of the data row with the word entered. |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
If the insertion has failed because the values specified does not respect a business rule, add a red cell at the end of the row with the word not entered. |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
If the insertion has failed because a specified value generates an error, colors the cell of the data in error yellow 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, 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
setup | a 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.
setup | a group of customers | |||
type | number | first name | last name | balance |
Following rows: Data
The remaining rows captures the data to be inserted. They are the executable rows.
Final expression of our example
setup | a group of customers | |||
type | number | first name | last name | balance |
checking | 11111-11111 | Fred | Flintstone | $250.00 |
savings | 22222-22222 | Fred | Flintstone | $10 000.00 |
savings | 44444-44444 | Wilma | Flintstone | $10 000.00 |
checking | 44444-44444 | Barney | Rubble | $999.54 |
checking | 55555-55555 | Great | Gazoo | abc |
From that point, we can now used those accounts to specify examples that define a business rule.
do with | bank |
Transfer from a savings account to a checking account of the same customer
accept | Transfer | $1 000.00 | from account | 22222-22222 | to account | 11111-11111 |
check | that balance of account | 11111-11111 | is | $1 250.00 | ||
check | that balance of account | 22222-22222 | is | $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, 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, 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, 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. |