commonappservices/alarmservertest/TestMultipleAlarmsSuite/scripts/MultipleModeTests.script
author William Roberts <williamr@symbian.org>
Fri, 02 Apr 2010 17:08:57 +0100
branchRCL_3
changeset 18 cf376912743d
parent 0 2e3d3ce01487
permissions -rw-r--r--
Remerge Symbian Foundation splashscreen changes, including new bitmap from Bug 2414

//
// 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:
//
//Script file for running Multiple Alarm Notification Mode tests

PRINT Running_Multiple_Alarm_Notification_Mode_Tests

// Load the test
LOAD_SUITE TestMultipleAlarmsServer -SharedData

// Start alert server in multiple alarms notification mode
RUN_TEST_STEP 	100 	TestMultipleAlarmsServer	TestStartAlertServerStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	start_multiple_3

// Initial Cleanup
RUN_TEST_STEP 	100	TestMultipleAlarmsServer	TestCleanupStep


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-002-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-002-HP-0001
//! @SYMTestCaseDesc 		Multiple alarms support
//! @SYMFssID			<App-Services>/<AlarmServer>/038
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Start the Alarm Alert Server passing a value for aMaxAlarms value.
//!				2.	Create many calendar entries with alarms that have imminent expiry times
//!				3.	Wait for the alarms to expire.
//!				4.	Verify that the test code is not notified of more than aMaxAlarms alarms
//! @SYMTestExpectedResults 	When these alarms expire, the alarms are displayed continuously, without waiting
//! 				for an action from the test code on the previous alarm.
//!				Only aMaxAlarms are notified at a time 
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Start alert server in multiple mode, create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// First 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// 4th one must not be showing/playing. There must not even be an alarm control object for it.
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4

// Acknowledge the first alarm and wait for a minute
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_1
DELAY 500

// Now the fourth one must be notifying
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_4

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep	
END_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-002-HP-0001


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-003-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-003-HP-0001
//! @SYMTestCaseDesc 		Snooze when number of alarms is equal to MaxAlarms
//! @SYMFssID			<App-Services>/<AlarmServer>/040
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Create as many armed calendar entries as the value of max alarms
//!				2.	Wait for the alarms to expire.
//!				3.	Snooze one of the alarms
//! @SYMTestExpectedResults 	1.	When these alarms expire, the alarms are displayed continuously, without waiting 
//! 					for an action from the test code on the previous alarm.
//!				2.	Only the alarm, on which the snooze request was placed, is snoozed, and the 
//!					others still keep notifying
//!				3.	The alarm that was snoozed, is notified again, after the snooze period even if the 
//!					test code does not respond to the already notifying alarms.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_3
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_3mins

// All 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// Snooze 3rd alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmSnoozeStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snooze_3
DELAY 500

// 1st and 2nd alarms must be showing (2nd one playing). 3rd alarm is snoozing.
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_2
// Since alert server must maintain only currently notifying alarms, alarms server asks
// alert server to remove alarm3 from its list
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snoozing_3

// Wait for 3rd alarm to wake up again
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_2mins

// All 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-003-HP-0001


START_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-004-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-004-HP-0001
//! @SYMTestCaseDesc 		Snooze when number of alarms is greater than MaxAlarms
//! @SYMFssID			<App-Services>/<AlarmServer>/040
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Create more armed calendar entries than the value of max alarms
//!				2.	Wait for the alarms to expire.
//!				3.	Snooze one of the alarms
//!				4.	Wait till szooze period ends and check that the snoozed alarm queues itself after waking up
//!				5.	Snooze another alarm and verify that the one that was snoozed previously notifies now.
//! @SYMTestExpectedResults 	1.	When the alarms expire, the alarms are displayed continuously, without waiting 
//! 					for an action from the test code on the previous alarm.
//!				2.	Only the alarm, on which the snooze request was placed, is snoozed, and the 
//!					others still keep notifying.
//!				3.	Another alarm which was in queue starts notifying
//!				4.	After the snooze period ends, the alarm that was snoozed is queued
//!				4.	When a second alarm is snoozed, the first one notifies.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// First 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// Fourth alarm not yet notified
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4

// Snooze 2nd alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmSnoozeStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snooze_2
DELAY 500

// 1st and 3rd alarms must be showing. 2nd one snoozing. The 4th one starts showing and playing.
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
// Since alert server must maintain only currently notifying alarms, alarms server asks
// alert server to remove alarm2 from its list
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snoozing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_4

// Wait for 2nd alarm to wake up again
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_2mins

// 2nd alarm pre-empts the 4th alarm when it wakes up and starts playing. 4th alarm is removed from alert server
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_2
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4

// Snooze 1st alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmSnoozeStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snooze_1
DELAY 500

