Merge lp:~nik90/ubuntu-clock-app/checkbox-manual-tests into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 101
Merged at revision: 103
Proposed branch: lp:~nik90/ubuntu-clock-app/checkbox-manual-tests
Merge into: lp:ubuntu-clock-app
Diff against target: 246 lines (+207/-0)
7 files modified
tests/manual/2014.com.ubuntu.clock:clock-tests/.bzrignore (+2/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/alarms.pxu (+138/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/setting.pxu (+22/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/launcher/clock-test-cli (+21/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/manage.py (+21/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-alarm.whitelist (+2/-0)
tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-setting.whitelist (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/checkbox-manual-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Nicholas Skaggs (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Leo Arias (community) Approve
Zygmunt Krynicki Pending
Review via email: mp+234164@code.launchpad.net

Commit message

Added checkbox manual tests

Description of the change

Added checkbox manual tests. Do note that this is my first MP for this, so go easy on the review ;).

This MP doesn't cover all the manual tests. I just wanted to add a few and go about this one step at a time. In my next MP I will add debian packaging and the launcher for easy running of the tests.

To test this MP,
1. Add the checkbox devel ppa from https://launchpad.net/~checkbox-dev/+archive/ubuntu/ppa
2. Install plainbox and then navigate to the root-directory/test/manual/2014.com.ubuntu.clock:clock-tests/launcher folder
3. Run "sudo ../manage.py install"
4. Then run "./clock-test-cli"

Voila!

No worries this shoudl become way easier in the future.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

I think this is great. I would like to keep consistency on the ending periods at the end of the sentences. If you like them, add them everywhere. If you don't like them, remove them everywhere. But that's just because I'm a freak.

Please let me know the next time you are pushing a version to the store, and I will run all the tests to see how the process works.

Revision history for this message
Leo Arias (elopio) :
review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

NOTE: instructions should include an extra step:

after step 2, you should do

3) Install the clock app test provider

./manage.py install

(this should be automated or handled in a repeatable way, perhaps through another package)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Apart from a few comments down below I don't have anything to say other than that it looks OK.

If you have a CI loop for merging stuff into the clock-app you could teach it to run:

./manage.py validate -N

So that it can help everyone by catching various kind of problems. I'd merge this in and add a launcher so that everyone can run this easily.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I'd like to see you use this testcase format:

https://wiki.ubuntu.com/QATeam/TestCase

So something like:

1. Do something
    expect this
2. Do something else
    expect this
    expect that

review: Needs Fixing
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

It seems the ppa is also required for utopic; archive version must not be recent enough?

I managed to get it running by:

sudo add-apt-repository ppa:checkbox-dev/ppa
sudo apt-get update && sudo apt-get install plainbox
cd tests/manual/2014.com.ubuntu.clock:clock-tests
./manage develop
cd tests/manual/2014.com.ubuntu.clock:clock-tests/whitelist
plainbox run -w alarm.whitelist

Where are the test results written? What sort of gui can I use for this? How can this be packaged? Can I run this on the device?

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The version in Utopic is still the same as in Precise.

We're kind of neglecting non-LTS releases and with the current focus
on the touch + click that was okay at the time for our limited user
base. I'll refresh our packages in Debian and request a sync to Ubuntu
this week. I hope to have 0.11 which is both stable and featureful in
Utopic if I can.

Thanks
ZK

On Wed, Sep 10, 2014 at 11:38 PM, Nicholas Skaggs
<email address hidden> wrote:
> It seems the ppa is also required for utopic; archive version must not be recent enough?
>
> I managed to get it running by:
>
> sudo add-apt-repository ppa:checkbox-dev/ppa
> sudo apt-get update && sudo apt-get install plainbox
> cd tests/manual/2014.com.ubuntu.clock:clock-tests
> ./manage develop
> cd tests/manual/2014.com.ubuntu.clock:clock-tests/whitelist
> plainbox run -w alarm.whitelist
>
> Where are the test results written? What sort of gui can I use for this? How can this be packaged? Can I run this on the device?
> --
> https://code.launchpad.net/~nik90/ubuntu-clock-app/checkbox-manual-tests/+merge/234164
> You are requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/checkbox-manual-tests into lp:ubuntu-clock-app.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I meant Trusty :)

On Thu, Sep 11, 2014 at 2:23 AM, Zygmunt Krynicki
<email address hidden> wrote:
> The version in Utopic is still the same as in Precise.
>
> We're kind of neglecting non-LTS releases and with the current focus
> on the touch + click that was okay at the time for our limited user
> base. I'll refresh our packages in Debian and request a sync to Ubuntu
> this week. I hope to have 0.11 which is both stable and featureful in
> Utopic if I can.
>
> Thanks
> ZK
>
> On Wed, Sep 10, 2014 at 11:38 PM, Nicholas Skaggs
> <email address hidden> wrote:
>> It seems the ppa is also required for utopic; archive version must not be recent enough?
>>
>> I managed to get it running by:
>>
>> sudo add-apt-repository ppa:checkbox-dev/ppa
>> sudo apt-get update && sudo apt-get install plainbox
>> cd tests/manual/2014.com.ubuntu.clock:clock-tests
>> ./manage develop
>> cd tests/manual/2014.com.ubuntu.clock:clock-tests/whitelist
>> plainbox run -w alarm.whitelist
>>
>> Where are the test results written? What sort of gui can I use for this? How can this be packaged? Can I run this on the device?
>> --
>> https://code.launchpad.net/~nik90/ubuntu-clock-app/checkbox-manual-tests/+merge/234164
>> You are requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/checkbox-manual-tests into lp:ubuntu-clock-app.

96. By Nekhelesh Ramananthan

updated whitelist with generic patterns

97. By Nekhelesh Ramananthan

Improved whitelist files

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
98. By Nekhelesh Ramananthan

Removed gitignore and added newline

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
99. By Nekhelesh Ramananthan

Added a cli launcher

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
100. By Nekhelesh Ramananthan

Improved the tests and launcher description

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> I'd like to see you use this testcase format:
>
> https://wiki.ubuntu.com/QATeam/TestCase
>
> So something like:
>
> 1. Do something
> expect this
> 2. Do something else
> expect this
> expect that

This has been addressed in the latest commit.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
101. By Nekhelesh Ramananthan

Removed extra newlines

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I approve the new test format, thanks!

Zygmunt, thanks for answering my questions about the version in utopic.

I still have a few questions:

What sort of gui can I use for this (on desktop)?
How can this be packaged?
Can I run this on the device (I know there's a touch package, but how does it work? how do the tests get on the device?)?

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hey.

On the desktop you can use checkbox-gui (also from the PPA). The
launcher format is similar (but not identical). Have a look at the
lp:checkbox source tree at
providers/plainbox-providercertification-client/launchers/. The syntax
is an INI-style file with the fields that are documented on
http://checkbox.readthedocs.org/en/latest/profiles.html

On the device you still have to wait. The way this is going to work is
that you will create a similar launcher-like file but it will generate
a full click package instead. You can then submit that application to
the click store or side-load it on the device. I'll keep you updated
on the progress but we're making GREAT progress lately and it's all
coming together the way we wanted.

Meanwhile you can apt-get install plainbox, along with your provider
package, on the device if you make the filesystem writable.

Thanks
ZK

On Mon, Sep 15, 2014 at 4:33 PM, Nicholas Skaggs
<email address hidden> wrote:
> Review: Approve
>
> I approve the new test format, thanks!
>
> Zygmunt, thanks for answering my questions about the version in utopic.
>
> I still have a few questions:
>
> What sort of gui can I use for this (on desktop)?
> How can this be packaged?
> Can I run this on the device (I know there's a touch package, but how does it work? how do the tests get on the device?)?
> --
> https://code.launchpad.net/~nik90/ubuntu-clock-app/checkbox-manual-tests/+merge/234164
> You are requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/checkbox-manual-tests into lp:ubuntu-clock-app.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'tests/manual'
2=== added directory 'tests/manual/2014.com.ubuntu.clock:clock-tests'
3=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/.bzrignore'
4--- tests/manual/2014.com.ubuntu.clock:clock-tests/.bzrignore 1970-01-01 00:00:00 +0000
5+++ tests/manual/2014.com.ubuntu.clock:clock-tests/.bzrignore 2014-09-12 17:33:17 +0000
6@@ -0,0 +1,2 @@
7+dist/*.tar.gz
8+build/mo/*
9
10=== added directory 'tests/manual/2014.com.ubuntu.clock:clock-tests/jobs'
11=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/alarms.pxu'
12--- tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/alarms.pxu 1970-01-01 00:00:00 +0000
13+++ tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/alarms.pxu 2014-09-12 17:33:17 +0000
14@@ -0,0 +1,138 @@
15+id: alarm/trigger-alarm
16+plugin: manual
17+_summary: Trigger alarm test
18+estimated_duration: 120
19+_description:
20+ This test checks if an alarm is triggered at the correct time by the datetime indicator.
21+ 1. Launch the clock app.
22+ Clock app opens showing the current local time.
23+ 2. Swipe the bottom edge to open the alarms page.
24+ Alarms page should appear showing a list of alarm. If empty then you should see a
25+ message being displayed that "No saved alarms".
26+ 3. Press the plus icon to create a new alarm. Change the alarm time to ring in the next
27+ minute. Do not change any other options. Save Alarm.
28+ The saved alarm should be displayed in the alarms page.
29+ 4. Wait for the alarm to ring.
30+ The alarm should ring (with haptic feedback) at the time set in the previous step and
31+ should show a notification with the buttons "Snooze" and "Ok".
32+ 5. Press "Ok" to dismiss the alarm.
33+ The alarm should be dismissed.
34+
35+id: alarm/edit-alarm-sound
36+plugin: manual
37+depends: alarm/trigger-alarm
38+_summary: Edit alarm sound test
39+estimated_duration: 120
40+_description:
41+ This test checks if an updated alarm rings with the alarm sound selected by the user
42+ as this functionality has regressed in the past.
43+ 1. Launch the clock app.
44+ Clock app opens showing the current local time.
45+ 2. Swipe the bottom edge to open the alarms page.
46+ Alarms page should appear showing a list of alarm. If empty then you should see a
47+ message being displayed that "No saved alarms".
48+ 3. Press the plus icon to create a new alarm. Change the alarm time to ring in the next
49+ minute. Do not change any other options. Save Alarm.
50+ The saved alarm should be displayed in the alarms page.
51+ 4. Press the saved alarm to edit it.
52+ The edit alarm page should be visible with the values set in the previous step.
53+ 5. Press the "Alarm Sound" list item to change the alarm sound.
54+ The Sound page should be visible on pressing the "Alarm Sound" list item.
55+ 6. Choose a different alarm sound by pressing on any alarm sound.
56+ On pressing any alarm sound, you should be able to hear a preview of the alarm sound
57+ and also the checkbox is ticked to indicate it has been selected.
58+ 7. Press the back button and then save the alarm.
59+ You should be taken back to the alarms page after you save the alarm.
60+ 8. Wait for the alarm to ring.
61+ The alarm should ring (with haptic feedback) at the time set in the previous step and
62+ should show a notification with the buttons "Snooze" and "Ok".
63+ 9. Press "Ok" to dismiss the alarm.
64+ The alarm should be dismissed.
65+
66+id: alarm/silence-setting
67+plugin: manual
68+depends: alarm/trigger-alarm
69+_summary: Alarm Silence after setting test
70+estimated_duration: 660
71+_description:
72+ This test checks if the alarm's "silence after" setting is obeyed.
73+ 1. Launch the clock app.
74+ Clock app opens showing the current local time.
75+ 2. Click the settings icon shown in the top right.
76+ The settings page is visible showing the alarm settings.
77+ 3. Set the silence after setting to 10 minutes.
78+ The alarm silence after setting should read "10 minutes" to indicate
79+ it has been set.
80+ 4. Press the back button.
81+ The settings page is closed and you are returned to the main clock page.
82+ 5. Swipe the bottom edge to open the alarms page.
83+ Alarms page should appear showing a list of alarm. If empty then you should see a
84+ message being displayed that "No saved alarms".
85+ 6. Press the plus icon to create a new alarm. Change the alarm time to ring in the next
86+ minute. Do not change any other options. Save Alarm.
87+ The saved alarm should be displayed in the alarms page.
88+ 7. Wait for the alarm to ring.
89+ The alarm should ring (with haptic feedback) at the time set in the previous step and
90+ should show a notification with the buttons "Snooze" and "Ok".
91+ 8. Allow the alarm to keep ringing.
92+ The alarm should keep ringing and be silenced automatically by the phone only after
93+ the duration set in step three.
94+
95+id: alarm/vibration-setting
96+plugin: manual
97+depends: alarm/trigger-alarm
98+_summary: Alarm vibration setting test
99+estimated_duration: 120
100+_description:
101+ This test checks if the alarm vibration settings enables/disables the alarm vibration.
102+ 1. Launch the clock app.
103+ Clock app opens showing the current local time.
104+ 2. Click the settings icon shown in the top right.
105+ The settings page is visible showing the alarm settings.
106+ 3. Toggle the alarm vibration settings to off position.
107+ The switch is discoloured to indicate that it has been disabled.
108+ 4. Press the back button.
109+ The settings page is closed and you are returned to the main clock page.
110+ 5. Swipe the bottom edge to open the alarms page.
111+ Alarms page should appear showing a list of alarm. If empty then you should see a
112+ message being displayed that "No saved alarms".
113+ 6. Press the plus icon to create a new alarm. Change the alarm time to ring in the next
114+ minute. Do not change any other options. Save Alarm.
115+ The saved alarm should be displayed in the alarms page.
116+ 7. Wait for the alarm to ring.
117+ Wait for the alarm to ring.
118+ The alarm should ring at the time set in the previous step and should show a
119+ notification with the buttons "Snooze" and "Ok". However there should be no
120+ vibration when the alarm rings.
121+
122+id: alarm/snooze-setting
123+plugin: manual
124+depends: alarm/trigger-alarm
125+estimated_duration: 360
126+_summary: Test the alarm snooze setting options
127+_description:
128+ This test checks if the alarm snooze settings works as expected.
129+ 1. Launch the clock app.
130+ Clock app opens showing the current local time.
131+ 2. Click the settings icon shown in the top right.
132+ The settings page is visible showing the alarm settings.
133+ 3. Set the snooze duration to 2 minutes.
134+ The alarm snooze duration setting should read "2 minutes" to indicate
135+ it has been set.
136+ 4. Press the back button.
137+ The settings page is closed and you are returned to the main clock page.
138+ 5. Swipe the bottom edge to open the alarms page.
139+ Alarms page should appear showing a list of alarm. If empty then you should see a
140+ message being displayed that "No saved alarms".
141+ 6. Press the plus icon to create a new alarm. Change the alarm time to ring in the next
142+ minute. Do not change any other options. Save Alarm.
143+ The saved alarm should be displayed in the alarms page.
144+ 7. Wait for the alarm to ring.
145+ The alarm should ring (with haptic feedback) at the time set in the previous step and
146+ should show a notification with the buttons "Snooze" and "Ok".
147+ 8. Press the "Snooze" button.
148+ The alarm should be snoozed.
149+ 9. Wait for 2 minutes.
150+ The alarm should ring again (with haptic feedback). Note that if an alarm is set to ring
151+ originally at 10:00:00 and you snooze it the first time at 10:01:30, it should ring the next
152+ time at 10:03:30 and not at 10:02:00.
153
154=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/setting.pxu'
155--- tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/setting.pxu 1970-01-01 00:00:00 +0000
156+++ tests/manual/2014.com.ubuntu.clock:clock-tests/jobs/setting.pxu 2014-09-12 17:33:17 +0000
157@@ -0,0 +1,22 @@
158+id: setting/timezone-change
159+plugin: manual
160+_summary: Test to check if system timezone change is also done in the clock app
161+estimated_duration: 60
162+_description:
163+ Test to check if system timezone change also updates the time in the clock app.
164+ 1. Launch the clock app.
165+ Clock app opens showing the current local time.
166+ 2. Click the settings icon shown in the top right.
167+ The settings page is visible showing the alarm settings.
168+ 3. Press the "Change time and date" settings option.
169+ The system settings app should be opened with the "Time & Date" page
170+ shown.
171+ 4. Change the timezone.
172+ The time shown in the top panel should reflect the new timezone to
173+ confirm that it has been changed.
174+ 5. Return back to the clock app with switch right to left gesture.
175+ The time shown below the "Change time and date" settings also shows
176+ the new timezone time.
177+ 6. Press the back button.
178+ The main clock page is shown and the main clock also shows the new
179+ timezone time.
180
181=== added directory 'tests/manual/2014.com.ubuntu.clock:clock-tests/launcher'
182=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/launcher/clock-test-cli'
183--- tests/manual/2014.com.ubuntu.clock:clock-tests/launcher/clock-test-cli 1970-01-01 00:00:00 +0000
184+++ tests/manual/2014.com.ubuntu.clock:clock-tests/launcher/clock-test-cli 2014-09-12 17:33:17 +0000
185@@ -0,0 +1,21 @@
186+#!/usr/bin/env checkbox-launcher
187+
188+[welcome]
189+text= Welcome to Clock App Manual Tests!
190+ This application will guide you through some manual test cases which
191+ confirm the workings of the Clock application (part of Ubuntu Core
192+ Applications) and its interaction with the system. The test suites are
193+ split into various groups based on their functionality like alarm,
194+ settings etc.
195+
196+ If all the actions produce the expected results listed, please submit
197+ a 'passed' result.
198+
199+ If an action fails, or produces an unexpected results, please submit a
200+ 'failed' result and file a bug. Please be sure to include the bug number
201+ when you submit your result.
202+
203+[suite]
204+whitelist_filter = clock-app-.*
205+whitelist_selection=.*
206+skip_test_selection = True
207
208=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/manage.py'
209--- tests/manual/2014.com.ubuntu.clock:clock-tests/manage.py 1970-01-01 00:00:00 +0000
210+++ tests/manual/2014.com.ubuntu.clock:clock-tests/manage.py 2014-09-12 17:33:17 +0000
211@@ -0,0 +1,21 @@
212+#!/usr/bin/env python3
213+from plainbox.provider_manager import setup, N_
214+
215+# You can inject other stuff here but please don't go overboard.
216+#
217+# In particular, if you need comprehensive compilation support to get
218+# your bin/ populated then please try to discuss that with us in the
219+# upstream project IRC channel #checkbox on irc.freenode.net.
220+
221+# NOTE: one thing that you could do here, that makes a lot of sense,
222+# is to compute version somehow. This may vary depending on the
223+# context of your provider. Future version of PlainBox will offer git,
224+# bzr and mercurial integration using the versiontools library
225+# (optional)
226+
227+setup(
228+ name='2014.com.ubuntu.clock:clock-tests',
229+ version="1.0",
230+ description=N_("The 2014.com.ubuntu.clock:clock-tests provider"),
231+ gettext_domain="2014_com_ubuntu_clock_clock-tests",
232+)
233
234=== added directory 'tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists'
235=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-alarm.whitelist'
236--- tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-alarm.whitelist 1970-01-01 00:00:00 +0000
237+++ tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-alarm.whitelist 2014-09-12 17:33:17 +0000
238@@ -0,0 +1,2 @@
239+alarm/.*
240+
241
242=== added file 'tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-setting.whitelist'
243--- tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-setting.whitelist 1970-01-01 00:00:00 +0000
244+++ tests/manual/2014.com.ubuntu.clock:clock-tests/whitelists/clock-app-setting.whitelist 2014-09-12 17:33:17 +0000
245@@ -0,0 +1,1 @@
246+setting/.*

Subscribers

People subscribed via source and target branches