Pause Execution From Listener

I’m experiencing sporadic failures in production due to (I’m assuming) an unknown fault with the test system. I really need to debug these when they occur to get to the bottom of it.

I’d like to create a generic listener that allows me to load a test plan and select steps to pause if they come back with a particular verdict. Critically, this would work without having to modify the released test plan or the code for the steps.

My initial thought is that it’s not possible, as the breakoffered event would need to be raised after running each step, but I thought I’d ask and see if either there’s a way of making this work or if someone could suggest another solution to get the same result.

TIA

Hi @benstreek,

The break offered event is offered after each test step has run.

The Result Listener does not have access to that, but a parent step could attach to the break offered event and then deattach after child steps has run. Then you would get an event raised every time a child step is about to run.
You could attach the break offered event in a parent step and deattach it after wards.

Thanks @rolf_madsen,

I thought the result listener would be a stretch. Shame, because then I could’ve kept this temporary diagnostic behaviour completely decoupled from the released plan. I’ll look into how I can make the parent step as configurable as possible.