We have a Azure Pipeline with Gradle Task which runs almost 1700 unit tests. There are some flaky tests (2-3)which is causing the build to fail or partially succeed. Is there a way that I can bypass these flaky tests and have the build run successfully? Thanks in Advance.
Asked
Active
Viewed 928 times
1 Answers
1
In build.gradle
, add this:
test {
ignoreFailures = true
}
You can find the documentation here.
Better still, if you know exactly what are the flaky tests, you can exclude them as follows:
test {
// explicitly exclude tests
exclude 'org/boo/**'
}
And if there is no choice, or you are in a rush, you can skip all the tests:
gradlew build -x test

jumping_monkey
- 5,941
- 2
- 43
- 58