Documente Academic
Documente Profesional
Documente Cultură
Concurrent TTCN-3
Why do we need a concurrent test architecture? What kind of architectures can be used? How TTCN-3 supports such architectures? A TTCN-3 example TTCN-3 Configuration Operations Tips and Guidelines
Telelogic AB
Terminology
PCO CP MTC PTC TS TSI SUT
Point of Control and Observation (Port type) Control Point (Port type) Main Test Component (Component type) Parallel Test Component (Component type) Test System Test System Interface System Under Test
Tester1 System Under Test Tester2
Telelogic AB
Terminology
PCO CP MTC PTC TS TSI SUT
TS CP PTC MTC CP PTC
4
Telelogic AB
Point of Control and Observation (Port type) Control Point (Port type) Main Test Component (Component Type) Parallel Test Component (Component Type) Test System Test System Interface System Under Test
PCO TSI PCO SUT
Tester1
SUT
Tester2
Telelogic AB
T1 A B
SUT
T2
Telelogic AB
T1 A
SUT
T2
C B
Telelogic AB
Telelogic AB
Telelogic AB
10
Telelogic AB
Tester1
Tester2
Tester3
11
Telelogic AB
Test System
12
Tester3
Telelogic AB
Tester1
Tester2
Tester3
13
Telelogic AB
Each tester is different: multiple component types. But one port type per component type.
Tester1 Master Tester2 System Under Test
Test System
14
Tester3
Telelogic AB
Tester2
15
Telelogic AB
Each tester is different: multiple component types. Multiple port types per component type.
Tester1 USB/IP Master Tester2 Video Voice FireWire/IP Test System
16
Tester3
Telelogic AB
Test System
17
Telelogic AB
19
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description testcase testcase TC_Concurrent_01() TC_Concurrent_01() runs runs on on MTC_Type MTC_Type system system TSI_Type TSI_Type { { ... ... } }
mtc:MTC_Type
system:TSI_Type
20
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description testcase testcase TC_Concurrent_01() TC_Concurrent_01() runs runs on on MTC_Type MTC_Type system system TSI_Type TSI_Type { { ... ... } } type type component component MTC_Type MTC_Type { { port port CP_Type CP_Type CP1; CP1; port port CP_Type CP_Type CP2; CP2; } } type type component component TSI_Type TSI_Type { { port port PCO1aType PCO1aType PCO1a; PCO1a; port port PCO2aType PCO2aType PCO2a; PCO2a; } } // // other other components components ... ... type type port port CP_Type CP_Type message message { { inout inout // // messages messages .. .. } } // // other other ports ports ... ... 21
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description ... ... PTC1 create PTC1 := := PTC1Type. PTC1Type. create PTC2 create PTC2 := := PTC2Type. PTC2Type. create ... ...
PTC1:PTC1Type
PTC2:PTC2Type
PCO1a system
PCO2a
22
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description ... ... PTC1 create PTC1 := := PTC1Type. PTC1Type. create PTC2 create PTC2 := := PTC2Type. PTC2Type. create ... ...
type type component component PTC1Type PTC1Type { { port port CP_Type CP_Type CP; CP; port port PCO1bType PCO1bType PCO1b; PCO1b; } } type type component component PTC2Type PTC2Type { { port port CP_Type CP_Type CP; CP; port port PCO2bType PCO2bType PCO2b; PCO2b; } } // // other other components components ... ... type type port port PCO1bType PCO1bType message message { { inout inout // // messages messages .. .. } } // // other other ports ports ... ... 23
CP:CP_Type PTC1
CP:CP_Type PTC2
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description ... ... connect ( mtc :CP1, connect ( mtc :CP1, PTC1:CP); PTC1:CP); connect ( mtc :CP2, connect ( mtc :CP2, PTC2:CP); PTC2:CP); ... ...
24
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description ... ... map (PTC1:PCO1b, :PCO1a); map (PTC1:PCO1b, system system :PCO1a); map (PTC2:PCO2b, :PCO2a); map (PTC2:PCO2b, system system :PCO2a); ... ...
25
Telelogic AB
A TTCN-3 Example
// // Behavior Behavior description description ... ... PTC1. start (TS_InitiateCall()); PTC1. start (TS_InitiateCall()); PTC2. start (TS_AnswerCall()); PTC2. start (TS_AnswerCall()); ... ...
mtc
function function TS_InitiateCall() TS_InitiateCall() runs runs on on PTC1Type PTC1Type { { ... ... PCO1b. send (msg1); PCO1b. send (msg1); ... ... } } function function TS_AnswerCall() TS_AnswerCall() runs runs on on PTC2Type PTC2Type { { ... ... PCO2b. receive (msg2); PCO2b. receive (msg2); CP. send (statusConnected); CP. send (statusConnected); ... ... } } 26
Telelogic AB
PTC1
PTC2
msg1 system
A TTCN-3 Example
// // Behavior Behavior description description ... ... PTC1. start (TS_InitiateCall()); PTC1. start (TS_InitiateCall()); PTC2. start (TS_AnswerCall()); PTC2. start (TS_AnswerCall()); ... ...
mtc
function function TS_InitiateCall() TS_InitiateCall() runs runs on on PTC1Type PTC1Type { { ... ... PCO1b. send (msg1); PCO1b. send (msg1); ... ... } } function function TS_AnswerCall() TS_AnswerCall() runs runs on on PTC2Type PTC2Type { { ... ... PCO2b. receive (msg2); PCO2b. receive (msg2); CP. send (statusConnected); CP. send (statusConnected); ... ... } } 27
Telelogic AB
PTC1
PTC2
msg2 system
A TTCN-3 Example
// // Behavior Behavior description description ... ... PTC1. start (TS_InitiateCall()); PTC1. start (TS_InitiateCall()); PTC2. start (TS_AnswerCall()); PTC2. start (TS_AnswerCall()); ... ...
mtc
status Connected
function function TS_InitiateCall() TS_InitiateCall() runs runs on on PTC1Type PTC1Type { { ... ... PCO1b. send (msg1); PCO1b. send (msg1); ... ... } } function function TS_AnswerCall() TS_AnswerCall() runs runs on on PTC2Type PTC2Type { { ... ... PCO2b. receive (msg2); PCO2b. receive (msg2); CP. send (statusConnected); CP. send (statusConnected); ... ... } } 28
Telelogic AB
PTC1
PTC2
system
29
Telelogic AB
30
Telelogic AB
31
Telelogic AB
32
Telelogic AB
33
Telelogic AB
34
Telelogic AB
35
Telelogic AB
36
Telelogic AB
38
Telelogic AB
39
Telelogic AB
Behavior_function()
<<Calls>>
Behavior_function()
<<Calls>>
PTC (Simu1) PTC (Simu2) Test Test System System Interface Interface
MTC
Telelogic AB
Concurrency
We can have several components executing simultaneously Several processes aiming at the same goal
41
Telelogic AB