gradle/gradle · warning
There were failing tests. See the report at: {}
Error message
There were failing tests. See the report at: {} What it means
After a Test-type task runs, Gradle builds a failure summary (with a clickable link to the HTML report when that report is enabled). With test.ignoreFailures = true, handleTestFailures() logs this message as a warning and the task is treated as passed; with ignoreFailures = false the same message is thrown and fails the build. This entry is the ignored-failures warning branch.
Source
Thrown at platforms/software/testing-base/src/main/java/org/gradle/api/tasks/testing/AbstractTestTask.java:837
/**
* Whether the task should fail if test sources are present, but no tests are discovered during test execution. Defaults to true.
*
* @since 9.0.0
*/
@Input
abstract public Property<Boolean> getFailOnNoDiscoveredTests();
/**
* Handles test failures based on the {@link #getIgnoreFailures()} property.
*
* @return the error message to throw, or {@code null} if failures are ignored
*/
@Nullable
private String handleTestFailures() {
String message = buildFailureResultsMessage("There were failing tests.");
if (getIgnoreFailures()) {
getLogger().warn(message);
return null;
} else {
return message;
}
}
private String buildFailureResultsMessage(String message) {
DirectoryReport htmlReport = getReports().getHtml();
if (htmlReport.getRequired().get()) {
String reportUrl = new ConsoleRenderer().asClickableFileUrl(htmlReport.getEntryPoint());
message = message.concat(" See the report at: " + reportUrl);
} else {
DirectoryReport junitXmlReport = getReports().getJunitXml();
if (junitXmlReport.getRequired().get()) {
String resultsUrl = new ConsoleRenderer().asClickableFileUrl(junitXmlReport.getEntryPoint());
message = message.concat(" See the results at: " + resultsUrl);
}
}View on GitHub (pinned to 534f27719b)
Solutions
- Open the linked HTML report (or build/reports/tests/test/index.html) and fix the failing tests
- If failures are expected for this run, keep ignoreFailures = true but gate the pipeline afterwards on the JUnit XML results
- Remove ignoreFailures = true so the build fails fast on red tests
- For known flaky tests, use targeted filtering or retry mechanisms instead of a global ignoreFailures
Example fix
// before
tasks.test { ignoreFailures = true } // red builds look green
// after
tasks.test { ignoreFailures = false } // fail fast; CI collects the report separately Defensive patterns
Strategy: try-catch
Try / catch
// collect everything, then gate explicitly on the results
tasks.test { ignoreFailures = true } // collect the full report
tasks.register("gateOnTests") {
doLast {
var failures = 0
file("build/test-results/test").walkTopDown().filter { it.name.endsWith(".xml") }.forEach {
failures += Regex("<failure|<error").findAll(it.readText()).count()
}
require(failures == 0) { "$failures failing tests — see build/reports/tests/test" }
}
} Prevention
- Treat ignoreFailures as a CI collection mechanism, never a permanent setting
- Parse JUnit XML in CI and fail the pipeline when failures > 0
- Quarantine flaky tests explicitly instead of ignoring all failures
When it happens
Trigger: build.gradle with test { ignoreFailures = true } plus one or more failing tests; CI setups that collect the full report before gating the pipeline later.
Common situations: Teams wanting complete test reports before failing; flaky-test quarantines implemented as a global ignoreFailures; legacy builds where ignoreFailures was left on and red tests go unnoticed.
Related errors
- Failed to store javadoc options.
- Preserving the order of tests is not supported by this versi
- Grouping tests by instances is not supported by this version
- Could not read PGP secret key
- property '{}' could not be found on project and is needed fo
AI-assisted analysis of gradle/gradle@534f27719b (2026-08-22).
Data as JSON: /api/errors/eca8e392e41e43a9.
Report an issue: GitHub.