Description
Only one error terminates the test plan: OutOfMemoryError
. Sometimes it might be beneficial to have more control over this. In my case, I'm bringing up test containers before the test suite starts. I implemented this using TestExecutionListener
. I start containers in testPlanExecutionStarted
and stop them in testPlanExecutionFinished
. It happens from time to time that a container does not start. In this case, I want to terminate the test plan because it does not make sense to run any tests when some required container is down.
It'd be good to introduce a class or, better, an interface like UnrecoverableThrowable
and check if throwable is an instance of OutOfMemory || UnrecoverableThrowable
. Then users could create custom exceptions that implement said interface and terminate the test plan.
If this idea sounds, I can create a PR.