Question

I'm looking for a javascript unit test framework that I can use as part of my automated maven build. This CANNOT use an actual browser, and it MUST be fully browserless.

I've tried looking at a few posts on SO, but none seem to meet my needs. Is there such a javascript unit tester? I'm anxious to find out.

Was it helpful?

Solution

I was trying to solve the same problem. It seems, that this is not as common, as one might think from our perspective.

RhinoUnit looks very good.

If you need browser capabilities within Rhino, take a look at

OTHER TIPS

There are two projects called JSUnit (www.jsunit.net) and (jsunit.berlios.de). The latter is designed to work with Rhino and Maven. Note that there will be browser-specific problems that such tests will not discover, but it should help with basic functionality.

Not sure about a JavaScript unit testing framework, though I'm sure there is one. But I would probably look towards Rhino as JS interpreter.

http://www.mozilla.org/rhino/

If your JS references any of the browser/DOM you'll also need to mock/stub those...

Have you tried JSunit?

AFAIK, javascript is a language specifically designed to run in the browser.

Have you considereds j-unit tests? They do still run in the browser however.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top