From 7eb2466645ca42fa60cc972199a0967d29066516 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 11 Sep 2014 14:15:07 -0500 Subject: add manual tests --- tests/manual | 62 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/manual b/tests/manual index a542cac..6029884 100644 --- a/tests/manual +++ b/tests/manual @@ -1,4 +1,23 @@ +Notes on Battery Testing + +When building from source, an executable 'indicator-power-service-cmdline-battery' will be built in the tests/ directory. This has the same code as indicator-power-service, except instead of listening to UPower it has a single fake battery that can be set from the command line to set its charge level and whether it's charging or discharging. + +You'll need to stop the current indicator-power-service before starting the test one. After that, you enter in a number, or 'charging', or 'discharging', to set the fake battery. ctrl-c exits. + +Example: + + $ stop indicator-power # stop the real indicator-power service + $ build/tests/indicator-power-service-cmdline-battery # start the test service + 50 # sets the fake battery level to 50% + 30 # sets the fake battery level to 30% + charging # sets the fake battery to charging + discharging # sets the fake battery to discharging + ctrl-c # exits the test service + $ start indicator-power # restart the real service + + + Test-case indicator-power/unity7-items-check
Log in to a Unity 7 user session
@@ -22,20 +41,33 @@ Test-case indicator-power/unity8-items-check
The menu is populated with items
-Test-case indicator-power/low-battery-popups +Test case indicator-power/detect-charging-or-discharging +
+
Begin with a discharging device
+
The indicator's icon should denote a discharging battery; e.g. an icon without the '⚡' sign
+
Plug it in so that its battery is charging
+
The indicator's icon should change to show a charging battery
+
Unplug it again
+
The indicator's icon should revert back to the same one in step one
+
+ +Test case indicator-power/low-power-notifications
-
Open a terminal
-
Stop the currently-running power indicator: "stop indicator-power"
-
Start the fake battery harness in the tests/build/ directory: "indicator-power-service-cmdline-battery"
-
Battery indicator should update, showing a discharging battery with a 50% charge
-
Type: "10" (no quotes) and press Enter
-
A popup should appear saying 'Battery low - 10% charge remaining'
-
Battery indicator's icon should show a low charge
-
Battery indicator's "Charge level" menuitem should show a 10% charge
-
Type: "9" (no quotes) and press Enter
-
The 'Battery low' popup should NOT appear, since we've already been notified
-
Battery indicator's "Charge level" menuitem should show a 9% charge
-
Type: "5" (no quotes) and press Enter
-
No 'Battery low' popup SHOULD appear, since 5% is the next warning threshold
-
Battery indicator's "Charge level" menuitem should show a 5% charge
+
Wait for the system's battery level to drop to 10% (or fake it, see 'Notes on Battery Testing' above)
+
A notification should appear
+
Its title should read "Battery Low"
+
Its text should read "10% charge remaining"
+
The icon should be a low power icon
+
It should have two actions, "Battery settings" and "OK".
+
Tap OK to dismiss the popup
+
Wait (or fake) the battery level to drop to 9%
+
No new notification should appear -- we're still at the "Low" level
+
Wait (or fake) the battery level to drop to 4%
+
A notification should appear
+
Its title should read "Battery Critical"
+
Its text should read "4% charge remaining"
+
The icon should be a critical power icon
+
It should have two actions, "Battery settings" and "OK".
+
Tap 'Battery Settings'
+
ubuntu-system-settings should be launched to the Battery page
-- cgit v1.2.3 From 25cc0e4016957746818f97074ee52b068a4f765a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 11 Sep 2014 14:17:03 -0500 Subject: run manual tests through test-case-format tidier --- tests/manual | 84 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'tests') diff --git a/tests/manual b/tests/manual index 6029884..73d3211 100644 --- a/tests/manual +++ b/tests/manual @@ -7,67 +7,67 @@ You'll need to stop the current indicator-power-service before starting the test Example: - $ stop indicator-power # stop the real indicator-power service - $ build/tests/indicator-power-service-cmdline-battery # start the test service - 50 # sets the fake battery level to 50% - 30 # sets the fake battery level to 30% - charging # sets the fake battery to charging - discharging # sets the fake battery to discharging - ctrl-c # exits the test service - $ start indicator-power # restart the real service +$ stop indicator-power # stop the real indicator-power service +$ build/tests/indicator-power-service-cmdline-battery # start the test service +50 # sets the fake battery level to 50% +30 # sets the fake battery level to 30% +charging # sets the fake battery to charging +discharging # sets the fake battery to discharging +ctrl-c # exits the test service +$ start indicator-power # restart the real service Test-case indicator-power/unity7-items-check
-
Log in to a Unity 7 user session
-
Go to the panel and click on the Power indicator
-
Ensure there are items in the menu
+
Log in to a Unity 7 user session
+
Go to the panel and click on the Power indicator
+
Ensure there are items in the menu
Test-case indicator-power/unity7-greeter-items-check
-
Start a system and wait for the greeter or logout of the current user session
-
Go to the panel and click on the Power indicator
-
Ensure there are items in the menu
+
Start a system and wait for the greeter or logout of the current user session
+
Go to the panel and click on the Power indicator
+
Ensure there are items in the menu
Test-case indicator-power/unity8-items-check
-
Login to a user session running Unity 8
-
Pull down the top panel until it sticks open
-
Navigate through the tabs until "Battery" is shown
-
Battery is at the top of the menu
-
The menu is populated with items
+
Login to a user session running Unity 8
+
Pull down the top panel until it sticks open
+
Navigate through the tabs until "Battery" is shown
+
Battery is at the top of the menu
+
The menu is populated with items
Test case indicator-power/detect-charging-or-discharging
-
Begin with a discharging device
-
The indicator's icon should denote a discharging battery; e.g. an icon without the '⚡' sign
-
Plug it in so that its battery is charging
-
The indicator's icon should change to show a charging battery
-
Unplug it again
-
The indicator's icon should revert back to the same one in step one
+
Begin with a discharging device
+
The indicator's icon should denote a discharging battery; e.g. an icon without the '⚡' sign
+
Plug it in so that its battery is charging
+
The indicator's icon should change to show a charging battery
+
Unplug it again
+
The indicator's icon should revert back to the same one in step one
Test case indicator-power/low-power-notifications
-
Wait for the system's battery level to drop to 10% (or fake it, see 'Notes on Battery Testing' above)
-
A notification should appear
-
Its title should read "Battery Low"
-
Its text should read "10% charge remaining"
-
The icon should be a low power icon
-
It should have two actions, "Battery settings" and "OK".
-
Tap OK to dismiss the popup
-
Wait (or fake) the battery level to drop to 9%
-
No new notification should appear -- we're still at the "Low" level
-
Wait (or fake) the battery level to drop to 4%
-
A notification should appear
-
Its title should read "Battery Critical"
-
Its text should read "4% charge remaining"
-
The icon should be a critical power icon
-
It should have two actions, "Battery settings" and "OK".
-
Tap 'Battery Settings'
-
ubuntu-system-settings should be launched to the Battery page
+
Wait for the system's battery level to drop to 10% (or fake it, see 'Notes on Battery Testing' above)
+
A notification should appear
+
Its title should read "Battery Low"
+
Its text should read "10% charge remaining"
+
The icon should be a low power icon
+
It should have two actions, "Battery settings" and "OK".
+
Tap OK to dismiss the popup
+
Wait (or fake) the battery level to drop to 9%
+
No new notification should appear -- we're still at the "Low" level
+
Wait (or fake) the battery level to drop to 4%
+
A notification should appear
+
Its title should read "Battery Critical"
+
Its text should read "4% charge remaining"
+
The icon should be a critical power icon
+
It should have two actions, "Battery settings" and "OK".
+
Tap 'Battery Settings'
+
ubuntu-system-settings should be launched to the Battery page
-- cgit v1.2.3 From 20889f11f535de956983c83f3f85c68df1883455 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 11 Sep 2014 15:00:48 -0500 Subject: add device-brightness-slider manual test --- tests/manual | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/manual b/tests/manual index 73d3211..2e2944b 100644 --- a/tests/manual +++ b/tests/manual @@ -71,3 +71,19 @@ Test case indicator-power/low-power-notifications
Tap 'Battery Settings'
ubuntu-system-settings should be launched to the Battery page
+ +Test case indicator-power/device-brightness-slider +
+
On a device, pull down the power indicator's menu
+
The menu should include a brightness slider with icons
+
Slide the brightness slider back and forth
+
The screen should get brighter and darker in sync with the slider's position
+
Launch unity-system-settings' Brightness panel
+
Move both the indicator's and the settings panel's sliders
+
Both sliders' positions should stay in sync with each other
+
Both should have the same effect on the screen's brightness
+
Make a note of the current brightness level and slider position
+
Reboot the device
+
The screen brightness should be the same as it was before rebooting
+
The indicator's brightness slider should be in the same position as it was before rebooting
+
-- cgit v1.2.3 From d5d306583034954d99baf1515aea29b036eacbb8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 11 Sep 2014 15:02:31 -0500 Subject: fix typo in manual tests --- tests/manual | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/manual b/tests/manual index 2e2944b..1ec1524 100644 --- a/tests/manual +++ b/tests/manual @@ -41,7 +41,7 @@ Test-case indicator-power/unity8-items-check
The menu is populated with items
-Test case indicator-power/detect-charging-or-discharging +Test-case indicator-power/detect-charging-or-discharging
Begin with a discharging device
The indicator's icon should denote a discharging battery; e.g. an icon without the '⚡' sign
@@ -51,7 +51,7 @@ Test case indicator-power/detect-charging-or-discharging
The indicator's icon should revert back to the same one in step one
-Test case indicator-power/low-power-notifications +Test-case indicator-power/low-power-notifications
Wait for the system's battery level to drop to 10% (or fake it, see 'Notes on Battery Testing' above)
A notification should appear
@@ -72,7 +72,7 @@ Test case indicator-power/low-power-notifications
ubuntu-system-settings should be launched to the Battery page
-Test case indicator-power/device-brightness-slider +Test-case indicator-power/device-brightness-slider
On a device, pull down the power indicator's menu
The menu should include a brightness slider with icons
-- cgit v1.2.3