A method on the runner itself would be ideal, but the runner doesn't know anything about condition evaluation. We may be able to do something similar to the approach taken with AutoConfigurations.of.
The goal is to provide a more succinct and discoverable equivalent of the following code:
ConditionEvaluationReport report = ConditionEvaluationReport
.get((ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory());
ConditionEvaluationReportMessage message = new ConditionEvaluationReportMessage(report);
System.out.println(message);
This should be low-risk and would also be useful when writing and diagnosing tests. I'm tempted to include it in 2.0.x.
This would be a nice addition. We already have something similar when using the full Spring Test runner.
Is a method really necessary though? I'd expect to see the report when the context has failed and I didn't expect it to fail. So any check on this.startupFailure != null could invoke a listener. Same thing for hasNotFailed if it actually has failed.
We could lookup for a "something" in spring.factories and then let it apply its logic on the error. Looks a bit convoluted just to print the report though.
I deliberately tried not to prescribe that the solution be a method, but I would like something that makes it easy to see the report irrespective of whether or not there was a startup failure.
Most helpful comment
This should be low-risk and would also be useful when writing and diagnosing tests. I'm tempted to include it in 2.0.x.