This plugin assumes that Android SDK, Ant and Git are already configured in the execution environment.

The plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-cordova-jasmine --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

This task configures the Cordova libraries, sets the given Cordova version, creates a Cordova project, installs the given plugin and executes the configured Jasmine test suite inside emulators and devices. You can execute the task by using:

execute-jasmine-suite:jasmine-suite-1 where jasmine-suite-1 is the jasmine id as shown below

Type: Array
Description: Specifies the emulator/device serial numbers in which the Jasmine Suite should be executed.If it is empty, the tests will be executed inside all the available emulators/devices recognized during the process execution.

The Html reporter name should match one of the following regular expressions:

jasmine([^>]*)html([^>]*)js or HtmlReporter([^>]*)js

In addition the plugin searches for a Jasmine addReporter and adds a custom reporter after this line.

Note that when selecting a specific cordova version, the framework app of cordova-android requires a specific target sdk to be installed. Make sure that this target sdk is installed in your environment. In the example which is shipped with the project, the cordova version is set to be 3.0.0. This means that you must have android target sdk android-17 installed in your environment, since cordova-android version 3.0.0 requires the target sdk android-17.