videoutils_plat/videoconnutility_api/tsrc/conf/VCXConnUtilTestSNAP.cfg
author hgs
Thu, 04 Nov 2010 11:29:04 +0200
changeset 55 5af11d9814f5
parent 0 822a42b6c3f1
permissions -rw-r--r--
201044

#***********************************************************************************
#
# STIF test script file for testing vcxconnectionutility.dll.
#
#***********************************************************************************

[StifSettings]
CapsModifier= IptvTestClientApiCapsMod.exe
[EndStifSettings]

[Define]
INCLUDE c:\testframework\VCXConnUtilTest.inc
INCLUDE c:\testframework\VCXDrives.inc
INCLUDE c:\testframework\VCXConsts.inc
INCLUDE c:\testframework\VCXErrors.inc
[Enddefine]

#------------------------------------------------------------------------------------
#
# Setup the environment.
#
#------------------------------------------------------------------------------------
[Test]
title ET31100 <not a test> Setup and cleanup
create VCXTestUtilModule Util

Util CopyMethod "Internet" "Internet" "Internet"
// Disable connection dialog for "Internet" destination.
Util SetConnectionMethodIntAttribute "Internet" "Internet" ECmSeamlessnessLevel 2

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST2

delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31126 Create and destroy
create VCXTestUtilModule Util

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase

VCXCONN Create "MASTERPS"

print created
pause 3000
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
print pausing
pause 3000
print OK!

VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31101 Connect to destination with 1 IAP
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31102 Connect to destination with 2 IAPs
create VCXTestUtilModule Util

// Destination with 2 working IAPs
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP2 0
Util SetMethodPriority DEST_TEST AP1 1´

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP2
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31103 Connect to destination with 10 IAPs
create VCXTestUtilModule Util

// Destination with 10 working IAPs
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util CopyMethod 3G_AP AP3 DEST_TEST
Util CopyMethod 3G_AP AP4 DEST_TEST
Util CopyMethod 3G_AP AP5 DEST_TEST
Util CopyMethod 3G_AP AP6 DEST_TEST
Util CopyMethod 3G_AP AP7 DEST_TEST
Util CopyMethod 3G_AP AP8 DEST_TEST
Util CopyMethod 3G_AP AP9 DEST_TEST
Util CopyMethod 3G_AP AP10 DEST_TEST

Util SetMethodPriority DEST_TEST AP5 0
Util SetMethodPriority DEST_TEST AP1 1
Util SetMethodPriority DEST_TEST AP2 2
Util SetMethodPriority DEST_TEST AP3 3
Util SetMethodPriority DEST_TEST AP4 4
Util SetMethodPriority DEST_TEST AP6 5
Util SetMethodPriority DEST_TEST AP7 6
Util SetMethodPriority DEST_TEST AP8 7
Util SetMethodPriority DEST_TEST AP9 8
Util SetMethodPriority DEST_TEST AP10 9

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP5
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
# Note: Disabled, shows IAP query notification.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31104 Connect to destination with no IAP
#create VCXTestUtilModule Util
#
#Destination with no IAPs
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#allownextresult KERRGENERAL
#VCXCONN GetIap DEST_TEST
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
# Note: Disabled, shows IAP query notification.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31106 Connect to destination with working and bad IAPs
#create VCXTestUtilModule Util

#// Destination with good and bad IAP
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod 3G_AP AP1 DEST_TEST
#Util CopyMethod BAD_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP1 0
#Util SetMethodPriority DEST_TEST AP2 1

#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN

#Util WaitForConnectionActivity AP1
#waittestclass Util
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31107 Connect to destination with bad and working IAPs
#create VCXTestUtilModule Util
#
#// Destination with bad and good IAP
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod BAD_AP AP1 DEST_TEST
#Util CopyMethod 3G_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP1 0
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#VCXCONN GetIap DEST_TEST
#allowerrorcodes KERRGENERAL
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP2
#allowerrorcodes KERRTIMEDOUT
#waittestclass Util
#
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31108 Connect, disconnect
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN
Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
pause 3000

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31109 Connect, disconnect, connect
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN
Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
pause 3000
Util WaitUntilConnectionIsClosed AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN
Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31110 Connect, disconnect, disconnect
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN

Util WaitUntilConnectionIsClosed AP1
waittestclass Util

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31111 Disconnect without connection, then connect
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN Disconnect
waittestclass VCXCONN

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN
pause 3000
Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31112 2nd IAP priority changes during connection
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

pause 1000
Util SetMethodPriority DEST_TEST AP2 0

pause 5000

Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

pause 5000

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31113 IAP priority changes during connection
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

