Giter VIP home page Giter VIP logo

grails-casper-plugin's Introduction

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/PhantomJS 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.