private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { LOGGER.info("STARTING STEP: {}", method.getName()); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.info("STEP DONE: {}", method.getName()); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(method, args, failedAssertion); return appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { return appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = testErrorException; logStepFailure(method, args, forError(error).convertToAssertion()); return appropriateReturnObject(obj, method); } return result; }
private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { String callingClass = testContext(); LOGGER.debug("STARTING STEP: {} - {}", callingClass, StepName.fromStepAnnotationIn(method).orElse(method.getName())); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.debug("STEP DONE: {}", StepName.fromStepAnnotationIn(method).orElse(method.getName())); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(obj, method, args, failedAssertion); result = appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { result = appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = SerenityManagedException.detachedCopyOf(testErrorException); logStepFailure(obj, method, args, forError(error).convertToAssertion()); result = appropriateReturnObject(obj, method); } return result; }
private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { String callingClass = testContext(); LOGGER.info("STARTING STEP: {} - {}", callingClass, method.getName()); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.info("STEP DONE: {}", method.getName()); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(method, args, failedAssertion); result = appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { result = appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = SerenityWebDriverException.detachedCopyOf(testErrorException); logStepFailure(method, args, forError(error).convertToAssertion()); result = appropriateReturnObject(obj, method); } return result; }