Gradle scala tests silently ignored due to NoClassDefFoundError

Hi , We have a strange issue in our gradle scala tests , some of the tests were quietly ignored on TeamCity due to some incorrect library dependency setup in build.gradle.kts.

We could reproduce this in local IDE but we see these tests fail when run using “Intellij” throwing “java.lang.NoClassDefFoundError” but not with Gradle.

Also - when we explicitly put the complete test in a try-catch and we could see it fails in with gradle too.

Is there a way to specify in gradle scala runner to fail instead of Ignoring tests when there is a FATAL error?

Please let me know if you need more details .

Appreciate any advise

Can you show some MCVE?