B2G/QA/WebAPI Test Plan/Battery Status

From MozillaWiki
< B2G‎ | QA‎ | WebAPI Test Plan
Jump to: navigation, search

B2G Battery API Test Plan


Lead TBD
Contributors Dave Hunt (irc: davehunt)
API Description Get details of the battery charging state and level, as well as listen for change of state or level.
API Developer Mounir Lamouri
API Project Page BatteryAPI
API Tracking Bugs bug 678694
API Status Delivered and ready for test


This test plan covers functional testing of the Battery API as delivered for Boot2Gecko. It does not attempt to cover performance, security, or other kinds of testing at this time.


The Battery API can be tested most effectively by manipulating the battery status and level of an emulated device, so primary testing will be via Marionette/JS through CI.

Some basic sanity tests can be added to Mochitest for default values where hardware emulation is not possible.




Tracking: bug 805435

Basic Positive Tests

  • Battery status change
    • [DONE] Charging -> Full
    • Charging -> Discharging
    • Charging -> Not Charging
    • Charging -> Unknown
    • Full -> Charging
    • Full -> Discharging
    • [DONE] Full -> Not Charging
    • Full -> Unknown
    • Not Charging -> Charging
    • [DONE] Not Charging -> Discharging
    • Not Charging -> Full
    • Not Charging -> Unknown
    • [DONE] Discharging -> Charging
    • Discharging -> Full
    • Discharging -> Not Charging (unrealistic scenario)
    • Discharging -> Unknown
    • Unknown -> Charging
    • Unknown -> Discharging
    • Unknown -> Full
    • Unknown -> Not Charging
  • Battery level change
    • Increase
    • [DONE] Decrease


Sanity Tests

  • [DONE] Verify default values when battery is not present

This page is based on the WebAPI Test Plan Template