forked from ubports/clock-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.autopilot
61 lines (41 loc) · 1.95 KB
/
README.autopilot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Running Autopilot tests
=======================
Ubuntu Clock App follows a test driven development where autopilot tests are
run before every merge into trunk. If you are submitting your bugfix/patch to
the clock app, please follow the following steps below to ensure that all tests
pass before proposing a merge request.
If you are looking for more info about Autopilot or writing AP tests for the
clock app, here are some useful links to help you:
* http://developer.ubuntu.com/start/quality
* https://developer.ubuntu.com/api/autopilot/python/1.5.0/
For help and options on running tests, see:
* https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/
Prerequisites
=============
Install the following autopilot packages required to run the tests,
$ sudo apt-get install python3-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
Running tests on the desktop
============================
Using terminal:
* Get the clock app code,
$ git clone git@github.com:ubports/clock-app.git
* Build the clock app,
$ mkdir builddir && cd builddir
$ cmake .. && cmake --build . -- -j 3
$ cd ..
* Navigate to the tests/autopilot directory.
$ cd tests/autopilot
* run all tests.
$ autopilot3 run -vv ubuntu_clock_app
to list all tests:
$ autopilot3 list ubuntu_clock_app
To run only one test (for instance: test_add_single_type_alarm_must_add_to_alarm_list in TestAlarm.py):
$ autopilot3 run -vv ubuntu_clock_app.tests.test_alarm.TestAlarm.test_add_single_type_alarm_must_add_to_alarm_list
Debugging tests using autopilot vis
$ autopilot3 launch -i Qt qmlscene ../../app/ubuntu-clock-app.qml -I ../../builddir/backend/
$ autopilot3 vis
Running tests on device or emulator
===================================
Using autopkg:
1. navigate to the directory where the ubuntu-clock-app branch is and run:
$ adt-run ubuntu-clock-app --click=com.ubuntu.clock --- ssh -s adb -p YOURPASSWORD