diff -r 000000000000 -r 4e1aa6a622a0 resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm_power.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/te_hwrm_power.script Tue Feb 02 00:53:00 2010 +0200 @@ -0,0 +1,532 @@ +// Copyright (c) 2008-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 te_hwrm_power.script +//! @SYMTestSuiteName DEVSRVS-HWRM +//! @SYMScriptTestEnvironment telephony + +LOAD_SUITE te_hwrm + +START_TESTCASE DEVSRVS-HWRM-B-0001 +//!@SYMTestCaseID DEVSRVS-HWRM-B-0001 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Checking all basic power status are correct +//!@SYMTestPriority High +//!@SYMTestActions open power state sessions, checking battery level, battery status and charging status is correct +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerStatesL +END_TESTCASE DEVSRVS-HWRM-B-0001 + +START_TESTCASE DEVSRVS-HWRM-P-0002 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0002 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Opens a Power Session +//!@SYMTestPriority High +//!@SYMTestActions Opens a Power Session +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerConnectL +END_TESTCASE DEVSRVS-HWRM-P-0002 + +START_TESTCASE DEVSRVS-HWRM-P-0003 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0003 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Client gets Battery Info +//!@SYMTestPriority High +//!@SYMTestActions Open Power Session, issue GetBatteryInfo request. Results returned from the PowerMockSy are checked that are the expected. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryInfoL +END_TESTCASE DEVSRVS-HWRM-P-0003 + +START_TESTCASE DEVSRVS-HWRM-P-0004 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0004 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc 3 clients get Battery Info. +//!@SYMTestPriority High +//!@SYMTestActions Open 3Power Sessions, issue one GetBatteryInfo request for each client. Results returned from the PowerMockSy are checked that are the expected for each of the clients. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryInfoMultiClientL +END_TESTCASE DEVSRVS-HWRM-P-0004 + +START_TESTCASE DEVSRVS-HWRM-P-0005 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0005 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Gets Battery Info and a plugin error occurs. +//!@SYMTestPriority High +//!@SYMTestActions Open Power Session, issue GetBatteryInfo request. Expected error is returned from the PowerMockSy. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryInfoWithPluginErrorL +END_TESTCASE DEVSRVS-HWRM-P-0005 + +START_TESTCASE DEVSRVS-HWRM-P-0006 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0006 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Client gets Battery Voltage Info +//!@SYMTestPriority High +//!@SYMTestActions Open Power Session, issue GetBatteryVoltageInfo request. Results returned from the PowerMockSy are checked that are the expected. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryVoltageInfoL +END_TESTCASE DEVSRVS-HWRM-P-0006 + +START_TESTCASE DEVSRVS-HWRM-P-0007 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0007 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc 3 clients get Battery Voltage Info. +//!@SYMTestPriority High +//!@SYMTestActions Open 3Power Sessions, issue one GetBatteryInfo request for each client. Results returned from the PowerMockSy are checked that are the expected for each of the clients. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryVoltageInfoMultiClientL +END_TESTCASE DEVSRVS-HWRM-P-0007 + +START_TESTCASE DEVSRVS-HWRM-P-0008 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0008 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Gets Battery Voltage Info and a plugin error occurs. +//!@SYMTestPriority High +//!@SYMTestActions Open Power Session, issue GetBatteryVoltageInfo request. Expected error is returned from the PowerMockSy. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBatteryVoltageInfoWithPluginErrorL +END_TESTCASE DEVSRVS-HWRM-P-0008 + +START_TESTCASE DEVSRVS-HWRM-P-0009 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0009 +//!@SYMComponent telephony_hwrm +//!@SYMTestCaseDesc Gets Battery Base Interval used for measurements reporting. +//!@SYMTestPriority High +//!@SYMTestActions Open Power Session, request Base Time Interval (retrieved from Central Repository). +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerGetBaseTimeIntervalL +END_TESTCASE DEVSRVS-HWRM-P-0009 + +START_TESTCASE DEVSRVS-HWRM-P-0010 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0010 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 REQ12255 REQ12253 REQ12252 +//!@SYMTestCaseDesc Verify the battery power notification from the system +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Stop the notification after some time delay which should be less than max sampling period +//!@SYMTestExpectedResults Check the battery power attributes reported via the registered callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotifyL +END_TESTCASE DEVSRVS-HWRM-P-0010 + +START_TESTCASE DEVSRVS-HWRM-P-0011 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0011 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 REQ12255 REQ12253 REQ12252 REQ12254 +//!@SYMTestCaseDesc Verify the duration of the power notification from the system +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Set the maximum sampling period value to zero +//! 4. Call power attribute notification request API +//! 5. Stop the notification after 30msec time delay +//!@SYMTestExpectedResults Check the battery power attributes reported via the registered callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_InfiniteL +END_TESTCASE DEVSRVS-HWRM-P-0011 + +START_TESTCASE DEVSRVS-HWRM-P-0012 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0012 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 REQ12255 REQ12253 REQ12252 REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 30 sec +//! 5. Wait for the notification to stop after 30 sec over all. +//! 6. Change back the maximum sampling period to its old value +//!@SYMTestExpectedResults Check the timeout error after the maximum sampling period +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriodL +END_TESTCASE DEVSRVS-HWRM-P-0012 + +START_TESTCASE DEVSRVS-HWRM-P-0013 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0013 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 REQ12255 REQ12253 REQ12252 +//!@SYMTestCaseDesc Verify the sampling interval accepted by the system +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API with a sampling interval greater than 10 +//! 4. Stop the notification after some time delay +//!@SYMTestExpectedResults Check the battery power attributes reported via the registered callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_BigIntervalL +END_TESTCASE DEVSRVS-HWRM-P-0013 + +START_TESTCASE DEVSRVS-HWRM-P-0014 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0014 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the battery power notification from the system to multiple clients +//!@SYMTestPriority High +//!@SYMTestActions 1. Create three different power objects to mimic the multiple client session +//! 2. Register the power notification callbacks +//! 3. Call battery power notification request API for each power object +//! 4. Stop the request one by one after some time delay +//!@SYMTestExpectedResults Check the power notification registered via the callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_MultiClient_SameIntervalL +END_TESTCASE DEVSRVS-HWRM-P-0014 + +START_TESTCASE DEVSRVS-HWRM-P-0015 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0015 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the battery power notification from the system to multiple clients +//!@SYMTestPriority High +//!@SYMTestActions 1. Create three different power objects to mimic the multiple client session +//! 2. Register the power notification callbacks +//! 3. Call battery power notification request API for each power object +//! 4. Stop the request one by one after some time delay +//!@SYMTestExpectedResults Check the power notification registered via the callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_MultiClient_DiffIntervalL +END_TESTCASE DEVSRVS-HWRM-P-0015 + +START_TESTCASE DEVSRVS-HWRM-P-0016 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0016 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the system returns proper error code for the power notification request +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power notification request API +//! 4. Call power notification request API again +//!@SYMTestExpectedResults The return error code at step 4 should be KErrAlreadyExists +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_RedundantL +END_TESTCASE DEVSRVS-HWRM-P-0016 + +START_TESTCASE DEVSRVS-HWRM-P-0017 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0017 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify that the plug-in error code is passed back to the client +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create the power session +//! 2. Set the expected command for the MockSy plugin to power notification request +//! 3. Set the response package as error for the MockSy plugin +//! 4. Call power notification request API +//!@SYMTestExpectedResults Check the expected error code is receicved via the callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_Start_PluginErrorL +END_TESTCASE DEVSRVS-HWRM-P-0017 + +START_TESTCASE DEVSRVS-HWRM-P-0018 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0018 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify that the notification cleanup is done by the system +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create the power session +//! 2. Call power notification request API +//! 3. Set the expected command for the MockSY plugin as stop power notification +//! 4. Set the response package as error for the MockSY plugin +//! 5. Call Stop power notification +//!@SYMTestExpectedResults Check the remaining results have been sent back to the client before cancelling the request +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_Stop_PluginErrorL +END_TESTCASE DEVSRVS-HWRM-P-0018 + +START_TESTCASE DEVSRVS-HWRM-P-0019 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0019 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the sampling interval accepted by the system +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API with a sampling interval 20 +//! 4. Stop the notification after some time delay +//!@SYMTestExpectedResults Check atleast one battery power attributes reported via the registered callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_IntervalEqualL +END_TESTCASE DEVSRVS-HWRM-P-0019 + +START_TESTCASE DEVSRVS-HWRM-P-0020 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0020 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the sampling interval accepted by the system +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API with a sampling interval 50 +//!@SYMTestExpectedResults Check the timeout error after the maximum sampling period +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_IntervalGreaterL +END_TESTCASE DEVSRVS-HWRM-P-0020 + +START_TESTCASE DEVSRVS-HWRM-P-0021 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0021 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the system accepts the new maximum sampling period +//!@SYMTestPriority High +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Change the maximum sampling period other than the old value +//! 4. Call power attribute notification request API +//! 5. Wait till the new time interval elapses +//!@SYMTestExpectedResults Check the timeout error after the new maximum sampling period +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_WithoutRequestL +END_TESTCASE DEVSRVS-HWRM-P-0021 + +START_TESTCASE DEVSRVS-HWRM-P-0022 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0022 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 30 sec +//! 5. Wait for the notification to stop after 30 sec over all. +//! 6. Change back the maximum sampling period to its old value +//!@SYMTestExpectedResults Check the timeout error after the maximum sampling period +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_ElapsedTimeLessL +END_TESTCASE DEVSRVS-HWRM-P-0045 + +START_TESTCASE DEVSRVS-HWRM-P-0046 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0046 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 10 sec after 10 sec +//! 5. Wait for the notification to stop. +//! 6. Change back the maximum sampling period to its old value +//!@SYMTestExpectedResults Check the timeout error at step 5 +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_ElapsedTimeMoreL +END_TESTCASE DEVSRVS-HWRM-P-0022 + +START_TESTCASE DEVSRVS-HWRM-P-0023 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0023 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 0 +//! 5. Wait for the notification till 2 mins then stop it +//! 6. Change back the maximum sampling period to its old value +//!@SYMTestExpectedResults Check the notification does not stop +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_NonZeroToZeroL +END_TESTCASE DEVSRVS-HWRM-P-0023 + +START_TESTCASE DEVSRVS-HWRM-P-0024 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0024 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 0 +//! 5. Wait for the notification till 2 minst +//! 6. Change back the maximum sampling period to its old value7. Wait for the notification to stop after 20 sec +//!@SYMTestExpectedResults Check the timeout error after the maximum sampling period at state 7 +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_ZeroToNonZeroL +END_TESTCASE DEVSRVS-HWRM-P-0024 + +START_TESTCASE DEVSRVS-HWRM-P-0025 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0025 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to 20(same) +//! 5. Wait for the notification till it stops +//! 6. Change back the maximum sampling period to its old value +//!@SYMTestExpectedResults Check the timeout error after the maximum sampling period +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_SameValueL +END_TESTCASE DEVSRVS-HWRM-P-0025 + +START_TESTCASE DEVSRVS-HWRM-P-0026 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0026 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Set the maximum sampling period to a negative value +//!@SYMTestExpectedResults Check the notification stops with KErrGeneral +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_AdjustReportingPeriod_NegativeValueL +END_TESTCASE DEVSRVS-HWRM-P-0026 + +START_TESTCASE DEVSRVS-HWRM-P-0027 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0027 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify that the system queues the measurements and sent it to the client which are slow in processing each notification +//!@SYMTestPriority High +//!@SYMTestActions 1. Create power session +//! 2. Register the callback for power notification +//! 3. Introduce a delay of 200 millisec in the callback implementation +//! 4. Start power notification +//! 5. Stop the notification +//!@SYMTestExpectedResults Check the notification receives multiple measurements +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_SlowClientL +END_TESTCASE DEVSRVS-HWRM-P-0027 + +START_TESTCASE DEVSRVS-HWRM-P-0028 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0028 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the system returns proper error code for notification request without callback +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a power session +//! 2. Start power notification +//!@SYMTestExpectedResults KErrBadHandle error code +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_WithoutCallbackL +END_TESTCASE DEVSRVS-HWRM-P-0028 + +START_TESTCASE DEVSRVS-HWRM-P-0029 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0029 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the battery power notification from the system to multiple clients +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create two different power objects to mimic the multiple client session +//! 2. Register the power notification callbacks +//! 3. Call battery power notification request API for each power object. One client should request the notification with interval greater than the max sampling period. +//! 4. Stop the request one by one after some time delay +//!@SYMTestExpectedResults Check the power notification registered via the callback. Only one client among the two should get the notification. +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_MultiClient_DiffInterval_SpecialCaseL +END_TESTCASE DEVSRVS-HWRM-P-0029 + +START_TESTCASE DEVSRVS-HWRM-P-0030 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0030 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify that the system returns proper error code for power notification cancellation +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create the power session +//! 2. Call the cancel request API for power notification +//!@SYMTestExpectedResults Check the request is completed without any error. +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_Stop_WithoutStartL +END_TESTCASE DEVSRVS-HWRM-P-0030 + +START_TESTCASE DEVSRVS-HWRM-P-0031 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0031 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify the battery power notification from the system +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power attribute notification request API +//! 4. Stop the notification after some time delay which should be less than max sampling period +//! 5. Send Stop notification again +//!@SYMTestExpectedResults Check the battery power attributes reported via the registered callback. Check the second stop request is completed without any error. +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_Stop_RedundantL +END_TESTCASE DEVSRVS-HWRM-P-0031 + +START_TESTCASE DEVSRVS-HWRM-P-0032 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0032 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12251 +//!@SYMTestCaseDesc Verify that the plug-in error code is passed back to the client +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create the power session +//! 2. Set the expected command for the MockSy plugin to power notification request +//! 3. Set the response package as error for the MockSy plugin +//! 4. Call power notification request API +//!@SYMTestExpectedResults Check the expected error code is receicved via the callback +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_Start_Set_PluginErrorL +END_TESTCASE DEVSRVS-HWRM-P-0032 + +START_TESTCASE DEVSRVS-HWRM-P-0033 +//!@SYMTestCaseID DEVSRVS-HWRM-P-0033 +//!@SYMComponent telephony_hwrm +//!@SYMPREQ CR1833 +//!@SYMREQ REQ12254 +//!@SYMTestCaseDesc Verify the dynamic configuration of maximum sampling period. +//!@SYMTestPriority Medium +//!@SYMTestActions 1. Create a CHWRMPower object to open a session with HWRM server +//! 2. Register the power notification callback +//! 3. Call power,voltage,consumption attribute notification request API +//! 4. Set the maximum sampling period to a negative value +//!@SYMTestExpectedResults Check the notification stops with KErrGeneral +//!@SYMTestType CT +RUN_TEST_STEP 100 te_hwrm TEFUnit.CHWRMTest.TestPowerNotify_All_AdjustReportingPeriod_NegativeValueL +END_TESTCASE DEVSRVS-HWRM-P-0033 +PRINT Completed te_hwrm_power tests