// 4th alarm starts showing and playing
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	snoozing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_4

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-004-HP-0001 


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-005-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-005-HP-0001
//! @SYMTestCaseDesc 		Clear when number of alarms is equal to MaxAlarms
//! @SYMFssID			<App-Services>/<AlarmServer>/041
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Create as many armed calendar entries as the value of max alarms
//!				2.	Wait for the alarms to expire.
//!				3.	Clear one of the alarms
//! @SYMTestExpectedResults 	1.	When these alarms expire, the alarms are displayed continuously, without waiting 
//! 					for an action from the test code on the previous alarm.
//!				2.	Only the alarm, on which the clear requestwas placed, is cleared, and the 
//!					others still keep notifying
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_3
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_3mins

// All 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// Clear 3rd alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_3
DELAY 500

// 1st and 2nd alarms must be showing (2nd one playing). 3rd alarm is cleared
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_2
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_3

// Wait for sometime just to check if the same state is maintained.
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_2mins

// 1st and 2nd alarms must be showing (2nd one playing). 3rd alarm is cleared
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_2
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_3

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-005-HP-0001


START_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-006-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-006-HP-0001
//! @SYMTestCaseDesc 		Clear when number of alarms is greater than MaxAlarms
//! @SYMFssID			<App-Services>/<AlarmServer>/041
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Create more armed calendar entries than the value of max alarms
//!				2.	Wait for the alarms to expire.
//!				3.	Clear one of the alarms
//!				4.	Clear another alarm and verify that another queued one notifies now.
//! @SYMTestExpectedResults 	1.	When the alarms expire, the alarms are displayed continuously, without waiting 
//! 					for an action from the test code on the previous alarm.
//!				2.	Only the alarm, on which the clear request was placed, is cleared, and the 
//!					others still keep notifying.
//!				3.	Another alarm which was in queue starts notifying
//!				4.	When a second alarm is cleared another queued one notifies.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_5mins

// First 3 alarms must be showing (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// Fourth and fifth alarms not yet notified
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_5

// Clear 2nd alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_2
DELAY 500

// 1st and 3rd alarms must be showing. 2nd one cleared. The 4th one starts showing and playing.
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_4

// Clear 4th alarm
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_4
DELAY 500

// 1st 3rd and 5th alarms must be showing.(5th one playing) 2nd and 4th ones cleared. 
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 	!Error=-1	100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_5

// Wait for sometime just to check if the same state is maintained.
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_2mins

// 1st and 3rd alarms must be showing.(3rd one playing) 2nd and 4th ones cleared. 
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_3
RUN_TEST_STEP 	!Error=-1	100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_5

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep	
END_TESTCASE PIM-APPSRV-ALMSRV-PREQ1118-I-006-HP-0001


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-007-2-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-007-2-HP-0001
//! @SYMTestCaseDesc 		Clear all alarms in multiple alarms mode
//! @SYMFssID			<App-Services>/<AlarmServer>/041
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Start the Alarm Alert Server passing a value for aMaxAlarms value.
//!				2.	Create many calendar entries with alarms that have imminent expiry times
//!				3.	Wait for the alarms to expire.
//!				4.	Verify that the test code is not notified of more than one alarm at a time. 
//!				5.	Issue the Clear-all request
//! @SYMTestExpectedResults 	1.	When the alarms expire, the alarms are displayed continuously, without waiting 
//! 					for an action from the test code on the previous alarm.
//!				2.	All the alarms are cleared.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Start alert server in multiple mode, create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// 1st, 2nd and 3rd alarm must be notifying. (3rd one playing)
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_1
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showing_2
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	showingandplaying_3

// The 4th alarm must not have a corresponding alarm control object.
RUN_TEST_STEP 	!Error=-1	100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4

// Issue the clear-all request
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_all
DELAY 500

// All 4 alarms must not have a corresponding alarm control object.
RUN_TEST_STEP 	!Error=-1	100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_1
RUN_TEST_STEP 	!Error=-1	100	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_2
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_3
RUN_TEST_STEP 	!Error=-1	100 	TestMultipleAlarmsServer	TestAlarmControlStateStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	notshowing_4

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-007-2-HP-0001


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-008-2-AND-009-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-008-2-AND-009-HP-0001
//! @SYMTestCaseDesc 		Associated Data Multiple Alarms Mode, Reference to Calendar Entry
//! @SYMFssID			<App-Engines>/<CalInterimAPI>/ EAS 1.0, <App-Engines>/< AgnModel >/EAS 1.1
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Start the Alarm Alert Server passing a value for aMaxAlarms value.
//!				2.	Create many calendar entries with alarms that have the same expiry time. 
//!					Set either the 8-bit URL associated data or the MIME associated data for all 
//!					the calendar entries during creation.
//!				3.	Wait for the alarms to expire.
//!				4.	Retreive the Alarm Data from the Alert Server for the notifying alarms
//!				5.	Retrieve the corresponding Calendar entries' details, e.g., GUID, recurrence id etc. 
//!					from the Alarm Server for the notifying alarm
//!				6.	Retrieve the Calendar entries using the information received.
//!				7.	Retrieve the associated data from the Calendar entries and compare with the original 
//!					values used for setting them.
//! @SYMTestExpectedResults 	The associated data is set and retrieved consistently.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Start alert server in multiple mode, create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// Test the associated data of the notifying alarms
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4.entry1
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4.entry2
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4.entry3

