Unit testing browser (Onion) code

0 views
Skip to first unread message

Ivo van der Wijk

unread,
Jun 3, 2010, 3:54:49 AM6/3/10
to rc...@googlegroups.com
Hi

I've explored a couple of options to unittest the current "Onion" client
code.

Guido Wesdorp has created and presented spidermonkey bindings a while
ago at a PUN meeting. However, this project is somewhat dead (since he
left his employer at that time) and the project is not open sourced.
He is looking into opensourcing his work anyway. See the lighting talk
section at http://reinout.vanrees.org/weblog/2008/12/02/pun-rotterdam.html

I also ran into http://www.envjs.org, a simulated browser environment
written by John Resig (JQuery) which supports enough browser
capabilities to at least run JQuery and many other toolkits. It runs on
top of Rhino (a Java based javascript engine) but it appears it also
runs on other engines (like v8, spidermonkey), which in turn have python
bindings (which, in turn, should make it possible to write tests in
py.test, for example)

I think env.js with rhino or, perhaps even better, v8/spidermonkey with
pythonbindings is the way to go. If python bindings are no options we
need to look into a suitable javascript based testing framework.
Again. Guido Wesdorp has some interesting stuff: http://johnnydebris.net/

On the other hand, having the tests in pure javascript makes them more
suitable for running in actual browsers as well, for real life cross
browser testing.

I'll look into this soon and keep you informed.

Regards

Ivo

--
Drs. I.R. van der Wijk / m3r Consultancy B.V.
PO-box 51091, 1007 EB Amsterdam, The Netherlands
KVK: 34243113
Tel: +31-85-8769825 / Fax: +31-84-8399422
Email: i...@m3r.nl / web: http://m3r.eu / PGP: http://m3r.nl/~ivo/pgp.txt

Reply all
Reply to author
Forward
0 new messages