Reputation:
Working on a project that's being run off of a (Java based) Apache Maven environment.
The front end is utilizing Mocha tests and I'd like to be able to run the rests from Maven...
any ideas?
Mocha: http://visionmedia.github.com/mocha/
Maven: http://maven.apache.org/
Upvotes: 7
Views: 1991
Reputation: 4350
When you say front end, do you mean in the browser?
Maybe this is slightly different from what you want, but I have gotten Maven to work with Selenium + Jasmine before. Maven with the selenium plugin executes the browser instance for the reporting. The tests, however, are being run from the browser and they don't hook back into Maven.
If you can do mocha in the console instead, then I think a more ideal solution would be to create a maven plugin that simply executes the node command. Mocha's reporting flexibility should allow you to feed it back into Maven itself.
Upvotes: 3