B.1. Detailed Spock reporting

As already mentioned, the Spock test runner is compatible with the JUnit runner, so all JUnit reporting tools will work normally for Spock tests as well.

To fully exploit Spock capabilities, you can also use Spock Reports (https://github.com/renatoathaydes/spock-reports). This project can create test reports with all the finer details of Spock tests. It renders the text of block descriptions and supports the documentation annotations (such as @Title), as shown in figure B.1.

Figure B.1. Spock reports that show given-when-then labels and Spock annotations

The project can be run either with Maven or Gradle, so regardless of your build system, you can easily create these reports with minimal effort. At the time of writing, the binaries are not yet released to Maven central, so you need to add an external repository to your pom file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.111.197