Newer
Older

Philip Makedonski
committed
Package Wizardry {
Type integer
Type string
Type Integer
Type String
Collection iCol of integer
// Collection nCol of iCol
Message Gate http accepts string, integer, String, Integer
Component node {

Philip Makedonski
committed
gate http interface2
gate http interface3
}
Configuration base {
node sut_node as SUT,
// node sut_node as Tester,

Philip Makedonski
committed
node tester as Tester,
connect sut_node::interface1 to tester::interface1,
connect sut_node::interface2 to tester::interface1
//TODO: TTCN-3 generation seems to have a problem with multiple connections on the same (system?) port..
//connect sut_node::interface1 to tester::interface3

Philip Makedonski
committed
}
Test example uses base {
tester::interface1 sends "hello"{string} to sut_node::interface1
tester::interface1 sends 1 {Integer} to sut_node::interface1
tester::interface1 sends 1 to sut_node::interface1 //TODO: unspecified type not resolved -> standard library Integer required

Philip Makedonski
committed
//better error messages?
// tester::interface3 receives 2 from sut_node::interface2

Philip Makedonski
committed
}
Annotation Initial conditions
Annotation Expected behaviour
Annotation Final conditions
Annotation Test Purpose Description
Annotation when
Annotation then
Objective name {
Description: "example"
References: "reference"
}
Test Purpose Description exampl {
Objective: name
Configuration: base
Expected behaviour
ensure that {
when {
tester::interface1 sends "hello" to sut_node::interface1

Philip Makedonski
committed
}
then {
tester::interface1 receives "hello back" from sut_node::interface1

Philip Makedonski
committed
}
}
}
Test Purpose Description exampl2 {
Objective: name
Configuration: base
Expected behaviour
ensure that {
when {
tester::interface1 sends "hello" to sut_node::interface1

Philip Makedonski
committed
}
then {
tester::interface1 receives "hello back" from sut_node::interface1