// 4th alarm must not have been notified to alert server
RUN_TEST_STEP	!Error=-1	100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_4.entry4

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-008-2-AND-009-HP-0001


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-010-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-010-HP-0001
//! @SYMTestCaseDesc 		Associated Data – MIME - Multiple Alarms Mode. Different combinations of alarm sound name 
//!				and rich data.
//! @SYMFssID			<App-Engines>/<CalInterimAPI>/EAS 1.0
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Start the Alarm Alert Server without passing a value for aMaxAlarms value.
//!				2.	Create many calendar entries with alarms that have the same expiry time. 
//!					Set the MIME associated data for all the calendar entries during creation.
//!					Try different combinations like, a) no sound name, but has rich data; 
//!					b) does not have both etc.
//!				3.	Wait for the alarms to expire.
//!				4.	Retreive the Alarm Data from the Alert Server for the notifying alarms
//!				5.	Retrieve the corresponding Calendar entries' details, e.g., GUID, recurrence id etc. 
//!					from the Alarm Server for the notifying alarm
//!				6.	Retrieve the Calendar entries using the information received.
//!				7.	Retrieve the associated data from the Calendar entries and compare with the original 
//!					values used for setting them.
//! @SYMTestExpectedResults 	The associated data is set and retrieved consistently. If no alarm sound name was set when 
//!				creating the entries, the alarm sound name given to the UI by the alert server must be a NULL
//!				descriptor
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Start alert server in multiple mode, create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// Test the first entry. It neither has sound name, nor has rich data.
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5.entry1

// Test the associated data of the second and third alarms which has MIME associated data. 
// Second one does not have sound name. Third one has sound name.
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5.entry2
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5.entry3

// Clear one alarm, and give way to the fourth alarm.
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestAlarmClearStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	clear_1
DELAY 1000

// Test the associated data of the fourth alarm which has MIME associated data too
RUN_TEST_STEP			100	TestMultipleAlarmsServer	TestAssociatedDataStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	createcalentries_5.entry4

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-010-HP-0001


START_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-011-HP-0001
//! @file			TestMultipleAlarmsSuite.script
//! @SYMTestCaseID		PIM-APPSRV-ALMSRV-PREQ1118-I-011-HP-0001
//! @SYMTestCaseDesc 		The time lag between the expiry of the alarm at the alarm server and the notification 
//!				received from the alert server by the UI application.
//! @SYMFssID			
//! @SYMTestStatus 		Implemented
//! @SYMTestPriority 		High
//! @SYMTestActions 		1.	Start the Alarm Alert Server passing a value for aMaxAlarms value.
//!				2.	Create many calendar entries with alarms that have imminent expiry times
//!					Attach URL or MIME associated data to the entries
//!				3.	Wait for the alarms to expire.
//!				4.	Note down the time when alert server notifies the alarm control
//!				5.	Note down the original expiry time of the alarm
//!				6.	Compare both the times and check if they do not breach the allowed time
//!				7.	Similarly measure the time taken for retreiving the associated data
//! @SYMTestExpectedResults 	The time lag between the expiry of the alarm and the receipt of the notification must 
//!				not be greater than the allowed time for this (0.5 seconds). Similarly for the time lag 
//!				between retreiving the associated data.
//! @SYMTestType 		CIT
//! @SYMTestCaseDependencies	The test can only run on a TEXTSHELL environment, as the Alert Server is loaded by the test code

// Start alert server in multiple mode, create entries with imminent alarms and wait for the alarms to expire
RUN_TEST_STEP 			100 	TestMultipleAlarmsServer	TestCreateCalEntriesStep	Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	create_arbitrary
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestWaitStep			Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	wait_4mins

// Test the performance of all alarms
RUN_TEST_STEP			-1	TestMultipleAlarmsServer	TestPerformanceStep		Z:\TestData\Ini\TestMultipleAlarmsSuite.ini	performance

// Cleanup
RUN_TEST_STEP 			100	TestMultipleAlarmsServer	TestCleanupStep
END_TESTCASE	PIM-APPSRV-ALMSRV-PREQ1118-I-011-HP-0001


// Kill alert server thread
RUN_TEST_STEP 	100	TestMultipleAlarmsServer	TestKillAlertServerStep