wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:41:05 +0100
branchRCL_3
changeset 18 d3d7683d16f5
parent 0 c40eb8fe8501
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201029 Kit: 201035

//
// 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-transfer
//! @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-TRANSFER-0001

//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
//!@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);
//!                RConnection::Open(RSocketServ{ref}, TUint);
//!                RConnection::Start(TConnPref{ref});
//!                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 Download 100kB to User Disk
//!@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 ( socketserv  = scktserv )
//!                8.- StartRConnection socketserv ( socketserv  = scktserv )
//!                9.- OpenSocket( socketserv = scktserv; connection = rcntion )
//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
//!                11.- DownloadSendHTTPGet ( Host =  {DownloadServer,Ip}; File = /nokia/0100k.bin )
//!                12.- ReceiveHTTPResponse( Save = {driveC,mmc}\0100k.bin )
//!                13.- ShutDownSocket
//!                14.- CloseSocket
//!                15.- CloseConnection
//!                16.- CloseSocketServ
//!@SYMTestStatus		Verified
//!@SYMTestPriority		Normal
//!@SYMTestExpectedResults
//!                TEF reports the test case passed.
//!@SYMTestType			CIT

	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.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-Transfer-0001-0001-NewL_command02
		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0001-0001-SetOutgoingIap_command03
		COMMAND		comsdbtblview		~
		COMMAND		comsdb		~
		COMMAND		scktserv		Connect
		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0001-0001-Open_command07
		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0001-0001-Start_command08
		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0001-0001-Open_command09
		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0001-0001-Connect_command10
		OUTSTANDING
		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0001-0001-DownloadSendHTTPGet_command11
		OUTSTANDING
		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0001-0001-RecvOneOrMore_command12
		COMMAND		rsckt		Shutdown
		OUTSTANDING
		COMMAND		rsckt		Close
		COMMAND		rcntion		Close
		COMMAND		scktserv		Close
	END_TEST_BLOCK
END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001




START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002

//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-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);
//!                RConnection::Open(RSocketServ{ref}, TUint);
//!                RConnection::Start(TConnPref{ref});
//!                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 Download 10kB to Memory Card
//!@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 ( socketserv = scktserv )
//!                9.- OpenSocket ( socketserv = scktserv; connection = rcntion )
//!                10.- ConnectSocket ( Ip =  {DownloadServer,Ip}; Port ={DownloadServer,Port} )
//!                11.- DownloadSendHTTPGet ( Host =  {DownloadServer,Ip}; File = /nokia/0010k.bin )
//!                12.- ReceiveHTTPResponse ( Save = {driveE,mmc}\0010k.bin )
//!                13.- ShutDownSocket
//!                14.- CloseSocket
//!                15.- CloseConnection
//!                16.- CloseSocketServ
//!@SYMTestStatus		Verified
//!@SYMTestPriority		Normal
//!@SYMTestExpectedResults
//!                TEF reports the test case passed.
//!@SYMTestType			CIT

	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.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-Transfer-0002-0001-NewL_command02
		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0002-0001-SetOutgoingIap_command03
		COMMAND		comsdbtblview		~
		COMMAND		comsdb		~
		COMMAND		scktserv		Connect
		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0002-0001-Open_command07
		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0002-0001-Start_command08
		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0002-0001-Open_command09
		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0002-0001-Connect_command10
		OUTSTANDING
		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0002-0001-DownloadSendHTTPGet_command11
		OUTSTANDING
		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0002-0001-RecvOneOrMore_command12
		COMMAND		rsckt		Shutdown
		OUTSTANDING
		COMMAND		rsckt		Close
		COMMAND		rcntion		Close
		COMMAND		scktserv		Close
	END_TEST_BLOCK
END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002




START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003

