How can I ignore testing errors with the gradle robolectric plugin?

I am using robolectric-gradle-plugin for robolectric tests. I do not want to refuse to build failed tests. Is there a way in DSL or a property to not skip the build test similar -DtestFailureIgnore=trueto the Surefire Maven plugin?

I tried:

robolectric {
    ignoreFailures = true
}

and

robolectric {
    ignoreFailure = true
}

and -DignoreFailure=trueon the command line.

I can not find documentation on how to do this, or any link to ignore tests in the source code.

+4
source share
3 answers

answering a very old question so that he would help others who got here

testOptions {
    unitTests.all {
        setIgnoreFailures(true)
    }
}
+7
source

try without '='

robolectric {
    ignoreFailures true
}
0
source

Source: https://habr.com/ru/post/1547450/


All Articles