|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 //! @file |
|
17 //! @SYMTestSuiteName NET-BEARERMOBILITY |
|
18 //! @SYMScriptTestEnvironment Standard Symbian HRP or emulator environment |
|
19 |
|
20 PRINT NET_BMOBILITY_760645: |
|
21 PRINT RCommsMobilityApiExt::Open(), |
|
22 PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(), |
|
23 PRINT Simulate current AP going down, |
|
24 PRINT Receive PreferredCarierAvailable but no KLinkLayerClosed, |
|
25 PRINT Migration to the new AP, |
|
26 PRINT New AP goes down, reception of KLinkLayerClosed , |
|
27 PRINT RCommsMobilityApiExt::Close() |
|
28 |
|
29 // Load the test suite |
|
30 LOAD_SUITE te_esockteststepsSuite -SharedData |
|
31 |
|
32 // Set up the comms database and start esock in preparation for the test |
|
33 RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script |
|
34 CED -i z:\testdata\configs\BearerMobility\BearerMobility_001.ced.cfg c:\BearerMobility_001.ced.cfg.log |
|
35 |
|
36 RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script |
|
37 |
|
38 |
|
39 START_TESTCASE COMINF-ESOCK-RConnection-Mobility-0502 |
|
40 //! @SYMTestCaseID COMINF-ESOCK-RConnection-Mobility-0502 |
|
41 //!@SYMTestCaseDesc TODO_CDG |
|
42 //!@SYMPREQ PREQ1060 |
|
43 //!@SYMAPI |
|
44 // TODO_CDG |
|
45 //!@SYMTestPriority Critical |
|
46 //!@SYMTestActions |
|
47 // TODO_CDG |
|
48 //!@SYMTestType CIT |
|
49 //!@SYMTestExpectedResults TODO_CDG |
|
50 |
|
51 // Create and connect socketserver and connectionserver instances |
|
52 RUN_TEST_STEP 150 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CreateSockSvr |
|
53 RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ConnectSockSvr |
|
54 |
|
55 // Create and open a connection (conn1) |
|
56 RUN_TEST_STEP 150 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CreateConn |
|
57 RUN_TEST_STEP 150 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini OpenConn |
|
58 |
|
59 // Make bearer1 available and connect with associated snap |
|
60 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityUpAp4 |
|
61 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityUpAp5 |
|
62 RUN_TEST_STEP 150 te_esockteststepsSuite startrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini StartConnSnap53 |
|
63 |
|
64 // Prepare mobility APIs which we will subscribe on |
|
65 RUN_TEST_STEP 150 te_esockteststepsSuite OpenRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_760645.ini OpenMobilityExtension |
|
66 |
|
67 //Register |
|
68 RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini RegisterForMobility |
|
69 RUN_TEST_STEP 100 te_esockteststepsSuite RegisterProgressNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ProgressNotificationEvent1 |
|
70 |
|
71 |
|
72 //Simulate the access point going down and receive the PreferredCarrierAvailable |
|
73 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityDownAp4 |
|
74 RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckPreferredCarrierAvailable1 |
|
75 |
|
76 //Migrate to preferred carrier (and finish the mobility handshake) |
|
77 RUN_TEST_STEP 150 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760645.ini MigrateToPreferredCarrier |
|
78 //Check the new carrier is active now |
|
79 RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini RegisterForMobility |
|
80 RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckNewCarrierActive |
|
81 //Accept the new carrier |
|
82 RUN_TEST_STEP 150 te_esockteststepsSuite acceptcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760645.ini AcceptNewCarrier |
|
83 |
|
84 //Check we did not receive the Klinklayerclosed event |
|
85 RUN_TEST_STEP 100 te_esockteststepsSuite CheckNegativeProgressNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckNegativeProgressNotificationEvent1 |
|
86 |
|
87 //Simulate the new access point going down and receive |
|
88 RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityDownAp5 |
|
89 |
|
90 //Check we did receive the Klinklayerclosed event this time |
|
91 |
|
92 RUN_TEST_STEP 100 te_esockteststepsSuite CheckProgressNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckProgressNotificationEvent1 |
|
93 |
|
94 |
|
95 // Clean up what we used |
|
96 RUN_TEST_STEP 150 te_esockteststepsSuite CloseRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseMobilityExtension |
|
97 RUN_TEST_STEP 150 te_esockteststepsSuite CloseRConnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseConn |
|
98 RUN_TEST_STEP 150 te_esockteststepsSuite closersocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseSocketSvr |
|
99 END_TESTCASE COMINF-ESOCK-RConnection-Mobility-0502 |
|
100 |
|
101 |
|
102 // Clean up |
|
103 RUN_SCRIPT Z:\TestData\Scripts\te_esock_test_stopallinterfaces.script |
|
104 RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script |
|
105 |
|
106 PRINT Completed NET_BMOBILITY_760645 |
|
107 |
|
108 |
|
109 |