QA/B2G getting started
< QA
Jump to navigation
Jump to search
Overview
Quick and dirty crash course on using a b2g phone for QA
You should definitely look here also: Tips and Tricks
Releases and Code Names
- tef aka 1.0.1
- leo aka v1-train or 1.1
The Build
- Devices
- white: unagi
- black: inari (camera is diff than unagi)
- ikura (final 1.0.1 shipping) same as inari internals, slightly different case
- Builds
- Production
- Eng - to switch, you could build it yourself, but the easiest way is to download a private build. Set adb and fastboot (android utils) in your path, then run ./flash.sh
- Use this to switch channels: Channel-setup
- Update
- You can update over the air (OTA) generally, there's beta, nightly
- Where to log bugs?
- What version am I on:
- Generally use the build SHA in Settings > About phone > advanced
Running Tests
If you're on the eng build, there are unit tests scripts on device
Debugging
ADB
adb is how to tether and connect to your phone
- get it here: http://developer.android.com/sdk/index.html
- get log files
- plug in USB
- on phone goto Settings > About Phone > Advanced turn on USB and BLAH
- on mac run
- adb devices
- if you don't see the device, restart adb with this cmd: ./adb usb
how to get logs:
- run adb logcat > log.txt
- run adb logcat -c to clear
how to push a pref:
- find it here: Jason's Tips and Tricks
Tips and Tricks
- Screenshot
- press home and power button
- Kill process on phone
- long press home, swipe card/app window up
- move app icons: long press - sometimes edge causes drag.
Utils
- ADB - android debug bride the the CLI for all things phone
- get it here: http://developer.android.com/sdk/index.html
- symlink it in your path: ln -sf <path to adb> /usr/local/bin/adb
- symlink fastboot also, if you use flash.sh: ln -sf <path to fastboot> /usr/local/bin/fastboot
Automated Testing - Marionette
- Emulator builds: http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g18/
- repo: https://github.com/mozilla/gaia-ui-tests/
- Pro Tip: when you run marionette on the device and you want to dump all the HTML out, use this: print marionette.page_source
- helpful: https://blog.mozilla.org/webqa/2013/02/13/part-2-ui-testing-on-firefox-os-working-with-iframes/
Marketplace
if anyone wants to test the marketplace interaction:
- on b2g goto:
- http://people.mozilla.org/~cwiemeersch/mktdev.html
- short for phones: goo.gl/B6wKo
- install 'market place dev'
test 1
- search for 'yacht'
- purchase it
- need profile to purchase: https://webpay.readthedocs.org/en/latest/use_hosted_webpay.html
test 2
- click on gear
- sign in
test 3
- write a review on an existing app
Persona
- to point your phone at different locations for persona push this pref to your phone:
- dev: user_pref("toolkit.identity.uri", "https://login.dev.anosrep.org");
- for improved logcat info for persona set this: toolkit.identity.debug true
- It's easy to test with the wrong configuration. Here's a environment matrix that helps understand acceptable configs:
Glossary
- Trusted/Native UI
- Phone specific window that hosts a whitelist of URLs/Apps such as marketplace and persona/sign in.