B2G/QA/WebAPI Test Plan/Camera

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

B2G Camera API Test Plan

Summary

Lead David Clarke (irc: onecyrenus)
Contributors
API Description Camera API, used to get pictures, and put a preview screen on the page
API Developer Mike Habicher
API Project Page Camera API
API Tracking Bugs bug 740997
API Status Delivered and ready for test

Scope

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

Strategy

The ability to be able to test the camera api will cover three areas.

  1. 3rd Party App
  2. Browser
  3. Camera App

API

Camera API is relatively simple, and is defined as part of the nsIDOMCameraManager idl.

nsIDOMCameraManager

The attributes that I would like to iterate on, or be able to test are the following.

Attributes

   readonly attribute jsval        previewSizes;
   readonly attribute jsval        pictureSizes;
   readonly attribute jsval        fileFormats;
   readonly attribute jsval        whiteBalanceModes;
   readonly attribute jsval        sceneModes;
   readonly attribute jsval        effects;
   readonly attribute jsval        flashModes;
   readonly attribute jsval        focusModes;
   readonly attribute long         maxFocusAreas;
   readonly attribute double       minExposureCompensation;
   readonly attribute double       maxExposureCompensation;
   readonly attribute double       stepExposureCompensation;
   readonly attribute long         maxMeteringAreas;
   readonly attribute jsval        zoomRatios;
   readonly attribute jsval        videoSizes;


Methods

  • void autoFocus(in nsICameraAutoFocusCallback onSuccess, [optional] in nsICameraErrorCallback onError);
  • void takePicture(in jsval aOptions, in nsICameraTakePictureCallback onSuccess, [optional] in nsICameraErrorCallback onError);
  • void startRecording(in jsval aOptions, in nsICameraStartRecordingCallback onSuccess, [optional] in nsICameraErrorCallback onError);
  • void stopRecording();
  • void getPreviewStream(in jsval aOptions, in nsICameraPreviewStreamCallback onSuccess, [optional] in nsICameraErrorCallback onError);

Basic Positive Tests

  • Take Photo *
  • Preview Screen *
  • Different preview screen sizes*
  • Rockers which change the whiteBalanceModes, minExposure, maxExposure*
  • Change file formats*
  • Zoom Ratios *

mochitest-plain

  • Currently there are no mochitests of any level of depth.

Sanity Tests

Basic Negative Tests

  • Invalid Lat / Longitude
  • Autofocus supported when not
  • Incorrect file format
  • Incorrect rotation

Test App Design

This page is based on the WebAPI Test Plan Template