Need to return value from Test Test Listener to the Test Case

How to return value to the Test Case from Listener.
I Need value from @beforeTestSuite @beforeTestCase

1 Like


By default, we do not support returning value from a Listener. I think you could get the value via Global variable: set the value from Listener and then reuse it where you want.

I would be very interested if we could have support for that.

Listeners are “hooks” into the startup code of a Test Case. IOW, they are not methods and since you don’t “call” them, there is no way to collect a return value.

This is one of the many uses GlobalVariables are designed for.

1 Like