Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

If you aren’t aware of JsTestDriver concepts, consider visiting http://code.google.com/p/js-test-driver/wiki/GettingStarted.

There is also an excellent tutorial introduction to JavaScript unit testing by Christian Johansen.

Setup project

We have created a sample project for you. Please download greeter-sample.zip, extract it and open the project in your IDE.

If you open GreeterTest.js for the first time, you will see error highlighting on the TestCase method call expression. Position the caret on the error-highlighted code, press Alt+Enter/Option+Enter and choose "Add JsTestDriver assertion framework support" from the list of available intention actions.

A global JavaScript library named "JsTestDriver Assertion Framework" will be created and associated with a project. To view it, open the Settings dialog (File | Settings or IntelliJ IDEA | Preferences) and select JavaScript Libraries.

Before you can run any of your tests you need to start the test server and capture at least one slave browser. The server does not have to reside on the machine where the test runner is, and the browsers themselves can be on different machines as well.

  • No labels