psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg
changeset 0 4e1aa6a622a0
child 21 ccb4f6b3db21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/psmservices/psmserver/tsrc/PsmTestModule/conf/PsmTestModule.cfg	Tue Feb 02 00:53:00 2010 +0200
@@ -0,0 +1,650 @@
+/*
+* 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:  Testcase definitions for PsmTestModuleModule
+*
+*/
+
+
+// Definitions for this config file
+[Define]
+
+// Errors
+KNumberToRepeatOOMTest 10
+KNumberToRepeatCenRepOOMTest 1
+KErrCancel -3
+KErrArgument -6
+KErrAlreadyExists -11
+
+// Power save modes
+Normal 0
+FullPsm 1
+Partial 2
+Unknown 76
+
+// Boolean values
+ETrue 1
+EFalse 0
+
+[Enddefine]
+
+
+/*************************************************************************************
+ * 	TEST CASE DEFINITIONS
+ *************************************************************************************/
+
+// Load and unload server
+
+[Test]
+title Load and unload PSM engine
+create PsmTestModule test
+test LoadUnload
+delete test
+[Endtest]
+
+
+// Switch to power save mode
+
+[Test]
+title PSM to power save mode
+create PsmTestModule test
+test InitTest Normal
+test ChangePsmInit FullPsm
+test ChangePsmWaitComplete
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// Switch to normal mode
+
+[Test]
+title PSM to normal mode
+create PsmTestModule test
+test InitTest FullPsm
+test ChangePsmInit Normal
+test ChangePsmWaitComplete
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// Cancel PSM change
+
+[Test]
+title Cancel PSM change
+create PsmTestModule test
+test InitTest Normal
+test ChangePsmInit FullPsm
+test CancelPsm
+test ChangePsmWaitComplete
+pause 1000
+allownextresult KErrCancel
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// PSM Change twice when first PSM not yet complete
+// * Change PSM again before first is completed
+
+[Test]
+title PSM change twice
+create PsmTestModule test
+test InitTest Normal
+test ChangePsmInit FullPsm
+test ChangePsmInit Partial
+test ChangePsmWaitComplete
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// PSM Change End before complete
+// * Delete PSM client before mode change completes
+// * Observer is notified, hence allownextresult KErrCancel
+
+[Test]
+title PSM Change end before complete
+create PsmTestModule test
+test InitTest Normal
+test ChangePsmInit Partial
+allownextresult KErrCancel
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// PSM Change-Cancel-Change
+// * Start PSM change, cancel it and change to some other
+
+[Test]
+title PSM Change-Cancel-Change
+create PsmTestModule test
+test InitTest Normal
+test ChangePsmInit FullPsm
+test CancelPsm
+test ChangePsmWaitComplete
+pause 1000
+test ChangePsmInit Partial
+test ChangePsmWaitComplete
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// Concurrent PSM change, two clients
+// * Two PSM clients and both changes mode concurrently
+[Test]
+title PSM change two clients, two changes
+create PsmTestModule test1
+test1 InitTest FullPsm
+create PsmTestModule test2
+test1 ChangePsmInit Normal
+pause 1000
+test2 ChangePsmInit Partial
+test1 ChangePsmWaitComplete
+test2 ChangePsmWaitComplete
+test1 VerifyCenRepChange Partial
+test2 VerifyCenRepChange Partial
+test1 ChangePsmEnd
+test2 ChangePsmEnd
+delete test1
+delete test2
+[Endtest]
+
+
+// PSM Change, two clients, both gets notification
+// * Two PSM clients and both get notification if one changes mode
+[Test]
+title PSM change two clients, one change
+create PsmTestModule test1
+test1 InitTest Normal
+create PsmTestModule test2
+test2 PSMNotificationInit
+test1 ChangePsmInit FullPsm
+pause 1000
+test1 ChangePsmWaitComplete
+test1 ChangePsmEnd
+test2 PSMNotificationEnd FullPsm
+delete test1
+delete test2
+[Endtest]
+
+// PSM Change, two clients, other cancels request and does not get notification
+[Test]
+title PSM change two clients, one cancel, one change
+create PsmTestModule test1
+test1 InitTest Normal
+create PsmTestModule test2
+test2 PSMNotificationInit
+test2 PSMNotificationCancel
+test1 ChangePsmInit FullPsm
+pause 1000
+test1 ChangePsmWaitComplete
+test1 ChangePsmEnd
+allownextresult KErrArgument
+test2 PSMNotificationEnd FullPsm
+delete test1
+delete test2
+[Endtest]
+
+
+// PSM Request-Cancel-Change-Request
+// * Request PSM notification, cancel it and change mode, request again
+[Test]
+title PSM Request-Cancel-Change-Request
+create PsmTestModule test
+test InitTest Normal
+test PSMNotificationInit
+test PSMNotificationCancel
+test ChangePsmInit FullPsm
+test ChangePsmWaitComplete
+pause 1000
+test ChangePsmEnd
+test PSMNotificationInit
+test PSMNotificationEnd FullPsm
+delete test
+[Endtest]
+
+// PSM Request-Change-Request
+// * Request PSM notification, change mode without cancel, request again
+//[Test]
+//title PSM Request-Change-Request
+//create PsmTestModule test
+//test InitTest Normal
+//test PSMNotificationInit
+//pause 10000
+//test ChangePsmInit FullPsm
+//test ChangePsmWaitComplete
+//pause 1000
+//test ChangePsmEnd
+//test PSMNotificationInit
+//test PSMNotificationEnd FullPsm
+//delete test
+//[Endtest]
+
+// Switch to unknown power save mode
+
+[Test]
+title PSM to unknown power save mode
+create PsmTestModule test
+test ChangePsmInit Unknown
+test ChangePsmWaitComplete
+allownextresult KErrArgument
+test ChangePsmEnd
+delete test
+[Endtest]
+
+// ***************************************************************************
+// Notification tests
+// ***************************************************************************
+
+// Notification about PSM
+
+//[Test]
+//title PSM notification
+//create PsmTestModule observer
+//create PsmTestModule modechange
+//observer PSMNotificationInit
+//modechange ChangePsmInit FullPsm
+//modechange ChangePsmWaitComplete
+//modechange ChangePsmEnd
+//observer PSMNotificationEnd
+//delete observer
+//pause 1000
+//modechange FullPsmChange Normal
+//delete modechange
+//[Endtest]
+
+
+// PSM notification, two clients
+
+//[Test]
+//title PSM notification, two clients
+//create PsmTestModule observer
+//create PsmTestModule observer2
+//create PsmTestModule modechange
+//observer PSMNotificationInit
+//observer2 PSMNotificationInit
+//modechange ChangePsmInit FullPsm
+//modechange ChangePsmWaitComplete
+//modechange ChangePsmEnd
+//allownextresult FullPsm
+//observer PSMNotificationEnd
+//allownextresult FullPsm
+//observer2 PSMNotificationEnd
+//delete observer
+//delete observer2
+//pause 1000
+//modechange FullPsmChange Normal
+//delete modechange
+//[Endtest]
+
+
+// Notification about PSM twice from same client without cancel
+
+//[Test]
+//title PSM notification twice, same client
+//create PsmTestModule observer
+//create PsmTestModule modechange
+//observer PSMNotificationInit
+//pause 1000
+//observer PSMNotificationInit
+//modechange ChangePsmInit Partial
+//modechange ChangePsmWaitComplete
+//modechange ChangePsmEnd
+//allownextresult Partial
+//observer PSMNotificationEnd
+//delete observer
+//pause 1000
+//modechange FullPsmChange Normal
+//delete modechange
+//[Endtest]
+
+
+// Cancel Notification about PSM
+
+//[Test]
+//title Cancel PSM notification, no PSM change
+//create PsmTestModule observer
+//observer PSMNotificationInit
+//observer PSMNotificationCancel
+//pause 1000
+//allownextresult KErrCancel
+//observer PSMNotificationEnd
+//delete observer
+//[Endtest]
+
+
+// Delete notifier before mode change
+
+//[Test]
+//title Delete notification before complete
+//create PsmTestModule observer
+//observer PSMNotificationInit
+//observer PSMNotificationEnd
+//delete observer
+//[Endtest]
+
+
+// ***************************************************************************
+// CenRep change tests
+// ***************************************************************************
+
+[Test]
+title PSM CenRep change Normal to Full
+create PsmTestModule test
+test InitTest Normal
+test CenRepChange FullPsm
+test VerifyCenRepChange FullPsm
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+[Test]
+title PSM CenRep change Full to Partial
+create PsmTestModule test
+test InitTest Normal
+test FullPsmChange FullPsm
+test CenRepChange Partial
+test VerifyCenRepChange Partial
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+[Test]
+title PSM CenRep change Partial to Normal
+create PsmTestModule test
+test InitTest Partial
+test CenRepChange Normal
+test VerifyCenRepChange Normal
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// **************************************************************************
+// Settings API usage
+// **************************************************************************
+
+// Normal mode to full, use existing settings API from CPsmClient
+
+[Test]
+title PSM Settings Normal to Full, same client
+create PsmTestModule test
+test InitTest Normal
+test ChangeSettingsInit Normal
+test ChangePsmInit FullPsm
+test ChangePsmWaitComplete
+test ChangeSettings ETrue
+test ChangeSettingsEnd FullPsm
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// Partial mode to full, use existing settings API from CPsmNotifier
+
+//[Test]
+//title PSM Settings Partial to Full, Notifier client
+//create PsmTestModule observer
+//create PsmTestModule modechange
+//modechange FullPsmChange Partial
+//observer PSMNotificationInit
+//modechange ChangePsmInit FullPsm
+//modechange ChangePsmWaitComplete
+//modechange ChangePsmEnd
+//observer ChangeSettingsInit Partial
+//observer ChangeSettings ETrue
+//observer ChangeSettingsEnd FullPsm
+//allownextresult FullPsm
+//observer PSMNotificationEnd
+//delete observer
+//pause 1000
+//modechange FullPsmChange Normal
+//delete modechange
+//[Endtest]
+
+
+// Normal mode to partial, use own API class
+
+[Test]
+title PSM Settings Normal to Partial, own client
+create PsmTestModule test
+test InitTest Normal
+test ChangeSettingsInit Normal
+test ChangePsmInit Partial
+test ChangePsmWaitComplete
+test ChangeSettings EFalse
+test ChangeSettingsEnd Partial
+test ChangePsmEnd
+delete test
+[Endtest]
+
+
+// Check mode
+
+[Test]
+title Check PSM mode
+create PsmTestModule test
+test InitTest Normal
+test FullPsmChange Partial
+test CheckPsmMode Partial
+delete test
+[Endtest]
+
+
+// Get current settings
+
+[Test]
+title Get current settings
+create PsmTestModule test
+test InitTest FullPsm
+test GetCurrentSettings FullPsm
+pause 1000
+delete test
+[Endtest]
+
+// Backup settings
+
+[Test]
+title Backup settings
+create PsmTestModule test
+test InitTest FullPsm
+test BackupSettings FullPsm
+delete test
+[Endtest]
+
+
+// **************************************************************************
+// Performance tests
+// **************************************************************************
+
+// Open and close 100 clients
+
+//[Test]
+//title Open and close 100 clients
+//create PsmTestModule test
+//test OpenClosePerformanceInit 100
+//test OpenClosePerformanceEnd
+//pause 1000
+//delete test
+//[Endtest]
+
+
+// Open, request, cancel and close, 50 clients
+
+//[Test]
+//title Open, Request, Cancel and close 50 clients
+//create PsmTestModule test
+//test OpenClosePerformanceInit 50
+//test OpenClosePerformanceRequest
+//test OpenClosePerformanceCancel
+//test OpenClosePerformanceEnd
+//pause 1000
+//delete test
+//[Endtest]
+
+
+// Open, request, change, close 50 clients
+
+//[Test]
+//title Open, Request, Change and close 50 clients
+//create PsmTestModule test
+//test OpenClosePerformanceInit 50
+//test OpenClosePerformanceRequest
+//create PsmTestModule modechange
+//modechange FullPsmChange FullPsm
+//delete modechange
+//test OpenClosePerformanceChange Normal EFalse FullPsm
+//test OpenClosePerformanceEnd
+//pause 1000
+//test FullPsmChange Normal
+//delete test
+//[Endtest]
+
+
+// Change PSM mode 50 times in a row
+
+[Test]
+title Change PSM mode 50 times in a row
+create PsmTestModule test
+test InitTest FullPsm
+test ChangePsmPerformance 50 Normal FullPsm
+delete test
+[Endtest]
+
+
+// Change huge set of settings once, 50 sets / mode
+
+[Test]
+title Change huge set of settings
+create PsmTestModule test
+test InitTest FullPsm
+test ChangeSettingsPerformance
+delete test
+[Endtest]
+
+// Oom Test
+
+[Test]
+title Oom test for Loadandunload PSM engine
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test LoadUnload
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+
+[Test]
+title Oom test for Init PSM engine
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test InitTest Normal
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+[Test]
+title Oom test for CheckPsmMode 
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test CheckPsmMode Partial
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+[Test]
+title Oom test for CenRepChange 
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatCenRepOOMTest
+oomheapfailnext LOOP_COUNTER
+test CenRepChange FullPsm
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+[Test]
+title Oom test for VerifyCenRepChange 
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test VerifyCenRepChange FullPsm
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+
+[Test]
+title Oom test for PSM settings
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test ChangeSettingsEnd FulllPsm
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+
+
+[Test]
+title Oom test for ChangeSettingsPerformance
+create PsmTestModule test
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext LOOP_COUNTER
+test ChangeSettingsPerformance
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete test
+[Endtest]
+