Geb and Spock is a great combination if you need to create functional tests for your Grails application.
A not so well known feature is the report
feature:
whenever you use the command report "some text"
, geb tries to create a screenshot and save the current DOM as HTML.
This plugin crawls through the generated screenshots and creates an HTML report which displays preview images as film strip on the bottom of the page and the test result on the main part of the window. When you click on an image, it will be displayed full size, if you click on the name of a report image, the corresponding HTML file will be displayed. Without the proper path to referenced files, this view will look broken, but it is very usefull for debugging.
The aim of this plugin is not only to help a tester in developing Geb/Spock tests and see what went wrong, but also to create a report for your customer. With all those screenshot you can easily get an graphical overview of the application and see if all pages display correctly.
There is not much to do in order to use the plugin. Just configure it in your BuildConfig.groovy
as
test ":film-strip:0.1.7"
and add the following line to your gebConfig.groovy:
reportingListener = new grails.plugin.filmstrip.FilmStripReportingListener()
If your geb reportDir
is the standard one, the report will be generated after running grails test-app
.
The documentation is currently located at http://rdmueller.github.io/grails-filmStrip/ .
The source for the documentation can be found at https://github.com/rdmueller/grails-filmStrip/blob/master/src/doc/arc42-template.adoc .
To build the plugin, just do
./grailsw package-plugin
and to publish it, do
./grailsw publish-plugin
To be able to publish, you need to have an account on https://grails.org/plugin/film-strip