When I use scenario.write I get the text under an Output 1 label in the html report.
Is there any way to modify the label's name?
Thanks for the info.
So actually this is not related to cucumber, but certainly to Masterthought cucumber reporter.
You are using the json formatter from cucumber. Your output is not identified as "Output 1" by cucumber or its json formater. Masterthought cucumber-reporting do that, and I do not know that tool myself.
You'll certainly be able to get more appropriate help from the developer: https://github.com/damianszczepanik/cucumber-reporting
Thanks for the reply.
Masterthought only interprets the info that is found in the json afaik.
I just opened up the json file, the one created by cucumber, and there is a field in it called: "output" which was created by the scenario.write function (basically the output is something like this: output: "text written in the function")
And to expand a bit, scenario.write function seems to be linked to the ScenarioImpl.class from cucumber.runtime package, and from there it goes into the Reporter class from the Gherkin Formatter classes.
Yes, the json contains that "output" key. This is how data are structured within the json formatter: this is the name of a field, an internal identifier. It is up to the final renderer if built upon the json report to decide how to render that info.
Masterthought decided to render the name of that field capitalizing it and adding an index to it.
The cucumber built-in html formatter does not render the name of that field at all, just its content.
I could imagine several ways for you to override "Output N" in your HTML report: