Register custom UrlReporter for Cucumber Reports
See original GitHub issueIs your feature request related to a problem? Please describe.
I would like to capture the URL of the published report and send a message to an external service (Slack) with the URL of the report.
Describe the solution you’d like
I want to be able to specify an alternative implementation of UrlReporter
, perhaps using a system property:
-Dcucumber.publish.urlreporter=com.acme.MyUrlReporter
Work involved:
- Split the current
UrlReporter
class to aUrlReporter
interface and aDefaultUrlReporter
class - Use
java.util.ServiceLoader
to instantiate the class, taken from thecucumber.publish.urlreporter
system property
Describe alternatives you’ve considered
Redirecting STDERR to a file, then parse it with a shell script and send the message. That’s quite a roundabout way of doing this.
Additional context
This is actually something that’s requested by a user of Cucumber Reports.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Reporting - Cucumber Documentation
Cucumber uses reporter plugins to produce reports that contain information ... This page documents built-in formatter plugins, custom formatters and some ...
Read more >Create custom reports in Cucumber - LinkedIn
By default cucumber provide below plugin but we can write one of our own may be to generate some custom reports. Built-in reporter...
Read more >How to Generate Cucumber Reports in Framework - Tools QA
How to Generate Cucumber Reports in Framework. How to create Cucumber HTML Reports. Steps to generate Junit XML Report in Cucumber.
Read more >Cucumber Reports - Customizing Report Format
Let's create our custom folder where we put our custom template files. Let's name it templates. Create template for the report to override....
Read more >Cucumber 4 - Is there any alternate for Reporter Interface for ...
Currently I am using Cucumber Options with plugin to invoke Custom Report Class implements Reporter. How to do it in newer Cucumber 4...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am very surprised this feature is not implemented already. Clicking on a console output shouldn’t be the only way to reach report. There is basically no way to share report link with others with your automation code.
I wasn’t suggesting implementing the slack logic - I only mentioned slack as an example. All I’m suggesting is to allow users to specify an implementation class of their own.
It could be used to send the result to a variety of destinations, depending on the users’ needs. Some possible use cases:
The idea is to open up the API so users can capture the URL in their own team/environment/organisation specific way.