Open BlueBell-XA opened 2 months ago
I haven't yet solved the original issue, but I have managed to achieve the outcome I was actually looking for.
@BeforeScenario
public void beforeScenario(TestOutcome outcome) {
}
Adding TestOutcome as a parameter for a function tagged with @BeforeScenario grants me access to the full scenario details, including the DataTable/s associated with a Scenario Outline.
I've created a custom listener class under src/test/java/listeners, and implemented the AbstractStepListener.
However, I'm unable to get the listener registered, or picked up in any way.... none of the functions are triggered. Reason: I need access to the Scenario Outline examples before the test is executed. I figure that can be achieved through overriding the 'exampleStarted' methods.
I have already tried this Before hook:
But the Scenario parameter doesn't have access to the outline examples... I can only see the Scenario Name, and tags.