You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a custom listener class under src/test/java/listeners, and implemented the AbstractStepListener.
public class CustomListener extends AbstractStepListener {
// Implemented methods here.
}
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:
@Before
public void before(Scenario scenario) {
// Code here
}
But the Scenario parameter doesn't have access to the outline examples... I can only see the Scenario Name, and tags.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: