Skip to content

[suggestion] Option to add custom build information to summary #165

@sbglasius

Description

@sbglasius

It would be great, if it was possible to implement an interface (say: ISummaryInfo) that would allow me to add custom build information (like information from GebConfig.groovy) to my summary screen.

I invision that I could have a custom class implementing ISummaryInfo and have a configuration option like com.athaydes.spockframework.report.ISummaryInfo=my.package.MySummaryInfo

The summary info could just be:

interface ISummaryInfo {
     Map getSummaryInfo()
}

and in TemplateReportAggregator this could be added:

        engine.createTemplate( template )
                .make( [ data          : allData,
                         'utils'       : Utils,
                         'fmt'         : new StringFormatHelper(),
                         summaryInfo: summaryInfo ?: [:],
                         projectName   : projectName,
                         projectVersion: projectVersion ] )
                .toString()

The setup of the summaryInfo should happen where the configuration is normally loaded, and it should be injected into TemplateReportAggregator

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions