QA/B2G getting started: Difference between revisions

From MozillaWiki
< QA
Jump to navigation Jump to search
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Overview===
==Overview==


Quick and dirty crash course on using a b2g phone for QA
Quick and dirty crash course on using a b2g phone for QA


===The Build===
You should definitely look here also:
[https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks Tips and Tricks]
 
==Releases and Code Names==
* tef aka 1.0.1
* leo aka v1-train or 1.1
 
==The Build==
* Devices
* Devices
** white ZTE: unagi
** white: unagi
** black ZTE: inari
** black: inari (camera is diff than unagi)
** ikura (final 1.0.1 shipping) same as inari internals, slightly different case
* Builds
* Builds
** User
** Production
** Eng builds
** 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: [https://wiki.mozilla.org/File:Channel-setup.zip Channel-setup]
* Update
* Update
** You can update over the air (OTA) generally
** You can update over the air (OTA) generally, there's beta, nightly
* Where to log bugs?
* Where to log bugs?
* What version am I on:
* What version am I on:
**Generally use the build SHA in Settings > About phone > advanced
**Generally use the build SHA in Settings > About phone > advanced


===Running Tests===
==Running Tests==


If you're on the eng build, there are unit tests scripts on device
If you're on the eng build, there are unit tests scripts on device


===Debugging===
==Debugging==
====ADB====
===ADB===


adb is how to tether and connect to your phone
adb is how to tether and connect to your phone


* get it here
* get it here: http://developer.android.com/sdk/index.html
* get log files
* get log files
** plug in USB
** plug in USB
** on phone goto Settings > About Phone > Advanced turn on USB and BLAH
** on phone goto Settings > About Phone > Advanced turn on USB and BLAH
** on mac run
** on mac run
*** ./adb devices
*** adb devices
*** if you don't see the device, restart adb with this cmd: ./adb usb
*** if you don't see the device, restart adb with this cmd: ./adb usb


how to get logs:
how to get logs:
* run ./adb logcat > log.txt
* run adb logcat > log.txt
* run ./adb logcat -c to clear
* run adb logcat -c to clear


how to push a pref:
how to push a pref:
* ./adb push pref("toolkit.identity.debug", true);
* find it here: [https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks Jason's Tips and Tricks]


===Tips and Tricks===
==Tips and Tricks==
* Screenshot
* Screenshot
** press home and power button
** press home and power button
Line 47: Line 56:
** long press home, swipe card/app window up
** long press home, swipe card/app window up


===Glossary===
* 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:
** [https://docs.google.com/spreadsheet/ccc?key=0Am9-O6I0-199dGlYc2dQUGtEcG5qUGpYVndCT0p1cHc#gid=0 config setup matrix]
 
==Glossary==
* Trusted/Native UI
* Trusted/Native UI
** Phone specific window that hosts a whitelist of URLs/Apps such as marketplace and persona/sign in.
** Phone specific window that hosts a whitelist of URLs/Apps such as marketplace and persona/sign in.

Latest revision as of 18:03, 17 May 2013

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.