W3C home > Mailing lists > Public > public-device-apis@w3.org > November 2010

Re: DAP and Open Source Testing Tools

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Fri, 5 Nov 2010 10:24:09 +0100
Message-Id: <29E3BDAF-3BB4-4C67-8BCB-6A80A0B8B9B3@nokia.com>
To: "public-device-apis@w3.org WG" <public-device-apis@w3.org>
Hi,

On 5.11.2010, at 10.06, ext Anssi Kostiainen wrote:

> Hi,
> 
> My DAP and Open Source Testing Tools notes (in markdown) presented during the f2f day 2 attached.

[ Markdown is a way to mark up plain text, so you can use your favorite text editor to open the attachment. ]

The same content below for convenience (lines may wrap, so the attached version is probably a bit more readable):

[[

# DAP and Open Source Testing Tools

## PhoneGap
    * A development framework for building cross-platform mobile web apps
    * All major mobile platforms supported
    * Implements some DAP APIs, releases early and often
    * Not a testing tool, uses QUnit (test suite) and Mobile Spec (unit tests) for testing

## QUnit
    * #1 popular JS test suite, used by e.g. jQuery and PhoneGap
    * A test runner for performing unit tests w/ a jQuery-like API
    * Capable of testing any generic JavaScript code, also asynchronous
    * http://docs.jquery.com/Qunit
    * http://github.com/jquery/qunit

## Mobile Spec
    * A set of QUnit-compatible unit tests for PhoneGap
    * Some DAP API unit tests available
        * Contacts API and Contacts Writer API: http://github.com/phonegap/mobile-spec/blob/master/tests/contacts.tests.js
        * System Information API: http://github.com/phonegap/mobile-spec/blob/master/tests/system.tests.js
    * http://github.com/phonegap/mobile-spec

## Why QUnit and Mobile Spec?
    * Robust, tried, tested and permissively licensed open source projects
    * Well-behaving on all major mobile platforms
    * Unit tests for some DAP APIs ready-made
    * Makes writing tests easy and fun, good fit for test-driven development
    * Re-use and contribute to existing projects

## Why Not?

    * Not optimal for functional testing (user interaction), e.g. file picker interactions
    * Potential license incompatibility w/ W3C? (PhoneGap: MIT, QUnit: MIT+GPL, Mobile Spec: MIT)
    * Not Invented Here, not aligned with other W3C testing efforts
        * http://test.w3.org/
        * http://lists.w3.org/Archives/Public/public-html-testsuite/
        * http://dvcs.w3.org/hg/html/file/tip/tests/resources/testharness.js (by jgraham@opera)

## Misc Notes
    * Testing interfaces w/o JS binding is problematic ([NoInterfaceObject])
    * For functional testing, add Selenium to the mix: http://seleniumhq.org/

]]

-Anssi
Received on Friday, 5 November 2010 09:24:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:15 GMT