/grails-plugin-windtunnel

Black-box testing infrastructure for Grails plugins

Primary LanguageGroovy

Grails Plugin Windtunnel

A framework for blackbox testing of Grails plugins.

Abstract

When developing Grails plugins, we can write unit & integration test cases that check the internals of the plugin, but we have no easy way of testing the plugin once it’s been packaged.

To test a packaged plugin, we must:
  • Install the plugin to our local build-tool cache or deploy it to a repository.

  • Create a new test application.

  • Configure the application to depend on the plugin.

  • Run different test cases.

Multiply this scenario across different versions of OS, Grails and plugins, and you’ve earned yourself a huge pain in the ass.

Current state

The windtunnel is currently able to:
  • Resolve a Grails version using SGVM.

  • Create a test application.

  • Configure the application to depend on a plugin.

  • Start the application.

Usage

The Grails Plugin Windtunnel distribution is now available via Bintray.

Author a flight plan

A flight plan is a simple Groovy script that’s evaluated with the Windtunnel’s DSL.

usingGrails('2.1.4')
testPlugin(artifactId: 'jquery-ui', version: '1.10.3' /*, repositoryUrl: 'http://jcenter.bintray.com', groupId: 'org.other.group'*/)
at('/tmp/')

Execute the flight plan

noam@mandromeda:~/gpw$ ./gpw.sh /home/noam/FlightPlan.groovy