Bug 1147918 <https://bugzilla.mozilla.org/show_bug.cgi?id=1147918> provides
a new mach command which simplifies the setup and execution of autophone
tests. 'mach autophone' downloads (if necessary), configures, and runs
autophone, our testing framework for on-device Android testing.

To successfully run an autophone test you will need a physical device --
emulators are not yet supported -- and it must be rooted.

'mach autophone' will guide you through the steps to configure and run
tests, but there are a lot of prompts and autophone's operation can seem
cryptic to the uninitiated. Feel free to ping me on irc if you are having
trouble.

 - Geoff

gbrown@mozpad:~/src$ ./mach autophone
 0:00.17 Unable to find an existing autophone directory. Let's setup a new
one...
Enter location of new autophone directory: [/home/gbrown/mach-autophone]
 0:06.29 Cloning autophone repository to '/home/gbrown/mach-autophone'...
 0:15.48 Installing required modules in a virtualenv...
New python executable in
/home/gbrown/mach-autophone/_virtualenv/bin/python2.7
...
 0:32.04 You must configure at least one Android device before running
autophone.
Configure devices now? (Y/n)
Connect your rooted Android test device(s) with usb and press Enter
 4:35.12 Added '01498B300600B008' to device configuration.
 4:35.12 Using unit test configuration at
/home/gbrown/mach-autophone/configs/unittest-defaults.ini
 4:35.12 Autophone must be started with a 'test manifest' describing the
type(s) of test(s) to run.
 4:35.13 These test manifests are available:
1. Talos - tp4m
2. Talos - tsvg
3. crashtests - all
4. js-reftests - all
5. mochitests - all
6. mochitests - dom browser element
7. mochitests - dom media
8. mochitests - media
9. mochitests - skia
10. mochitests - toolkit widgets
11. reftests - all
12. reftests - ogg video
13. reftests - webm video
14. robocop - all
15. robocop - testAdobeFlash
16. s1/s2 Throbber Start/Stop - blank - local
17. s1/s2 Throbber Start/Stop - blank - remote
18. s1/s2 Throbber Start/Stop - nytimes - local
19. s1/s2 Throbber Start/Stop - nytimes - remote
20. s1/s2 Throbber Start/Stop - twitter - local
21. s1/s2 Throbber Start/Stop - twitter - remote
22. smoketest
23. webappstartup
Select test manifest (1-23, or path to test manifest) 1
IP address of interface to use for phone callbacks [192.168.0.81]
 4:46.40 Some of your selected tests require a webserver.
Start a webserver now? [Y/n]
Webserver address? [192.168.0.81:8100]
 4:52.63 Launching webserver...
 4:52.63 Launching autophone...
2016-03-30 08:55:51,916|11994|MainThread|console|INFO|Starting server on
port 28001.
2016-03-30 08:55:51,916|11994|MainThread|console|INFO|Starting build-cache
server on port 28008.
2016-03-30 08:55:52,080|11994|MainThread|console|INFO|Starting autophone.
2016-03-30 08:55:52,082|11994|MainThread|console|INFO|Loading tests.
2016-03-30 08:55:52,087|11994|MainThread|console|INFO|Initializing devices.
2016-03-30 08:55:52,087|11994|MainThread|console|INFO|Initializing device
name=device-1, serialno=01498B300600B008
2016-03-30 08:55:54,098|11994|MainThread|console|INFO|Autophone started.
 4:58.68 Use 'trigger' to select builds to test using the current test
manifest.
 4:58.68 Type 'trigger', 'help', 'quit', or an autophone command.
autophone command? trigger
 5:03.15 Tests will be run against a build or collection of builds,
selected by:
1. The latest build
2. Build URL
3. Build ID
4. Date/date-time range
Build selection type? (1-4) 1
 5:04.34 You may optionally specify a repository name like
'mozilla-inbound' or 'try'.
 5:04.34 If not specified, 'mozilla-central' is assumed.
Enter repository name:
 5:09.08 You may optionally specify the build location, like 'nightly' or
'tinderbox'.
Enter build location:
 5:12.80 Triggering...Tests will run once builds have been downloaded.
 5:12.80 Use 'autophone-status' to check progress.
Connecting to autophone server...
autophone-triggerjobs {"test_names": [], "build": "
http://ftp.mozilla.org/pub/mobile/nightly/2016/03/2016-03-30-03-03-26-mozilla-central-android-api-15/fennec-48.0a1.multi.android-arm.apk";,
"devices": []}
- ok
autophone-triggerjobs {"test_names": [], "build": "
http://ftp.mozilla.org/pub/mobile/nightly/2016/03/2016-03-30-03-03-26-mozilla-central-android-x86/fennec-48.0a1.multi.android-i386.apk";,
"devices": []}
- ok
exit
-
autophone command? autophone-status
Hello? Yes this is Autophone.
state: RUNNING
phone device-1 (01498B300600B008):
  state RUNNING
  debug level 3
  no build loaded
  last update 0:00:05 ago:
    FETCHING BUILD: mozilla-central 20160330030326
  FETCHING BUILD for 0:00:05
  previous state 0:00:05 ago:
    IDLE
ok
autophone command?
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to