datacommsserver/esockserver/test/TE_RConnection/scripts/Mobility/Mobility_760645.script
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 13:39:24 +0300
changeset 25 e53adc4c49de
parent 0 dfb7c4ff071f
permissions -rw-r--r--
Revision: 201018 Kit: 201018

//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
//! @file
//! @SYMTestSuiteName NET-BEARERMOBILITY
//! @SYMScriptTestEnvironment Standard Symbian HRP or emulator environment

PRINT NET_BMOBILITY_760645:
PRINT RCommsMobilityApiExt::Open(),
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT Simulate current AP going down,
PRINT Receive PreferredCarierAvailable but no KLinkLayerClosed,
PRINT Migration to the new AP,
PRINT RConnection::GetParameters(IAP) to check the reported IAP is expected
PRINT New AP goes down, reception of KLinkLayerClosed ,
PRINT RCommsMobilityApiExt::Close()

// Load the test suite
LOAD_SUITE te_esockteststepsSuite -SharedData

// Set up the comms database and start esock in preparation for the test
RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script
CED -i z:\testdata\configs\BearerMobility\BearerMobility_001.ced.cfg c:\BearerMobility_001.ced.cfg.log

RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script


START_TESTCASE			COMINF-ESOCK-RConnection-Mobility-0502
//! @SYMTestCaseID		COMINF-ESOCK-RConnection-Mobility-0502
//!@SYMTestCaseDesc           	TODO_CDG
//!@SYMPREQ                   	PREQ1060
//!@SYMAPI
// TODO_CDG
//!@SYMTestPriority           	Critical
//!@SYMTestActions
// TODO_CDG
//!@SYMTestType               	CIT
//!@SYMTestExpectedResults    	TODO_CDG

// Create and connect socketserver and connectionserver instances
RUN_TEST_STEP 150 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CreateSockSvr
RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ConnectSockSvr

// Create and open a connection (conn1)
RUN_TEST_STEP 150 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CreateConn
RUN_TEST_STEP 150 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini OpenConn

// Make bearer1 available and connect with associated snap
RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityUpAp4
RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityUpAp5
RUN_TEST_STEP 150 te_esockteststepsSuite startrconnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini StartConnSnap53

// Prepare mobility APIs which we will subscribe on
RUN_TEST_STEP 150 te_esockteststepsSuite OpenRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_760645.ini OpenMobilityExtension

//Register
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini RegisterForMobility
RUN_TEST_STEP 100 te_esockteststepsSuite RegisterProgressNotificationStep    z:\testdata\configs\BearerMobility\Mobility_760645.ini ProgressNotificationEvent1


//Simulate the access point going down and receive the PreferredCarrierAvailable
RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityDownAp4
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckPreferredCarrierAvailable1

//Migrate to preferred carrier (and finish the mobility handshake)
RUN_TEST_STEP 150 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760645.ini MigrateToPreferredCarrier
//Check the new carrier is active now
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini RegisterForMobility
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckNewCarrierActive
//Accept the new carrier
RUN_TEST_STEP 150 te_esockteststepsSuite acceptcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760645.ini AcceptNewCarrier

//Check we did not receive the Klinklayerclosed event
RUN_TEST_STEP 100 te_esockteststepsSuite CheckNegativeProgressNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckNegativeProgressNotificationEvent1 

//Check IAP
RUN_TEST_STEP 150 te_esockteststepsSuite GetParameters_IntStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckNewIAP


//Simulate the new access point going down and receive 
RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760645.ini ChangeAvailabilityDownAp5

//Check we did  receive the Klinklayerclosed event this time

RUN_TEST_STEP 100 te_esockteststepsSuite CheckProgressNotificationStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CheckProgressNotificationEvent1 


// Clean up what we used
RUN_TEST_STEP 150 te_esockteststepsSuite CloseRCommsMobilityAPIExtStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseMobilityExtension
RUN_TEST_STEP 150 te_esockteststepsSuite CloseRConnectionStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseConn
RUN_TEST_STEP 150 te_esockteststepsSuite closersocketservStep z:\testdata\configs\BearerMobility\Mobility_760645.ini CloseSocketSvr
END_TESTCASE			COMINF-ESOCK-RConnection-Mobility-0502


// Clean up
RUN_SCRIPT Z:\TestData\Scripts\te_esock_test_stopallinterfaces.script
RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script

PRINT Completed NET_BMOBILITY_760645