Test Results as a built-in variable

I would like to refer easily to a test step result within a test case, instead of creating a variable then storing a test step result and later using this variable to trigger something (like a conditional step).
This would be very intuitive and useful to refer to a test step within the test case, to trigger some action.

Boris Faitout said:

I would like to refer easily to a test step result within a test case, instead of creating a variable then storing a test step result and later using this variable to trigger something (like a conditional step).
This would be very intuitive and useful to refer to a test step within the test case, to trigger some action.

Actually you can ulitlize ‘Test Listeners’ feature, it does provide you a way to grab test results from your execution:

	/**
	 * Executes after every test case ends.
	 * @param testCaseContext related information of the executed test case.
	 */
	@AfterTestCase
def sampleAfterTestCase(TestCaseContext testCaseContext) {
		println testCaseContext.getTestCaseStatus()
	}

Vinh,

It works well at the test case scale. But considering test steps, it does not work…