This package describes how we describe tests and groups of tests. Test Definitions are defined using given , when , and then clauses as used in the popular Gherkin language for defining tests according to the Behaviour Driven Developement (BDD) approach. We can have multiple tests with different test data which are linked to the same test definition. In order to group tests together, we parameterize the clauses of test definitions, this is also popular in BDD. In order to provide well defined coverage, we constrain how the parameters can be set to a particular set of values, the way we constrain this is by defineing in constraints what the 'parent object' of a parameter is. By having a contrained list of choices for a parameter, we can create a coverage grid of the set of possible combined choices for the parameters of a test definition.
A module containing a set of TestContraints
References |
||
---|---|---|
Name |
Properties |
Documentation |
coverageTestSets
|
Cardinality: [0..*]
Containment
|
The TestConstraints |
a set of contraints upon the parameters described in an associated Test Template
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
name
|
T: EString
Cardinality: [0..1]
Identifier
| The name, and unique ID, of the constraints |
References |
||
---|---|---|
Name |
Properties |
Documentation |
givenParams
|
T: Param
Cardinality: [0..*]
Containment
|
A set of constraints for the parameterization of the individual parameters of the given clause of a test template. In a test definition which refers to this constraint, then for each parameter, only child elements of the objects chosen in this constraints information can be selected. This constrant is technically enforce using scoping rules. |
template
|
Cardinality: [0..1]
|
The associated Test Template |
thenParams
|
T: Param
Cardinality: [0..*]
Containment
|
A set of constraints for the parameterization of the individual parameters of the then clause of a test template. In a test definition which refers to this constraint, then for each parameter, only child elements of the objects chosen in this constraints information can be selected. This constrant is technically enforce using scoping rules. |
whenParams
|
T: Param
Cardinality: [0..*]
Containment
|
A set of constraints for the parameterization of the individual parameters of the when clause of a test template. In a test definition which refers to this constraint, then for each parameter, only child elements of the objects chosen in this constraints information can be selected. This constrant is technically enforce using scoping rules. |
A TestDefinition decribes a parameterised test. It references a TestConstraint that it meets, which in turn references a TestTemplate that it meets to define the parameters that must be set and their expected types provided by example.
References |
||
---|---|---|
Name |
Properties |
Documentation |
given
|
T: Given
Cardinality: [0..1]
Containment
|
The given clause of the test |
testContraints
|
Cardinality: [0..1]
|
The constraints met by the TestDefinition |
then
|
T: Then
Cardinality: [0..1]
Containment
|
The then clause of the test |
when
|
T: When
Cardinality: [0..1]
Containment
|
The when clause of the test |
A module containing a set of TestDefinitions
References |
||
---|---|---|
Name |
Properties |
Documentation |
testDefinitions
|
Cardinality: [0..*]
Containment
|
The TestDefinitions |
A TestTemplates describes what parameters exist in the given when and then clauses of a TestDefinition. It also gives and example of one valid setting for each Parameter, this is an easy way to set the type of the parameter by example. The actual parameters of the TestDefintion should be set to objects of the same type as the example parmater, and should meet the contraints defined int he TestConstraints associated with the TestDefinition.
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
name
|
T: EString
Cardinality: [0..1]
Identifier
| The name, and id, of the TestTemplate |
References |
||
---|---|---|
Name |
Properties |
Documentation |
givenParams
|
T: Param
Cardinality: [0..*]
Containment
|
The parameters of the given clause |
givenText
|
T: ClauseText
Cardinality: [0..1]
Containment
|
The text of the given clause |
thenParams
|
T: Param
Cardinality: [0..*]
Containment
|
The parameters of the then clause |
thenText
|
T: ClauseText
Cardinality: [0..1]
Containment
|
The text of the then clause |
whenParams
|
T: Param
Cardinality: [0..*]
Containment
|
The parameters of the when clause |
whenText
|
T: ClauseText
Cardinality: [0..1]
Containment
|
The text of the when clause |
A Module with a set of TestTemplates
References |
||
---|---|---|
Name |
Properties |
Documentation |
templates
|
Cardinality: [0..*]
Containment
|
The templates |
A cluase, i.e a given when or then clause.
References |
||
---|---|---|
Name |
Properties |
Documentation |
params
|
T: Param
Cardinality: [0..*]
Containment
|
The parameters of a clause |
regulatoryTextLinks
|
Cardinality: [0..*]
|
The links to regulatory text for a clause |
text
|
T: ClauseText
Cardinality: [0..1]
|
The text of a clause |
The text of a clause
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
name
|
T: EString
Cardinality: [0..1]
Identifier
| The text of a clause, for now this should have no spaces making it a valid ID. |
For a TestConstraint, we can imagine the complete set of combinations of possible parameters that meet the constraint, make up a coverage grid.
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
name
|
T: EString
Cardinality: [0..1]
Identifier
| The name of the coverage grid |
References |
||
---|---|---|
Name |
Properties |
Documentation |
coverageGridPoints
|
Cardinality: [0..1]
Containment
|
One Point of the Coverage grid |
coverageTestSet
|
Cardinality: [0..1]
|
The Test Constraint |
One Point of the Coverage grid
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
count
|
T: EInt
Cardinality: [0..1]
|
References |
||
---|---|---|
Name |
Properties |
Documentation |
objects
|
T: EObject
Cardinality: [0..*]
|
The set of parameter values that identify that grid point. |
A TestDefinition which represents and End To End Test
A Given clause
A Parameter of a clause, these should be set in the test definition
References |
||
---|---|---|
Name |
Properties |
Documentation |
param
|
T: EObject
Cardinality: [0..1]
|
The object to which the parameter is set. |
References |
||
---|---|---|
Name |
Properties |
Documentation |
inputModules
|
Cardinality: [0..*]
|
|
processingModules
|
Cardinality: [0..*]
|
|
reportCellCreationModules
|
Cardinality: [0..*]
|
|
scenarios
|
T: Scenario
Cardinality: [0..*]
|
A module containing a set of TestDefinitions
References |
||
---|---|---|
Name |
Properties |
Documentation |
testDefinitions
|
Cardinality: [0..*]
Containment
|
The TestDefinitions |
A TestDefinition decribes a parameterised test. It references a TestConstraint that it meets, which in turn references a TestTemplate that it meets to define the parameters that must be set and their expected types provided by example.
Attributes |
||
---|---|---|
Name |
Properties |
Documentation |
name
|
T: EString
Cardinality: [0..1]
Identifier
| The name of the TestDefinition |
A Then clause
A TestDefinition which represents a Unit Test
A When clause