{"record":{"id":"eca8e392e41e43a9","repo":"gradle/gradle","slug":"there-were-failing-tests-see-the-report-at","errorCode":null,"errorMessage":"There were failing tests. See the report at: {}","messagePattern":"There were failing tests\\. See the report at: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"platforms/software/testing-base/src/main/java/org/gradle/api/tasks/testing/AbstractTestTask.java","lineNumber":837,"sourceCode":"    /**\n     * Whether the task should fail if test sources are present, but no tests are discovered during test execution.  Defaults to true.\n     *\n     * @since 9.0.0\n     */\n    @Input\n    abstract public Property<Boolean> getFailOnNoDiscoveredTests();\n\n    /**\n     * Handles test failures based on the {@link #getIgnoreFailures()} property.\n     *\n     * @return the error message to throw, or {@code null} if failures are ignored\n     */\n    @Nullable\n    private String handleTestFailures() {\n        String message = buildFailureResultsMessage(\"There were failing tests.\");\n\n        if (getIgnoreFailures()) {\n            getLogger().warn(message);\n            return null;\n        } else {\n            return message;\n        }\n    }\n\n    private String buildFailureResultsMessage(String message) {\n        DirectoryReport htmlReport = getReports().getHtml();\n        if (htmlReport.getRequired().get()) {\n            String reportUrl = new ConsoleRenderer().asClickableFileUrl(htmlReport.getEntryPoint());\n            message = message.concat(\" See the report at: \" + reportUrl);\n        } else {\n            DirectoryReport junitXmlReport = getReports().getJunitXml();\n            if (junitXmlReport.getRequired().get()) {\n                String resultsUrl = new ConsoleRenderer().asClickableFileUrl(junitXmlReport.getEntryPoint());\n                message = message.concat(\" See the results at: \" + resultsUrl);\n            }\n        }","sourceCodeStart":819,"sourceCodeEnd":855,"githubUrl":"https://github.com/gradle/gradle/blob/534f27719b66953f95cc907aae7f2c1b12f5482d/platforms/software/testing-base/src/main/java/org/gradle/api/tasks/testing/AbstractTestTask.java#L819-L855","documentation":"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.","triggerScenarios":"build.gradle with test { ignoreFailures = true } plus one or more failing tests; CI setups that collect the full report before gating the pipeline later.","commonSituations":"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.","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"],"exampleFix":"// before\ntasks.test { ignoreFailures = true } // red builds look green\n\n// after\ntasks.test { ignoreFailures = false } // fail fast; CI collects the report separately","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// collect everything, then gate explicitly on the results\ntasks.test { ignoreFailures = true } // collect the full report\ntasks.register(\"gateOnTests\") {\n    doLast {\n        var failures = 0\n        file(\"build/test-results/test\").walkTopDown().filter { it.name.endsWith(\".xml\") }.forEach {\n            failures += Regex(\"<failure|<error\").findAll(it.readText()).count()\n        }\n        require(failures == 0) { \"$failures failing tests — see build/reports/tests/test\" }\n    }\n}","preventionTips":["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"],"tags":["gradle","testing","test-failures","ignore-failures","ci"],"backgroundTag":"failing-tests-ignored","analyzedSha":"534f27719b66953f95cc907aae7f2c1b12f5482d","analyzedAt":"2026-08-22T08:09:12.375Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}