How to add images to the reports

717 Views Asked by At

I am new with spock-reports I want to know how can I add images to the report? Currently I am working with Geb and I want to add the generated screenshots by Geb in the spock-report

1

There are 1 best solutions below

1
On

adding the screenshots to the reports is not too easy, but there are ways...

The Grails FilmStrip-Plugin just fetches the generated screenshots and displays them as film strip. This might already help. The documentation explains how to get some additional data for the screenshots taken.

Since Spock and Geb don't know too much about each other, it is not easy to bring both together, but it is possible - here is an example. It uses the same approach as the FilmStrip-Plugin together with the spock-reports template engine to create an asciidoc report with screenshots. The source can be found here. Unfortunately, most of the documentation is currently in german.

hope that helps!

Update: this answer was give now nearly two years ago. There is now a better plugin to include screenshots in your spock reports: https://github.com/AOEpeople/geb-spock-reports