I haven't looked at this, but I think it is entirely possible. Jason will know more, but I think he used to have a jython provider for an earlier version of surefire.

- Brett

On 23/07/2006 3:58 AM, Jesse Kuhnert wrote:
I feel a little sheepish even suggesting it, but since I plan on moving a
little ant task I created over to a maven2 plugin for this purpose I thought
I'd ask just in case.

The unit tests are written in javascript and executed via the java rhino (
http://www.mozilla.org/rhino/) runtime (which was partially implemented by
Brendan Eich as well, the javascript creator). I originally stole some of
the infrastructure for this from http://dojotoolkit.org, which I think got
it from http://burstproject.org/ .

The java code portion has been coded in a similar fashion to the core TestNG base, so I think it will be an easy fit to pop into surefire. It's imperfect
in that there is no real "window" object, but with a little work "mocking"
up js objects it's not really that hard to cover the 80% use case. It's
pretty simple and does a good job doing what it is intended to do. (ie not
anything comparable to what projects like htmlunit are trying to do with
rhino ). I'd have to refactor a couple things to remove the dependency on
dojo javascript runtime functions but don't foresee that being too much of
an issue.

For examples of how the current ant task / unit tests look see
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/.



--
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to