//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
//!@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);
//!                RConnection::Open(RSocketServ{ref}, TUint);
//!                RConnection::Start(TConnPref{ref});
//!                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 Download 10MB to User Disk
//!@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 connection( socketserv = scktserv; connection = rcntion )
//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
//!                11.- DownloadSendHTTPGet ( Host = {DownloadServer,Ip}; File = /nokia/10MB.bin )
//!                12.- ReceiveHTTPResponse ( Save = {driveC,mmc}\10MB.bin )
//!                13.-ShutDownSocket
//!                14.- CloseSocket
//!                15.- CloseConnection
//!                16.- CloseSocketServer
//!@SYMTestStatus		Verified
//!@SYMTestPriority		Normal
//!@SYMTestExpectedResults
//!                Download a 10MB file to User Disk with no errors
//!@SYMTestType			CIT

	START_TEST_BLOCK	6000000	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.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-Transfer-0003-0001-NewL_command02
		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0003-0001-SetOutgoingIap_command03
		COMMAND		comsdbtblview		~
		COMMAND		comsdb		~
		COMMAND		scktserv		Connect
		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0003-0001-Open_command07
		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0003-0001-Start_command08
		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0003-0001-Open_command09
		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0003-0001-Connect_command10
		OUTSTANDING
		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0003-0001-DownloadSendHTTPGet_command11
		OUTSTANDING
		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0003-0001-RecvOneOrMore_command12
		COMMAND		rsckt		Shutdown
		OUTSTANDING
		COMMAND		rsckt		Close
		COMMAND		rcntion		Close
		COMMAND		scktserv		Close
	END_TEST_BLOCK
END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003




START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004

//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
//!@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);
//!                RConnection::Open(RSocketServ{ref}, TUint);
//!                RConnection::Start(TConnPref{ref});
//!                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 Upload 10MB from User Disk
//!@SYMTestActions
//!                1.- Instantiate a CCOMMSDB: NewL
//!                2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
//!                3.- GenerateFile ( File = {driveC,mmc}\10mb2.bin; Size   = 10485760 )
//!                4.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview  = comsdbtblview )
//!                5.- Destroy a CCOMMSDBTABLEVIEW object: ~
//!                6.- Destroy a CCOMMSDB object: ~
//!                7.- ConnectSocketServ
//!                8.-OpenRConnection ( socketserv = scktserv )
//!                9.- StartRConnection ( socketserv = scktserv )
//!                10.- OpenSocket ( socketserv = scktserv; connection   = rcntion )
//!                11.- ConnectSocket ( Ip = {UploadServer,Ip}; Port = {UploadServer,Port} )
//!                12.- UploadSendHTTPPost ( File  = {driveC,mmc}\10mb2.bin; FileServer = 10mb2.bin; clientID = SALT; serverScript = /dy/upload/upfile.php )
//!                13.- ReceiveHTTPResponse ( Save = KNullDesC )
//!                14.- ShutDownSocket
//!                15.- CloseSocket
//!                16.- CloseConnection
//!                17.- CloseSocketServ
//!@SYMTestStatus		Verified
//!@SYMTestPriority		Normal
//!@SYMTestExpectedResults
//!                Upload a 10MB from User Disk with no errors
//!@SYMTestType			CIT

	START_TEST_BLOCK	6000000	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.ini
		CREATE_OBJECT	CCommsDatabase		comsdb
		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
		CREATE_OBJECT	RSocketServ		scktserv
		CREATE_OBJECT	RConnection		rcntion
		CREATE_OBJECT	RSocket		rsckt
		CREATE_OBJECT	RFile		rfile
		COMMAND		comsdb		NewL
		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Transfer-0004-0001-NewL_command02
		COMMAND		rfile		GenerateFile			NETWORKING-Wlan-Transfer-0004-0001-GenerateFile_command03
		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0004-0001-SetOutgoingIap_command04
		COMMAND		comsdbtblview		~
		COMMAND		comsdb		~
		COMMAND		scktserv		Connect
		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0004-0001-Open_command08
		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0004-0001-Start_command09
		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0004-0001-Open_command10
		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0004-0001-Connect_command11
		OUTSTANDING
		COMMAND		rsckt		UploadSendHTTPPost			NETWORKING-Wlan-Transfer-0004-0001-UploadSendHTTPPost_command12
		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0004-0001-RecvOneOrMore_command13
		COMMAND		rsckt		Shutdown
		OUTSTANDING
		COMMAND		rsckt		Close
		COMMAND		rcntion		Close
		COMMAND		scktserv		Close
	END_TEST_BLOCK
END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004

DELAY 10000