/** * Set up a {@link JobExecution} as a test context attribute. * * @param testContext the current test context * @throws Exception if there is a problem * @see TestExecutionListener#prepareTestInstance(TestContext) */ @Override public void prepareTestInstance(TestContext testContext) throws Exception { JobExecution jobExecution = getJobExecution(testContext); if (jobExecution != null) { testContext.setAttribute(JOB_EXECUTION, jobExecution); } }