wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script
branchRCL_3
changeset 18 d3d7683d16f5
parent 0 c40eb8fe8501
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,357 @@
+//
+// Copyright (c) 2005-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 networking-wlan-validation-automated-connection
+//! @SYMScriptTestEnvironment This test script requires a basic ROM.
+//
+// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
+// classes as a means of confidence that the APIs work as expected.
+// 
+// The purpose is to provide a regression test suite of PublishedAll
+// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
+// The tests are fully automated.
+//
+
+
+
+LOAD_SUITE T_Wlan
+
+
+
+
+
+START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
+
+//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
+//!@SYMAPI
+//!                CWlanMgmtClient::NewL();
+//!                REComSession::CreateImplementationL(TUid, TUid{ref});
+//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
+//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
+//!                REComSession::DestroyedImplementation(TUid);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		23/06/2008
+//!@SYMTestCaseDesc		Wlan scan
+//!@SYMTestActions
+//!                1.- Instantiate management client. Scan for broadcasted Wireless network names; SSIDs: NewL
+//!                2.- Instantiate Scan Info. Check that the given SSIDs were found:NewL ( WlanScanUid = {UID, Uid} )
+//!                3.- GetScanResults ( scaninfo = wlansinf )
+//!                4.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP,Iap} )
+//!                5.- Destroy Scan information: ~
+//!                6.- Destroy management client: ~
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                TEF reports the test case passed.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	100	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
+		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
+		CREATE_OBJECT	WlanScanInfo		wlansinf
+		COMMAND		wmgmtcnt		NewL
+		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0001-0001-NewL_command02
+		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0001-0001-GetScanResults_command03
+		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0001-0001-InformationElement_command04
+		COMMAND		wlansinf		~
+		COMMAND		wmgmtcnt		~
+	END_TEST_BLOCK
+END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
+
+
+
+
+START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
+
+//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
+//!@SYMAPI
+//!                CCommsDatabase::NewL(TBool);
+//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
+//!                CWlanMgmtClient::NewL();
+//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
+//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
+//!                CCommsDbTableView::GotoFirstRecord();
+//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
+//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
+//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
+//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
+//!                CWLanSettings::Disconnect();
+//!                CCommsDbTableView::GotoNextRecord();
+//!                RSocketServ::Connect(TUint);
+//!                RSocket::Open(RSocketServ{ref}, TUint);
+//!                RConnection::Start(TConnPref{ref});
+//!                RConnection::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
+//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
+//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
+//!                Shutdown(TShutdown,TRequestStatus{ref});
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		23/06/2008
+//!@SYMTestCaseDesc		Wlan connect
+//!@SYMTestActions
+//!                1.- Instantiate a CCOMMSDB : NewL
+//!                2.- instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb     = comsdb )
+//!                3.- SetOutgoingIap ( WLANIAP  = {IAP,Iap}; DEFAULT_SSID   = {IAP,Ssid}; commsdbtableview = comsdbtblview )
+//!                4.- Destroy a CCOMMSDBTABLEVIEW object: ~
+//!                5.- Destroy a CCOMMSDB object: ~
+//!                6.- ConnectSocketServ
+//!                7.- OpenRConnection ( socketserv  = scktserv )
+//!                8.- StartRConnection ( socketserv  = scktserv )
+//!                9.- OpenSocket ( socketserv  = scktserv; connection  = rcntion )
+//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
+//!                11.- HttpGet
+//!                12.- ShutDownSocket
+//!                13.- CloseSocket
+//!                14.- CloseConnection
+//!                15.- CloseSocketServ
+//!                
+
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Connect to a WLAN with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
+		CREATE_OBJECT	CCommsDatabase		comsdb
+		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
+		CREATE_OBJECT	RSocketServ		scktserv
+		CREATE_OBJECT	RConnection		rcntion
+		CREATE_OBJECT	RSocket		rsckt
+		COMMAND		comsdb		NewL
+		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0002-0001-NewL_command02
+		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0002-0001-SetOutgoingIap_command03
+		COMMAND		comsdbtblview		~
+		COMMAND		comsdb		~
+		COMMAND		scktserv		Connect
+		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0002-0001-Open_command07
+		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0002-0001-Start_command08
+		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0002-0001-Open_command09
+		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0002-0001-Connect_command10
+		OUTSTANDING
+		COMMAND		 rsckt		HttpGet
+		COMMAND		rsckt		Shutdown
+		OUTSTANDING
+		COMMAND		rsckt		Close
+		COMMAND		rcntion		Close
+		COMMAND		scktserv		Close
+	END_TEST_BLOCK
+END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
+
+
+
+
+START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
+
+//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
+//!@SYMAPI
+//!                CCommsDatabase::NewL(TBool);
+//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
+//!                CWlanMgmtClient::NewL();
+//!                REComSession::CreateImplementationL(TUid, TUid{ref});
+//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
+//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
+//!                CCommsDbTableView::GotoFirstRecord();
+//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
+//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
+//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
+//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
+//!                CWLanSettings::Disconnect();
+//!                CCommsDbTableView::GotoNextRecord();
+//!                RSocketServ::Connect(TUint);
+//!                RConnection::Open(RSocketServ{ref}, TUint);
+//!                RConnection::Start(TConnPref{ref});
+//!                REComSession::DestroyedImplementation(TUid);
+//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
+//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
+//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
+//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
+//!                
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		23/06/2008
+//!@SYMTestCaseDesc		Wlan Connection to 802.11b Router
+//!@SYMTestActions
+//!                1.- InstantiateMgmtClient: NewL
+//!                2.- InstantiateScanInfo: NewL   ( WlanScanUid = {UID, Uid} )
+//!                3.- Instantiate a CCOMMSDB: NewL
+//!                4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
+//!                5.- GetScanResultsL ( scaninfo = wlansinf )
+//!                6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211b,Iap} )
+//!                7.- CheckSupportedRates ( rate  = 2; scaninfo = wlansinf )
+//!                8.- CheckSupportedRates ( rate  = 4; scaninfo = wlansinf )
+//!                9.- CheckSupportedRates ( rate  = 11; scaninfo = wlansinf )
+//!                10.- CheckSupportedRates ( rate  = 22; scaninfo = wlansinf )
+//!                11.- SetOutgoingIap ( WLANIAP = {IAP,Iap};DEFAULT_SSID = {IAP80211b,Iap}; commsdbtableview = comsdbtblview )
+//!                12.- Destroy a CCOMMSDBTABLEVIEW object: ~
+//!                13.- Destroy a CCOMMSDB object: ~
+//!                14.- ConnectSocketServ
+//!                15.- OpenRConnection ( socketserv = scktserv )
+//!                16.- StartRConnection ( socketserv = scktserv )
+//!                17.- OpenSocket ( socketserv = scktserv;connection = rcntion )
+//!                18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
+//!                19.- HttpGet
+//!                20.- ShutDownSocket
+//!                21.- CloseSocket
+//!                22.- CloseConnection
+//!                23.- CloseSocketServ
+//!                24.- DestroyScanInfo: ~
+//!                25.- DestroyMgmtClient: ~
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Test case passes if the DUT can connect to the WLAN 802.11b router broadcasting the defined SSID.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
+		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
+		CREATE_OBJECT	WlanScanInfo		wlansinf
+		CREATE_OBJECT	CCommsDatabase		comsdb
+		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
+		CREATE_OBJECT	RSocketServ		scktserv
+		CREATE_OBJECT	RConnection		rcntion
+		CREATE_OBJECT	RSocket		rsckt
+		COMMAND		wmgmtcnt		NewL
+		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0003-0001-NewL_command02
+		COMMAND		comsdb		NewL
+		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0003-0001-NewL_command04
+		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0003-0001-GetScanResults_command05
+		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0003-0001-InformationElement_command06
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command07
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command08
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command09
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command10
+		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0003-0001-SetOutgoingIap_command12
+		COMMAND		comsdbtblview		~
+		COMMAND		comsdb		~
+		COMMAND		scktserv		Connect
+		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0003-0001-Open_command16
+		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0003-0001-Start_command17
+		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0003-0001-Open_command18
+		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0003-0001-Connect_command19
+		OUTSTANDING
+		COMMAND		 rsckt		HttpGet
+		COMMAND		rsckt		Shutdown
+		OUTSTANDING
+		COMMAND		rsckt		Close
+		COMMAND		rcntion		Close
+		COMMAND		scktserv		Close
+		COMMAND		wlansinf		~
+		COMMAND		wmgmtcnt		~
+	END_TEST_BLOCK
+END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
+
+
+
+
+START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
+
+//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
+//!@SYMAPI
+//!                CCommsDatabase::NewL(TBool);
+//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
+//!                CWlanMgmtClient::NewL();
+//!                REComSession::CreateImplementationL(TUid, TUid{ref});
+//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
+//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
+//!                CCommsDbTableView::GotoFirstRecord();
+//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
+//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
+//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
+//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
+//!                CWLanSettings::Disconnect();
+//!                CCommsDbTableView::GotoNextRecord();
+//!                RSocketServ::Connect(TUint);
+//!                RConnection::Open(RSocketServ{ref}, TUint);
+//!                RConnection::Start(TConnPref{ref});
+//!                REComSession::DestroyedImplementation(TUid);
+//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
+//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
+//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
+//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
+//!                
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		23/06/2008
+//!@SYMTestCaseDesc		Wlan Connection to 802.11g Router
+//!@SYMTestActions
+//!                1.- InstantiateMgmtClient: NewL
+//!                2.- InstantiateScanInfo: NewL   ( WlanScanUid = {UID, Uid} )
+//!                3.- Instantiate a CCOMMSDB: NewL
+//!                4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb     = comsdb)
+//!                5.- GetScanResultsL ( scaninfo = wlansinf )
+//!                6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211g,Iap} )
+//!                7.- CheckSupportedRates ( rate  = 2;scaninfo = wlansinf )
+//!                8.- CheckSupportedRates ( rate  = 4;scaninfo = wlansinf )
+//!                9.- CheckSupportedRates ( rate  = 11;scaninfo = wlansinf )
+//!                10.- CheckSupportedRates ( rate = 22;scaninfo = wlansinf )
+//!                11.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP80211g,Iap}; commsdbtableview = comsdbtblview )
+//!                12.- Destroy a CCOMMSDBTABLEVIEW object: ~
+//!                13.- Destroy a CCOMMSDB object: ~
+//!                14.- ConnectSocketServ
+//!                15.- OpenRConnection ( socketserv = scktserv )
+//!                16.- StartRConnection ( socketserv = scktserv )
+//!                17.- OpenSocket ( socketserv = scktserv; connection  = rcntion)
+//!                18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port ={DownloadServer,Port} )
+//!                19.- HttpGet
+//!                20.- ShutDownSocket
+//!                21.- CloseSocket
+//!                22.- CloseConnection
+//!                23.- CloseSocketServ
+//!                24.- DestroyScanInfo: ~
+//!                25.- DestroyMgmtClient: ~
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Test case passes if the DUT can connect to the WLAN 802.11g router broadcasting the defined SSID.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
+		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
+		CREATE_OBJECT	WlanScanInfo		wlansinf
+		CREATE_OBJECT	CCommsDatabase		comsdb
+		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
+		CREATE_OBJECT	RSocketServ		scktserv
+		CREATE_OBJECT	RConnection		rcntion
+		CREATE_OBJECT	RSocket		rsckt
+		COMMAND		wmgmtcnt		NewL
+		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0004-0001-NewL_command02
+		COMMAND		comsdb		NewL
+		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0004-0001-NewL_command04
+		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0004-0001-GetScanResults_command05
+		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0004-0001-InformationElement_command06
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command07
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command08
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command09
+		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command10
+		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0004-0001-SetOutgoingIap_command12
+		COMMAND		comsdbtblview		~
+		COMMAND		comsdb		~
+		COMMAND		scktserv		Connect
+		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0004-0001-Open_command16
+		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0004-0001-Start_command17
+		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0004-0001-Open_command18
+		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0004-0001-Connect_command19
+		OUTSTANDING
+		COMMAND		 rsckt		HttpGet
+		COMMAND		rsckt		Shutdown
+		OUTSTANDING
+		COMMAND		rsckt		Close
+		COMMAND		rcntion		Close
+		COMMAND		scktserv		Close
+		COMMAND		wlansinf		~
+		COMMAND		wmgmtcnt		~
+	END_TEST_BLOCK
+END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
+
+DELAY 10000