AOEpeople/geb-spock-reports

Name: geb-spock-reports

Owner: AOE

Description: Integrates Geb screenshots into the spock-reports library

Created: 2017-06-13 18:46:57.0

Updated: 2017-11-28 19:13:06.0

Pushed: 2017-12-10 18:09:46.0

Homepage:

Size: 93

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

geb-spock-reports

Download

geb-spock-reports is a library to integrate Geb screenshots into spock-reports.

Usage

Add jcenter() to the repositories in your build.gradle.

sitories {
jcenter()

Add dependencies.

ndencies {
testCompile 'com.aoe:geb-spock-reports:0.1.4'

// required spock libraries
testCompile "org.spockframework:spock-core:1.1-groovy-2.4-rc-2"
testCompile ("com.athaydes:spock-reports:1.3.1") { transitive = false }

// required geb libraries
testCompile "org.gebish:geb-spock:1.1.1"

// you may also need selenium support
testCompile "org.seleniumhq.selenium:selenium-firefox-driver:2.52.0"
testCompile "org.seleniumhq.selenium:selenium-support:2.52.0"

// recommended for logging
testCompile 'org.slf4j:slf4j-api:1.7.13'
testCompile 'org.slf4j:slf4j-simple:1.7.13'

Configure Geb

Create a GebConfig.groovy in src/test/resources. See Book of Geb for further configuration.

rt com.aoe.gebspockreports.GebReportingListener

rtingListener = new GebReportingListener()
rtsDir = 'build/geb-spock-reports'
Configure spock-reports

Create a properties file named

src/test/resources/META-INF/services/com.athaydes.spockframework.report.IReportCreator.properties

The following properties are required.

tput directory relative to working directory
athaydes.spockframework.report.outputDir=build/geb-spock-reports

t's use the TemplateReportCreator to utilize our custom template
athaydes.spockframework.report.IReportCreator=com.athaydes.spockframework.report.template.TemplateReportCreator

 true, code blocks are shown
athaydes.spockframework.report.showCodeBlocks=true

ecific properties to the TemplateReportCreator
athaydes.spockframework.report.template.TemplateReportCreator.specTemplateFile=/templates/spec-template.html
athaydes.spockframework.report.template.TemplateReportCreator.reportFileExtension=html
athaydes.spockframework.report.template.TemplateReportCreator.summaryTemplateFile=/templates/summary-template.html
athaydes.spockframework.report.template.TemplateReportCreator.summaryFileName=index.html

See the spock-reports documentation for further configuration.


Important: Make sure that the reportDir in GebConfig.groovy matches the outputDir in the .properties file!

License

This project is licensed under the Apache Software License, Version 2.0.

See LICENSE for more information.

Copyright 2017 Tilman Ginzel, AOE GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.