[TIP] ANN: oejskit 0.8.5 JavaScript in-browser testing and utility kit with py.test plugin

Samuele Pedroni pedronis at openend.se
Wed Jul 15 01:17:22 PDT 2009

Marius Gedminas wrote:
> On Tue, Jul 14, 2009 at 03:28:33PM +0200, Samuele Pedroni wrote:
>> jskit contains infrastructure and in particular a py.test plugin to
>> enable running unit tests for JavaScript code inside browsers. The
>> plugin requires py.test 1.0
> I've had an opportunity to use it before and loved the idea: JavaScript
> unit tests with real browser DOM implementations, integrated with your
> main test suite.  Unfortunately I couldn't use it on my project because
> we don't use py.test.
> As a result, I've an independent reimplementation that doesn't require
> py.test.  It is less powerful (e.g. no arbitrary severs-side Python code
> integration via WSGI) and somewhat hacky (spawns a thread with a trivial
> HTTP server implemented on top of Python's SimpleHTTPServer).  I use it
> with zope.testing but it should work with any unittest-compatible
> framework.
Notice that in this latest incarnation of the infrastructure all the 
entangling with py.test lives in the plugin,
I expect the rest of the code to be reusable after possibly some tweaks 
with other testing drivers getting more or less features depending on 
the latter capabilities and the design of the integration, the tricky 
bit of the exercise is probably going to be resource management and 
how/where to get configuration from. I had some discussion at europython 
about whether indeed reusing things with unittest would be possible.

I would consider patches/addtions in those directions.

More information about the testing-in-python mailing list