Is there a way to use a Global Variable to get the test case result if passed or failed?

Is there a way to use a Global Variable to get the test case result if it was passed or failed?

Hello, yes, just set it in test case you want to check and read when you need. Be mindful that Global variable is accessible between test cases inside test suite/execution …

please describe case you are trying to solve

2 Likes

yes, is possible, but will be scoped only to a test suite.
use a testlistener to get the context and update the needed global
running a single testcase will not work if you implement it as a testsuite listener.
on the other side i am not sure if you have the context available in a testcase listener… and that will run for each testcase in a suite

1 Like