pause 1000
Util SetMethodPriority DEST_TEST AP1 1

pause 5000

Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

pause 5000

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31114 2nd IAP removed during connection
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

Util DeleteMethod DEST_TEST AP2

pause 5000

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31115 Another app connected to the dest, connect 1
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

Util Connect AP1
waittestclass Util

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util Disconnect
pause 3000

Util WaitForConnectionActivity AP1
waittestclass Util
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31116 Another app connected to the dest, connect 2
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

Util Connect 3G_AP
waittestclass Util

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util Disconnect
pause 3000

Util WaitForConnectionActivity 3G_AP
waittestclass Util

VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31117 Another app connected to 2nd dest, connect
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

Util Connect 3G_AP
waittestclass Util

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN
VCXCONN PrintConnUtilDetails

Util Disconnect
pause 3000

Util WaitForConnectionActivity 3G_AP
waittestclass Util

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31118 Connect, another app connects, disconnect
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

Util Connect AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
VCXCONN PrintConnUtilDetails

pause 4000

Util WaitForConnectionActivity AP1
waittestclass Util

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31120 Connect 2nd dest when connected to 1st already
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN GetIap "Internet"
waittestclass VCXCONN

pause 2000

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31121 Connect 2nd dest, disconnect, connect to 1st
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST2
pause 1000
Util CreateDestination DEST_TEST2
Util DeleteDestinationAfterwards DEST_TEST2
Util CopyMethod 3G_AP AP3 DEST_TEST2
Util SetMethodPriority DEST_TEST2 AP3 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN

Util WaitUntilConnectionIsClosed AP1
waittestclass Util

VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
VCXCONN GetIap DEST_TEST2
waittestclass VCXCONN
VCXCONN PrintConnUtilDetails
VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31122 Connect, disconnect, change IAP prio, repeat
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP2
waittestclass Util

Util SetMethodPriority DEST_TEST AP2 0
Util SetMethodPriority DEST_TEST AP1 1

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP2
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP2
waittestclass Util

VCXCONN Disconnect
waittestclass VCXCONN

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31123 Connect, terminate connection 2nd app, connect
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod 3G_AP AP1 DEST_TEST
#Util CopyMethod 3G_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP1 0
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP1
#waittestclass Util
#
#Util Attach AP1
#Util Terminate
#Util WaitUntilConnectionIsClosed AP1
#waittestclass Util
#
#pause 5000
#
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#pause 5000
#
#Util WaitForConnectionActivity AP1
#waittestclass Util
#
#VCXCONN Disconnect
#waittestclass VCXCONN
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31124 Connect, terminate connection 2nd app, disconnect
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod 3G_AP AP1 DEST_TEST
#Util CopyMethod 3G_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP1 0
#Util SetMethodPriority DEST_TEST AP2 1
#pause 2000
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP1
#waittestclass Util
#pause 500
#
#Util Attach AP1
#pause 500
#Util Terminate
#pause 500
#Util WaitUntilConnectionIsClosed AP1
#waittestclass Util
#pause 500
#VCXCONN Disconnect
#waittestclass VCXCONN
#pause 500
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31125 Connect, delete instance
create VCXTestUtilModule Util

// Destination with 1 working IAP
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

Util WaitForConnectionActivity AP1
waittestclass Util

print OK!
VCXCONN ShutdownTester
delete VCXCONN

Util WaitUntilConnectionIsClosed AP1
waittestclass Util

delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31127 Roaming - Connect 3G, WLAN becomes available
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod 3G_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxConnected
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxRoamingRequest
#VCXCONN AddWaitedProperty EVCxPSNbRoamAccepted 1
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxConnected
#
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#Util CopyMethod WLAN_AP AP3 DEST_TEST
#Util SetMethodPriority DEST_TEST AP3 0
#
#VCXCONN WaitForPropertyQueue
#waittestclass VCXCONN
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#Util WaitForConnectionActivity AP3
#waittestclass Util
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
#title ET31128 Roaming - Connect WLAN, 3G becomes available
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod WLAN_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#Util CopyMethod 3G_AP AP3 DEST_TEST
#Util SetMethodPriority DEST_TEST AP3 0
#
#pause 5000
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#
#Util WaitUntilConnectionIsClosed AP3
#waittestclass Util
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31129 Roaming - Connect WLAN, another WLAN becomes available
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod WLAN_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#Util CopyMethod WLAN_AP2 AP3 DEST_TEST
#Util SetMethodPriority DEST_TEST AP3 0
#
#pause 5000
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#
#Util WaitUntilConnectionIsClosed AP3
#waittestclass Util
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxNotConnected
#
#VCXCONN Disconnect
#waittestclass VCXCONN
#
#VCXCONN WaitForPropertyQueue
#waittestclass VCXCONN
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31130 Roaming not allowed - Connect 3G, WLAN becomes available
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#Util CopyMethod 3G_AP AP2 DEST_TEST
#Util SetMethodPriority DEST_TEST AP2 1
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxConnected
#//VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxRoamingRequest
#VCXCONN AddWaitedProperty EVCxPSNbRoamAccepted 0
#VCXCONN AddWaitedProperty EVCxPSConnectionStatus EVCxConnected
#
#VCXCONN GetIap DEST_TEST
#waittestclass VCXCONN
#VCXCONN SetRoamingAllowed 0
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#Util CopyMethod WLAN_AP AP3 DEST_TEST
#Util SetMethodPriority DEST_TEST AP3 0
#
#VCXCONN WaitForPropertyQueue
#waittestclass VCXCONN
#
#Util WaitForConnectionActivity AP2
#waittestclass Util
#
#Util WaitUntilConnectionIsClosed AP3
#waittestclass Util
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31131 WapIdFromIapIdL
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP2 DEST_TEST
Util SetMethodPriority DEST_TEST AP2 1

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN WapIdFromIapId AP2
waittestclass VCXCONN

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31132 WapIdFromIapIdL invalid IAP ID
create VCXTestUtilModule Util

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN WapIdFromIapId "invalidiap"
allownextresult KERRNOTFOUND
waittestclass VCXCONN

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
[Test]
title ET31133 Connect, default SNAP changes, connect again
create VCXTestUtilModule Util

allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST
pause 1000
allowerrorcodes KERRNOTFOUND
Util DeleteDestination DEST_TEST2
pause 1000

Util CreateDestination DEST_TEST
Util SetUsedDestination DEST_TEST
Util DeleteDestinationAfterwards DEST_TEST
Util CopyMethod 3G_AP AP1 DEST_TEST
Util SetMethodPriority DEST_TEST AP1 0

Util CreateDestination DEST_TEST2
Util DeleteDestinationAfterwards DEST_TEST2
Util CopyMethod 3G_AP AP2 DEST_TEST2
Util SetMethodPriority DEST_TEST2 AP2 0

create VCXConnUtilTest VCXCONN
VCXCONN PrepareCase
VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth

VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

// wait for connection
Util WaitForConnectionActivity AP1
print Wait for ap1
waittestclass Util

// disconnect, wait for disconnect
print Disconnect ap1
VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP1
waittestclass Util

// set DEST_TEST2 as default
print default dest_test2
Util SetUsedDestination DEST_TEST2

// attempt to connect to DEST_TEST
print connect dest_test
VCXCONN GetIap DEST_TEST
waittestclass VCXCONN

// wait for connection on AP2
print Wait for ap2
Util WaitForConnectionActivity AP2
waittestclass Util

print Disconnect AP2
VCXCONN Disconnect
waittestclass VCXCONN
Util WaitUntilConnectionIsClosed AP1
waittestclass Util

print OK!
VCXCONN ShutdownTester
delete VCXCONN
pause 3000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
# Test CVcxConnUtility class.
#
#------------------------------------------------------------------------------------
#[Test]
#title ET31134 Default SNAP has no IAPs, connect
#create VCXTestUtilModule Util
#
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST
#pause 1000
#allowerrorcodes KERRNOTFOUND
#Util DeleteDestination DEST_TEST2
#pause 1000
#
#Util CreateDestination DEST_TEST
#Util SetUsedDestination DEST_TEST
#Util DeleteDestinationAfterwards DEST_TEST
#
#Util CreateDestination DEST_TEST2
#Util DeleteDestinationAfterwards DEST_TEST2
#Util CopyMethod 3G_AP AP2 DEST_TEST2
#Util SetMethodPriority DEST_TEST2 AP2 0
#
#create VCXConnUtilTest VCXCONN
#VCXCONN PrepareCase
#VCXCONN Create "MASTERPS" KVcxConnUtilTestModeBoth
#
#print connect default
#VCXCONN GetIap DEST_TEST
#allownextresult KERRGENERAL
#waittestclass VCXCONN
#
#print connect dest_test2
#VCXCONN GetIap DEST_TEST2
#allownextresult KERRGENERAL
#waittestclass VCXCONN
#
#VCXCONN PrintConnUtilDetails
#VCXCONN CheckProperty EVCxPSConnectionStatus EVCxNotConnected
#
#print OK!
#VCXCONN ShutdownTester
#delete VCXCONN
#pause 3000
#delete Util
#[Endtest]