Loading ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +214 −25 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ module AtsDSLite_TestCases { /** * @desc Gateway Assignement * @referenceETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1.1 * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1 */ group gatewayAssignment { Loading Loading @@ -60,7 +60,7 @@ module AtsDSLite_TestCases { * </pre> * * @version 0.0.1 * @reference RFC6334 [1] clause 5 * @reference RFC6334 [1] clause 3, 5 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/GWA/BV/001 */ testcase TC_DSLITE_B4_GWA_BV_001() runs on DSLiteComponent system TestAdapter { Loading Loading @@ -278,7 +278,6 @@ module AtsDSLite_TestCases { function f_TC_DSLITE_B4_GWA_BV_002_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; var boolean v_dataReceived := false; var InterCompDataMsg v_data; Loading Loading @@ -360,14 +359,16 @@ module AtsDSLite_TestCases { // Test component configuration vc_dnsComponent := DNSComponent.create("DNS"); vc_hostComponent := HostComponent.create("Host"); f_cf01Up_B4(); // Test adapter configuration // Start all components vc_dnsComponent.start(f_TC_DSLITE_B4_GWA_BV_003_dns()); vc_hostComponent.start(f_TC_DSLITE_B4_GWA_BV_003_host()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); f_serverSyncNClientsAndStop(2, { c_prDone, c_initDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': Loading @@ -389,7 +390,6 @@ module AtsDSLite_TestCases { function f_TC_DSLITE_B4_GWA_BV_003_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; // Preamble // Clause 'Initial conditions': the IUT having sent a DNS query Loading Loading @@ -429,6 +429,7 @@ module AtsDSLite_TestCases { )))) { tc_ac.stop; // TODO Check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT f_selfOrClientSyncAndVerdict(c_initDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } Loading @@ -438,29 +439,43 @@ module AtsDSLite_TestCases { } } // End of 'altstep' statement // Clause 'then': Nothing to do // Postamble f_postamble_dns(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_003_dns function f_TC_DSLITE_B4_GWA_BV_003_host() runs on HostComponent { // Local variables // Preamble // Clause 'Initial conditions': the IUT having sent a DNS query f_preamble_host(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': Nothing to do // Clause 'then': the IUT adds the AFTR GW IPv6 address to the default route configuration // TODO 1. Send HTTP request to www.etsi.org // 2. Wait for HTTP 200OK tc_ac.start; alt { [] dnsPort.receive { // TODO tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_initDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_dns(); f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_003_dns } // End of function f_TC_DSLITE_B4_GWA_BV_003_host } // End of group f_TC_DSLITE_B4_GWA_BV_003 Loading Loading @@ -525,7 +540,6 @@ module AtsDSLite_TestCases { // Test adapter configuration // Start all components //vc_dhcpv6Component.start(f_TC_DSLITE_B4_BF_BV_001_dhcpv6()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); Loading @@ -540,14 +554,189 @@ module AtsDSLite_TestCases { } // End of testcase TC_DSLITE_B4_BF_BV_001 group f_TC_DSLITE_B4_BF_BV_001 { } // End of group f_TC_DSLITE_B4_BF_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group gatewayAssignement } // End of group basicFunction /** * @desc Fragmentation * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1.3 */ group fragmentation { group validBehaviour { /** * @desc Check that the IUT fragments an HTML IPv4 packet when DF bit is not set * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the IPv4 or IPv6 packet between all devices and, * the DS-lite Tunnel MTU (DS-MTU) being lower than the encapsulated softwired packet * } * Expected behaviour: * ensure that { * when { * the IUT receives an HTML IPv4 packet * containing source address * indicating a private IPv4 address * containing the DF bit * indicating the value 0. * with a packet size greater than the DS-MTU * } * then { * the IUT fragments that packet before it encapsulates it in IPv6 and, * the IUT forwards correctly formatted fragmented packets to the AFTR * } * } * </pre> * * @version 0.0.1 * @reference RFC791 [1], RFC815 [2] * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/FRAG/BV/001 */ testcase TC_DSLITE_B4_FRAG_BV_001() runs on DSLiteComponent system TestAdapter { // Local variables // Test control // Test component configuration // vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); f_cf01Up_B4(); // Test adapter configuration // Start all components f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT in its initial state"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_B4_FRAG_BV_001 group f_TC_DSLITE_B4_FRAG_BV_001 { } // End of group f_TC_DSLITE_B4_FRAG_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group fragmentation } // End of group b4Sut /** * @desc B4 * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.2 */ group aftrSut { /** * @desc Basic Function * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.2.1 */ group basicFunction { group validBehaviour { /** * @desc Check that the IUT supports the functionality of DS-lite 1:1 NAT mapping * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT being properly provisioned and, * the interfaces are connected & functional * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv6 packets * containing IPv6 transport header * containing source address * indicating B4 IPv6 address * containing destination address * indicating IUT GW IPv6 address * containing IPv4 payload * containing source address * indicating a private IPv4 address * containing destination address * indicating a public IPv4 address * from multiple B4 devices * } * then { * the IUT does a 1:1 NAT mapping for each public IPv6 B4 address sourced an,d * the IUT forwards packets to the destination with different IPv4 public addresses * } * } * </pre> * * @version 0.0.1 * @reference RFC6333 [1] clause 6.2 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/AFTR/BF/BV/001 */ testcase TC_DSLITE_AFTR_BF_BV_001() runs on DSLiteComponent system TestAdapter { // Local variables // Test control // Test component configuration // vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); f_cf01Up_B4(); // Test adapter configuration // Start all components f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT in its initial state"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_AFTR_BF_BV_001 group f_TC_DSLITE_AFTR_BF_BV_001 { } // End of group f_TC_DSLITE_AFTR_BF_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group basicFunction } // End of group aftrSut } // End of module AtsDSLite_TestCases ttcn/AtsDSlite/AtsDSLite_TestControl.ttcn3 +19 −0 Original line number Diff line number Diff line Loading @@ -6,21 +6,40 @@ module AtsDSLite_TestControl { /** * @desc Check that IUT sends a DHCPv6 Request to the DHCPv6 Server after initialization * @reference RFC6334 [1] clause 3, 5 */ execute(TC_DSLITE_B4_GWA_BV_001()); /** * @desc Check that IUT sends a DNS Query to the DNS Server * @reference RFC6334 [1] clause 5 */ execute(TC_DSLITE_B4_GWA_BV_002()); /** * @desc Check that IUT correctly adds the AFTR IPv6 address * @reference RFC6334 [1] clause 5 */ execute(TC_DSLITE_B4_GWA_BV_003()); /** * @desc Check that the IUT correctly encapsulates and forwards the IPv4 packets from multiple hosts * @reference RFC6334 [1] clause 5.2 */ execute(TC_DSLITE_B4_BF_BV_001()); /** * @desc Check that the IUT fragments an HTML IPv4 packet when DF bit is not set * @reference RFC791 [1], RFC815 [2] */ execute(TC_DSLITE_B4_FRAG_BV_001()); /** * @desc Check that the IUT supports the functionality of DS-lite 1:1 NAT mapping * @reference RFC6333 [1] clause 6.2 */ execute(TC_DSLITE_AFTR_BF_BV_001()); } // End of 'control' statement } // End of module AtsDSLite_TestControl Loading
ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +214 −25 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ module AtsDSLite_TestCases { /** * @desc Gateway Assignement * @referenceETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1.1 * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1 */ group gatewayAssignment { Loading Loading @@ -60,7 +60,7 @@ module AtsDSLite_TestCases { * </pre> * * @version 0.0.1 * @reference RFC6334 [1] clause 5 * @reference RFC6334 [1] clause 3, 5 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/GWA/BV/001 */ testcase TC_DSLITE_B4_GWA_BV_001() runs on DSLiteComponent system TestAdapter { Loading Loading @@ -278,7 +278,6 @@ module AtsDSLite_TestCases { function f_TC_DSLITE_B4_GWA_BV_002_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; var boolean v_dataReceived := false; var InterCompDataMsg v_data; Loading Loading @@ -360,14 +359,16 @@ module AtsDSLite_TestCases { // Test component configuration vc_dnsComponent := DNSComponent.create("DNS"); vc_hostComponent := HostComponent.create("Host"); f_cf01Up_B4(); // Test adapter configuration // Start all components vc_dnsComponent.start(f_TC_DSLITE_B4_GWA_BV_003_dns()); vc_hostComponent.start(f_TC_DSLITE_B4_GWA_BV_003_host()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); f_serverSyncNClientsAndStop(2, { c_prDone, c_initDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': Loading @@ -389,7 +390,6 @@ module AtsDSLite_TestCases { function f_TC_DSLITE_B4_GWA_BV_003_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; // Preamble // Clause 'Initial conditions': the IUT having sent a DNS query Loading Loading @@ -429,6 +429,7 @@ module AtsDSLite_TestCases { )))) { tc_ac.stop; // TODO Check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT f_selfOrClientSyncAndVerdict(c_initDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } Loading @@ -438,29 +439,43 @@ module AtsDSLite_TestCases { } } // End of 'altstep' statement // Clause 'then': Nothing to do // Postamble f_postamble_dns(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_003_dns function f_TC_DSLITE_B4_GWA_BV_003_host() runs on HostComponent { // Local variables // Preamble // Clause 'Initial conditions': the IUT having sent a DNS query f_preamble_host(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': Nothing to do // Clause 'then': the IUT adds the AFTR GW IPv6 address to the default route configuration // TODO 1. Send HTTP request to www.etsi.org // 2. Wait for HTTP 200OK tc_ac.start; alt { [] dnsPort.receive { // TODO tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_initDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_dns(); f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_003_dns } // End of function f_TC_DSLITE_B4_GWA_BV_003_host } // End of group f_TC_DSLITE_B4_GWA_BV_003 Loading Loading @@ -525,7 +540,6 @@ module AtsDSLite_TestCases { // Test adapter configuration // Start all components //vc_dhcpv6Component.start(f_TC_DSLITE_B4_BF_BV_001_dhcpv6()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); Loading @@ -540,14 +554,189 @@ module AtsDSLite_TestCases { } // End of testcase TC_DSLITE_B4_BF_BV_001 group f_TC_DSLITE_B4_BF_BV_001 { } // End of group f_TC_DSLITE_B4_BF_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group gatewayAssignement } // End of group basicFunction /** * @desc Fragmentation * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.1.3 */ group fragmentation { group validBehaviour { /** * @desc Check that the IUT fragments an HTML IPv4 packet when DF bit is not set * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the IPv4 or IPv6 packet between all devices and, * the DS-lite Tunnel MTU (DS-MTU) being lower than the encapsulated softwired packet * } * Expected behaviour: * ensure that { * when { * the IUT receives an HTML IPv4 packet * containing source address * indicating a private IPv4 address * containing the DF bit * indicating the value 0. * with a packet size greater than the DS-MTU * } * then { * the IUT fragments that packet before it encapsulates it in IPv6 and, * the IUT forwards correctly formatted fragmented packets to the AFTR * } * } * </pre> * * @version 0.0.1 * @reference RFC791 [1], RFC815 [2] * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/FRAG/BV/001 */ testcase TC_DSLITE_B4_FRAG_BV_001() runs on DSLiteComponent system TestAdapter { // Local variables // Test control // Test component configuration // vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); f_cf01Up_B4(); // Test adapter configuration // Start all components f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT in its initial state"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_B4_FRAG_BV_001 group f_TC_DSLITE_B4_FRAG_BV_001 { } // End of group f_TC_DSLITE_B4_FRAG_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group fragmentation } // End of group b4Sut /** * @desc B4 * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.2 */ group aftrSut { /** * @desc Basic Function * @reference ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) Clause 5.2.1 */ group basicFunction { group validBehaviour { /** * @desc Check that the IUT supports the functionality of DS-lite 1:1 NAT mapping * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT being properly provisioned and, * the interfaces are connected & functional * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv6 packets * containing IPv6 transport header * containing source address * indicating B4 IPv6 address * containing destination address * indicating IUT GW IPv6 address * containing IPv4 payload * containing source address * indicating a private IPv4 address * containing destination address * indicating a public IPv4 address * from multiple B4 devices * } * then { * the IUT does a 1:1 NAT mapping for each public IPv6 B4 address sourced an,d * the IUT forwards packets to the destination with different IPv4 public addresses * } * } * </pre> * * @version 0.0.1 * @reference RFC6333 [1] clause 6.2 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/AFTR/BF/BV/001 */ testcase TC_DSLITE_AFTR_BF_BV_001() runs on DSLiteComponent system TestAdapter { // Local variables // Test control // Test component configuration // vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); f_cf01Up_B4(); // Test adapter configuration // Start all components f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT in its initial state"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_AFTR_BF_BV_001 group f_TC_DSLITE_AFTR_BF_BV_001 { } // End of group f_TC_DSLITE_AFTR_BF_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group basicFunction } // End of group aftrSut } // End of module AtsDSLite_TestCases
ttcn/AtsDSlite/AtsDSLite_TestControl.ttcn3 +19 −0 Original line number Diff line number Diff line Loading @@ -6,21 +6,40 @@ module AtsDSLite_TestControl { /** * @desc Check that IUT sends a DHCPv6 Request to the DHCPv6 Server after initialization * @reference RFC6334 [1] clause 3, 5 */ execute(TC_DSLITE_B4_GWA_BV_001()); /** * @desc Check that IUT sends a DNS Query to the DNS Server * @reference RFC6334 [1] clause 5 */ execute(TC_DSLITE_B4_GWA_BV_002()); /** * @desc Check that IUT correctly adds the AFTR IPv6 address * @reference RFC6334 [1] clause 5 */ execute(TC_DSLITE_B4_GWA_BV_003()); /** * @desc Check that the IUT correctly encapsulates and forwards the IPv4 packets from multiple hosts * @reference RFC6334 [1] clause 5.2 */ execute(TC_DSLITE_B4_BF_BV_001()); /** * @desc Check that the IUT fragments an HTML IPv4 packet when DF bit is not set * @reference RFC791 [1], RFC815 [2] */ execute(TC_DSLITE_B4_FRAG_BV_001()); /** * @desc Check that the IUT supports the functionality of DS-lite 1:1 NAT mapping * @reference RFC6333 [1] clause 6.2 */ execute(TC_DSLITE_AFTR_BF_BV_001()); } // End of 'control' statement } // End of module AtsDSLite_TestControl