Mozilla’s Web API – on testing a framework.


So, hello again to you all.  It’s been ages since I last posted at this space – but for good reason:  I’ve taken my performance show on the road again, and, at the same time, begun my work at Mozilla.  I find myself, once again, in the happy place of doing, on a daily basis, two different things that I love.

Primarily, my work has been around our Web API, and how we will write -and eventually automate – tests against it.  But how will we do this?

Our API is intended to “expand what the web can do”.   One of the most important implications is the ability to access – in a secure fashion – our device hardware from the web.  To that end, there are such things as Vibrator API, Battery API, Settings API, Accelerometer and Sensor API, a new and improved Geolocation API, Sound API….from which we can work our device directly from the web!

So, how does one test a bunch of APIs as a user would use them?    Well, one thing (and I’ve been involved with such an effort before) is to build an Application Framework – essentially a series of mock-up and atomic apps that each demonstrate a single API.  

Over time, these atomic apps will be folded into more feature rich ones – to demonstrate the capabilities and (hopefully – we’re QA after all) reveal any bugs that mixing and matching these APIs will uncover.

Another aspect that is important – particularly where automation is concerned – is a way of getting “golden values”.   We will build a series of simple native applications for each OS that will help us to obtain these values for comparison.

Watch this space –  in the (very near) future we will demonstrate how many of the web apis work; how we will build HTML/JS test pages around them and test many of the features as a user would use them; build our golden apps in java and/or python (depending on our target platform), and, eventually, work the lot into an automation framework.   All of the code will be freely available on github.

I’m hoping for many outcomes; one of them being that you will learn (if you don’t know already) how any of the technologies depicted here actually work, but also that you might jump in and help out – when the time is ready – by expanding what we’ve started here and our web api testpages, enriching our automation core apps, and really putting those apis through the paces, at their intended purpose.

Stay tuned!