datacommsserver/esockserver/test/TE_RConnection/scripts/Mobility/Mobility_760740.script
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 26 Jan 2010 13:09:14 +0200
changeset 4 928ed51ddc43
parent 0 dfb7c4ff071f
permissions -rw-r--r--
Revision: 201004 Kit: 201004

//
// 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_760740: (Rejecting preferred carrier should result in less preferred being offered back)
PRINT RSocket::Open(), RSocket::Connect(), RSocket::Send()/Receive()
PRINT RCommsMobilityApiExt::Open(),
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT Simulate current AP (4) going down
PRINT Receive PreferredCarierAvailable (5),
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RSocket::Send()/Receive(), RSocket::Close()
PRINT RCommsMobilityApiExt::MigrateToPreferredCarrier(),
PRINT Receive NewCarierActive,
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RSocket::Open(), RSocket::Connect(), RSocket::Send()/Receive()
PRINT RCommsMobilityApiExt::NewCarrierAccepted(),
PRINT Simulate AP (4) going up
PRINT Receive PreferredCarierAvailable (4),
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RSocket::Send()/Receive(), RSocket::Close()
PRINT RCommsMobilityApiExt::MigrateToPreferredCarrier(),
PRINT Receive NewCarierActive,
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RSocket::Open(), RSocket::Connect(), RSocket::Send()/Receive(), RSocket::Close()
PRINT RCommsMobilityApiExt::NewCarrierRejected(),
PRINT Receive PreferredCarierAvailable (5),
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RCommsMobilityApiExt::MigrateToPreferredCarrier(),
PRINT Receive NewCarierActive,
PRINT RCommsMobilityApiExt::RegisterForMobilityNotification(),
PRINT RSocket::Open(), RSocket::Connect(), RSocket::Send()/Receive()
PRINT RCommsMobilityApiExt::NewCarrierAccepted(),
PRINT RSocket::Send()/Receive(), RSocket::Close()
PRINT Simulate current AP (5) going down
PRINT Receive PreferredCarierAvailable (4), - testing that we do not store any blacklisting info
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-1601
//! @SYMTestCaseID		COMINF-ESOCK-RConnection-Mobility-1601
//!@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 100 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CreateSockSvr
RUN_TEST_STEP 100 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ConnectSockSvr

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

//Create socket (Socket1)
RUN_TEST_STEP 100 te_esockteststepsSuite creatersocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CreateUDPSocket

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

//Test a data path
RUN_TEST_STEP 100 te_esockteststepsSuite openrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini OpenSocket
RUN_TEST_STEP 100 te_esockteststepsSuite connectrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ConnectSocket
RUN_TEST_STEP 100 te_esockteststepsSuite sendreceiversocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini SendReceiveSocket1

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

//Register
RUN_TEST_STEP 100 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

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

//Register
RUN_TEST_STEP 100 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Close the socket now
RUN_TEST_STEP 100 te_esockteststepsSuite closersocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CloseSocket

//Migrate to preferred carrier
RUN_TEST_STEP 100 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini MigrateToPreferredCarrier

//Check the new carrier is active now
RUN_TEST_STEP 100 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckNewCarrierActive1

//Register
RUN_TEST_STEP 100 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Test a data path
RUN_TEST_STEP 150 te_esockteststepsSuite openrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini OpenSocket
RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ConnectSocket
RUN_TEST_STEP 150 te_esockteststepsSuite sendreceiversocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini SendReceiveSocket2

//Accept the new carrier
RUN_TEST_STEP 150 te_esockteststepsSuite acceptcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini AcceptNewCarrier

//Now we are fully migrated to AP 5

//We start testing if when AP 4 becomes available and gets rejected that we will receive AP 5 again
RUN_TEST_STEP 150 te_esockteststepsSuite SetAccessPointAvailabilityStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ChangeAvailabilityUpAp4

//Check the new carrier
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckPreferredCarrierAvailable2

//Register
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Close the socket now
RUN_TEST_STEP 150 te_esockteststepsSuite closersocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CloseSocket

//Migrate to preferred carrier
RUN_TEST_STEP 150 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini MigrateToPreferredCarrier

//Check the new carrier is active now
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckNewCarrierActive2

//Register
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Test a data path
RUN_TEST_STEP 150 te_esockteststepsSuite openrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini OpenSocket
RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ConnectSocket
RUN_TEST_STEP 150 te_esockteststepsSuite sendreceiversocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini SendReceiveSocket3
RUN_TEST_STEP 150 te_esockteststepsSuite closersocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CloseSocket

//Reject the new carrier
RUN_TEST_STEP 150 te_esockteststepsSuite rejectcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RejectNewCarrier

RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckPreferredCarrierAvailable1

//Register
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Migrate to preferred carrier
RUN_TEST_STEP 150 te_esockteststepsSuite migratercommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini MigrateToPreferredCarrier

//Check the new carrier is active now
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckNewCarrierActive1

//Register
RUN_TEST_STEP 150 te_esockteststepsSuite RegisterForMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini RegisterForMobility

//Test a data path
RUN_TEST_STEP 150 te_esockteststepsSuite openrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini OpenSocket
RUN_TEST_STEP 150 te_esockteststepsSuite connectrsocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini ConnectSocket
RUN_TEST_STEP 150 te_esockteststepsSuite sendreceiversocketStep z:\testdata\configs\BearerMobility\Mobility_760740.ini SendReceiveSocket4

//Accept the new carrier
RUN_TEST_STEP 150 te_esockteststepsSuite acceptcarrierrcommsmobilityapiextStep z:\testdata\configs\BearerMobility\Mobility_760740.ini AcceptNewCarrier

//Now we are fully migrated to AP 5

//This is the one we have rejected previously - we are not storing any blacklisting information
RUN_TEST_STEP 150 te_esockteststepsSuite CheckMobilityNotificationStep z:\testdata\configs\BearerMobility\Mobility_760740.ini CheckPreferredCarrierAvailable2

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


// 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_760740