Confirmed users
487
edits
Rpappalardo (talk | contribs) |
|||
| Line 9: | Line 9: | ||
# It should locate your device | # It should locate your device | ||
== End 2 End Test == | == End-2-End Test (#1) == | ||
FindMyDevice end-to-end test with options!. This is what it does: | |||
* launches desktopB2G and uses marionette.js to sign into FXA and enable FMD, leaves window open | |||
* launches webdriver to sign into FMD web site with the same FXA acct | |||
* tells you if your phone was located withing 60 sec (can be changed) | |||
* kicks off Ringer on each test | |||
* specify options: repeat test, FXA server, FMD server, test timeout | |||
'''Installation''' | |||
Pre-requisites: | |||
* virtualenv recommended) | |||
* gaia profile generated (if you need to, run make test-integration, then kill when tests begin) | |||
$ mkvirtualenv fmdtest | |||
$ pip install selenium fxa-python-client psutil gaiatest | |||
* Clone my repo/branch, create a new directory if you already have gaia | |||
$ git clone https://github.com/rpappalax/gaia.git | |||
$ cd gaia | |||
$ git checkout fmd-e2e-plus | |||
'''Note''' | |||
* if you run into a compiler flag not found error on OSX, you may need to export this env var | |||
$ export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" | |||
'''Run Test(s)''' | |||
To see all options | |||
$ python fmd_locate.py -h | |||
Example: run a test 3x | |||
$ python fmd_locate.py -r 3 | |||
optional arguments: | |||
-h, --help show this help message and exit | |||
-x FXA_SERVER, --fxa-server FXA_SERVER | |||
Enter path of Firefox Accounts server (default:https | |||
://api-accounts.stage.mozaws.net/ | |||
-f FMD_SERVER, --fmd-server FMD_SERVER | |||
Enter the URL of the FMD server | |||
(default:https://fmd.stage.mozaws.net) | |||
-g GAIA_DIR, --gaia-dir GAIA_DIR | |||
Enter path of gaia dir | |||
(default:/Users/rpappalardo/git/B2G/gaia) | |||
-t TEST_TIMEOUT, --test-timeout TEST_TIMEOUT | |||
Enter the test timeout in seconds (default:60) | |||
-r REPEAT, --repeat REPEAT | |||
Enter the number of times to repeat test (default:1) | |||
-s SELENIUM_SERVER, --selenium-server SELENIUM_SERVER | |||
Enter path of selenium jar file | |||
(default:/Users/rpappalardo/git/B2G/gaia/selenium- | |||
server-standalone-2.42.2.jar) | |||
'''Reference''' | |||
Source | |||
* https://github.com/rpappalax/gaia/tree/fmd-e2e | |||
== End-2-End Test (#2) == | |||
FindMyDevice end to end test!. This is what it does: | FindMyDevice end to end test!. This is what it does: | ||
* launches desktopB2G and uses marionette.js to sign into FXA and enable FMD, leaves window open | * launches desktopB2G and uses marionette.js to sign into FXA and enable FMD, leaves window open | ||