Spring dependency injection into Spring TestExecutionListeners not working
Just add autowiring for the whole TestExecutionListener.
@Override
public void beforeTestClass(TestContext testContext) throws Exception {
testContext.getApplicationContext()
.getAutowireCapableBeanFactory()
.autowireBean(this);
// your code that uses autowired fields
}
Check sample project in github.