Re: battery tests

On Oct 4, 2013, at 10:44 PM, Lisa Seacat DeLuca <ldeluca@us.ibm.com> wrote:

> I'm willing to help out with the battery tests.

Thanks for volunteering to help with the testing effort.

> I forked the web-platform-tests on github: https://github.com/ldeluca/web-platform-tests 
> 
> and cloned to my local environment.  Then I ran the battery tests by opening the html files directly on my desktop computer.  The result was just a basic html page telling me the preconditions to run the tests. 
> 
> then i created a mobile app and copied all the files onto a physical device and i see the same.  Are their instructions on how to go about running these tests cases?  I did not see a readme on github.

The tests are also hosted at [1] (a mirror of the wpt GH repo), so you can run them online too.

There's no README, as the tests themselves should be self-documenting. Please feel free to suggest how to improve the instructions in the tests themselves.

> ...looking forward to helping out.... 

The IDL tests that can be automated are:

  battery-interface.html
  battery-interface-idlharness.html

To run these tests, open the pages and observe the output of the "Result" column. There's also an External API to be used by more sophisticated test setups [2].

The latter one should eventually replace the former, as the coverage of the idlharness.js is improved.

The rest of the tests are interactive, cannot be automated easily. The "Description" tells what the test is about, and the "Preconditions" section describes preconditions that must be true before executing a particular test. To take an example of battery-full.html test, before running the test you must make sure:

[[

1. The device is plugged in to the charger before this test is run.
2. The battery is full.

]]

To help out with the testing effort, you could look at the latest specification [3] and see that we are testing all the normative assertions (using RFC2119 keywords, MUST etc.). Also, you could see if the coverage of the idlharness.js is good enough to find out if we could replace battery-interface.html test with battery-interface-idlharness.html.

Finally, aligning the PhoneGap implementation with the spec would be great :)

Hope this helps!

Thanks,

-Anssi

[1] http://w3c-test.org/web-platform-tests/master/battery-status/
[2] http://w3c-test.org/resources/testharness.js
[3] https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html

Received on Monday, 7 October 2013 09:07:31 UTC