~gg-lp/music-app/music-app

« back to all changes in this revision

Viewing changes to README.autopilot

  • Committer: Tarmac
  • Author(s): Andrew Hayzen, Victor Thompson, nskaggs
  • Date: 2014-11-13 01:10:47 UTC
  • mfrom: (736.2.8 drop-ap-mocking-all)
  • Revision ID: tarmac-20141113011047-nmjmsb2j2e409f4b
* Drop AP mocking on device.

Approved by Ubuntu Phone Apps Jenkins Bot, Victor Thompson, Andrew Hayzen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Running Autopilot tests
 
2
 
 
3
Music 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 music app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
 
4
 
 
5
If you are looking for more info about Autopilot or writing AP tests for the music app, here are some useful links to help you,
 
6
 
 
7
- http://developer.ubuntu.com/api/devel/ubuntu-14.10/python/autopilot/
 
8
- http://developer.ubuntu.com/api/devel/ubuntu-14.10/python/autopilot-emulator/
 
9
 
 
10
## Prerequisites
 
11
 
 
12
Install the following autopilot packages required to run the tests,
 
13
$ sudo apt-get install python-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
 
14
 
 
15
 
 
16
## Running tests on the desktop
 
17
 
 
18
Using terminal:
 
19
 
 
20
*  Branch the music app code, for example,
 
21
    $ bzr branch lp:music-ap
 
22
    
 
23
*  Navigate to the tests/autopilot directory.
 
24
    $ cd music-app/tests/autopilot
 
25
 
 
26
*  run all tests.
 
27
    $ autopilot3 run -vv music_app
 
28
 
 
29
    to list all tests:
 
30
    $ autopilot3 list music_app
 
31
 
 
32
    To run only one test (for instance: music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song)
 
33
    $ autopilot3 run -vv music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song
 
34
 
 
35
    Debugging tests using autopilot vis
 
36
    $ autopilot3 launch -i Qt qmlscene music-app.qml
 
37
    $ autopilot3 vis
 
38
 
 
39
 
 
40
## Running tests on device or emulator:
 
41
 
 
42
NOTE: Prior to running the tests on the device, you will need to do the following if there is music on the system:
 
43
 
 
44
    $ mv /home/phablet/Music /home/phablet/.Music
 
45
    $ restart mediascanner-2.0
 
46
 
 
47
Using autopkg:
 
48
 
 
49
1. navigate to the directory where the music-app branch is and run:
 
50
  $ adt-run music-app --click=com.ubuntu.music --- ssh -s adb