[imps] Cross browser automated tests
Sylvain Pasche
sylvain.pasche at gmail.com
Wed May 21 11:31:23 PDT 2008
Jeff Walden wrote:
> Sylvain Pasche wrote:
>> As a starting point, the testing environment and API would need to be
>> defined. I'm thinking of the following requirements:
>> * Possible for browser vendors to integrate these tests in their
>> testing frameworks
>
> Hrm, I neglected to mention this on the other thread, but this
> requirement can't fly. It discourages creating libraries for common
> testing functions (or even just for non-testing functions, e.g. how
> Mochitests all have access to the entire MochiKit framework) and using
> them declaratively (hardcoded <script> versus dynamic addition with
> callback schemes), which just makes life harder if you're writing tests.
Not sure if I've understood correctly what you mean here. If we say
that this common API consists of including a testapi.js file, which
should contain ok(), is(), ... functions, you can still include other
libraries containing common testing functions in your script header.
These libraries would need to call the low level test functions from the
testapi.js file.
The implementation of the ok() function would be specific to the
underlying testing framework (that could be an alert() for tests
published on a Web site, or would call dump() when running in Mozilla
runtests.py for instance).
For the non-testing functions, each testcase could include the
Javascript library they want (MochiKit, jQuery, ...)
Sylvain
More information about the Implementors
mailing list