I would like to customize the content of the HTML report of my jbehave test, by adding informations calculated in the test step. Let's see what I want to do :
@Given("a test step")
public void ...
String customInfo = "calculate some info";
this.currentStepContext.info(customInfo);
...
}
and in the html reporter :
public void successful(String step) {
super.successful(step);
this.outputScenario.addStep(new OutputStep(this.currentStepContext.getInfo(), ""));
}
My problem is that in the html reporter, I don't have any link to the test step. It seems that there is no shared context. In this example, the attribute "currentStepContext" is different in the test class and in the reporter class. The only information that I have from my test step is the parameter "step", but it's just a string. Do you have any idea about what I should do?
The topic add custom info to jbehave could have been useful, but it doesn't talk about sharing a context.
Thanks in advance