QA/B2G getting started

From MozillaWiki
< 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
  • 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:

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

Marketplace

if anyone wants to test the marketplace interaction:

  1. on b2g goto:
    1. http://people.mozilla.org/~cwiemeersch/mktdev.html
    2. short for phones: goo.gl/B6wKo
  2. install 'market place dev'

test 1

  1. search for 'yacht'
  2. purchase it
    1. need profile to purchase: https://webpay.readthedocs.org/en/latest/use_hosted_webpay.html

test 2

  1. click on gear
  2. sign in

test 3

  1. 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.