Plugin Grails permettant de lancer des tests CasperJS
Groovy
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
grails-app/conf
scripts
src/groovy/net/reservoircode/grails/plugin/casperjs
.gitignore
.travis.yml
CasperRunnerGrailsPlugin.groovy
README.rdoc
application.properties

README.rdoc

Grails CasperJS Tests Runner Plugin Build Status

The purpose of this plugin is to run functionals CapserJS tests in Grails application. The results of these tests are reported in xUnit XML files format. To execute functionnals CasperJS tests, you must put your tests files in the test/casper directory. They may can be written both Javascript and CoffeeScript language.

To more informations about CapserJS tools, you can read this introduction.

Installation

Before, you must install and configure the PhantomJS CapserJS tools. See the corresponding documentations for installs.

To install the latest stable version of the plugin run:

grails install-plugin casper-runner

You can also package and install casper-runner plugin for specific version by the following way:

git clone git://github.com/ulrich/grails-casper-plugin.git
git checkout TAG_VERSION
grails package-plugin
grails install-plugin ./grails-casper-runner-TAG_VERSION.zip -global

Declare the plugin in the Config.groovy like this:

plugins {
  runtime ":hibernate:$grailsVersion"
  ...

  runtime ":yui-minify-resources:0.1.4"
  ...

  build ":tomcat:$grailsVersion"
  ...

  <b>test ":casper-runner:TAG_VERSION"</b>
}

Using

To run the tests, you must enter the following command:

grails test-app casper:

Moreover in this first draft, you must add in run method how to render the xUnit file used by plugin for result test parsing. Like this:

casper.run(function() {
  this.test.renderResults(true, 0, this.cli.get('xunitFileName'));
});

Issues

Acutally, we are in the first release of plugin and of course there are many improvements possible. So, don't hesitate to report any bug/improvement in the issues tracker on the project.

License

The plugin is distributed under MIT license, see LICENSE.