Skip to content

A sample maven project with javascript unit testing using JS Test Runner

Notifications You must be signed in to change notification settings

ivanirjoao/jstest-runner-sample-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JS Test Runner Sample Project

This is a sample project for using PhantomJS and JS Test Runner to automate javascript testing. The tests are written using QUnit and Sinon.

Maven

The pom has the jetty plug-in for testing on a server.

mvn jetty:run

Once the server is running, use this URL to run the tests in the browser.

http://localhost:8080/validation.html

When doing a build (mvn install) the tests will be run automatically. The test server will try to bind to port 8080, so either change it or make sure nothing else is using it.

Eclipse

To run the tests in eclipse, you'll need to change the test runner and add this command-line argument:

-Dorg.codehaus.jstestrunner.commandPattern="C:/phantomjs-1.3.0-win32-static/phantomjs.exe '%1$s' %2$s"

See the screenshot runasconfig.png.

About

A sample maven project with javascript unit testing using JS Test Runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published