-
Install the JRE or JDK. This demo uses Selenium, which requires Java, to run WebDriver tests.
-
Install grunt-cli
$ npm install -g grunt-cli
-
Install node modules
$ npm install
Unit tests in Node
$ grunt test
WebDriver tests
$ grunt test:browser
Check the Gruntfile for details. If you haven't used Grunt before, here are some commands that are also available using the Gruntfile in this example:
grunt
runs the default task in the Gruntfile, which istest
in this case.grunt intern:node
will run Intern’s Node executorgrunt intern:webdriver
will run Intern’s WebDriver executor, which will run unit tests in a browser
If you need more information check out the task documentation.