test_definition package

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.

EPackage properties:
Namespace Prefix: test_definition
Namespace URI: http://www.eclipse.org/efbt/test_definition

BDDTestConstraintsModule

A module containing a set of TestContraints

Supertype:Module

References
Name
Properties
Documentation
coverageTestSets
Cardinality: [0..*]
Containment

The TestConstraints

BDDTestContraints

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

BDDTestDefinition

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.

Supertype:TestDefinition

References
Name
Properties
Documentation
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

BDDTestDefinitionModule

A module containing a set of TestDefinitions

Supertype:Module

References
Name
Properties
Documentation
testDefinitions
Cardinality: [0..*]
Containment

The TestDefinitions

BDDTestTemplate

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
Cardinality: [0..*]
Containment

The parameters of the given clause

givenText
Cardinality: [0..1]
Containment

The text of the given clause

thenParams
Cardinality: [0..*]
Containment

The parameters of the then clause

thenText
Cardinality: [0..1]
Containment

The text of the then clause

whenParams
Cardinality: [0..*]
Containment

The parameters of the when clause

whenText
Cardinality: [0..1]
Containment

The text of the when clause

BDDTestTemplateModule

A Module with a set of TestTemplates

Supertype:Module

References
Name
Properties
Documentation
templates
Cardinality: [0..*]
Containment

The templates

Clause

A cluase, i.e a given when or then clause.

References
Name
Properties
Documentation
params
Cardinality: [0..*]
Containment

The parameters of a clause

Cardinality: [0..*]

The links to regulatory text for a clause

text
Cardinality: [0..1]

The text of a clause

ClauseText

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.

CoverageGrid

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

CoverageGridPoint

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.

E2EBDDTestDefinition

A TestDefinition which represents and End To End Test

Supertype:BDDTestDefinition

Given

A Given clause

Supertype:Clause

Param

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.

RegFunctionalityTestDefinition

Supertype:TestDefinition

References
Name
Properties
Documentation
inputModules
Cardinality: [0..*]
processingModules
Cardinality: [0..*]
reportCellCreationModules
Cardinality: [0..*]
scenarios
Cardinality: [0..*]

RegFunctionalityTestDefinitionModule

A module containing a set of TestDefinitions

Supertype:Module

References
Name
Properties
Documentation
testDefinitions
Cardinality: [0..*]
Containment

The TestDefinitions

TestDefinition

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

Then

A Then clause

Supertype:Clause

UnitTestDefinition

A TestDefinition which represents a Unit Test

Supertype:BDDTestDefinition

When

A When clause

Supertype:Clause