Groovy script to run a Teststep doesn't fail when the test Step fails
Instead of copying and pasting test steps that I am using over and over in other test cases i decided to use a grovvy step to call the test step. When one of the assertions fail on the step the grovvy step is not failed but instead the test continues onto the next step. I am at a loss for how to get the step to fail when the test step called has a failure in one or more of the assertions. Any help would be appreciated.
Here is the groovy step I am using:
//Generate Authentication Token
// Run the test step
def auth = testRunner.testCase.testSuite.getTestCaseByName("followup_email - Valid English First").getTestStepByName("Generate Auth Token")
//Execute Test Step
auth.run(testRunner, context)
//CHECK FAILED COMMUNICATIONS
// Run the test step
def tStep = testRunner.testCase.testSuite.getTestCaseByName("followup_email - to: Field is Missing").getTestStepByName("Check for Failed Communications")
//Execute Test Step
tStep.run(testRunner, context)
//Results
log.info(tStep.getAssertionStatus())
log.info(tStep.getAssertableContentAsXml())
When log.info(tStep.getAssertionStatus()) comes back FAIL the groovy step is not failed