Spring and JUnit5 - if test failed to start, just ignore it

Viewed 84

today I noticed something really strange.

When I have some implementation of interface org.springframework.test.context.TestExecutionListener and it fails in beforeTestClass method, the whole test gets skipped.

I understand, it's just a listener and it should not be required to run a test, but test would fail too, if it gets a chance to run.

So my CI build went green even without potentialy failing test.

Shouldn't TestContextManager log errors instead of warn in these cases? Or should I rework my test architecture anyhow? This is kinda scary for me.

Thanks in advance.

0 Answers
Related