api / org.gradle.api.tasks.testing / TestResult / getExceptions

getExceptions

abstract fun getExceptions(): MutableList<Throwable>

If the test failed with any exceptions, this will contain the exceptions. Some test frameworks do not fail without an exception (JUnit), so in those cases this method will never return an empty list.

Return
The exceptions, if any, logged for this test. If none, an empty list is returned.