fix(test-insights): drop the removed Gradle report properties - #12416
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🟢 All 7 merge protections satisfied — ready to merge. Show 7 satisfied protections🟢 ⛓️ Depends-On RequirementsRequirement based on the presence of
🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
0979d43 to
562fa29
Compare
Revision history
|
There was a problem hiding this comment.
Pull request overview
Updates the Test Insights JUnit and TestNG framework recipes to remove Gradle configuration that relies on report properties removed in Gradle 8+, while still guiding users to the default JUnit XML output location used by Mergify’s upload steps.
Changes:
- Removed deprecated
reports { junitXml.enabled/destination ... }examples from Gradle snippets. - Clarified that Gradle’s
testtask already emits JUnit XML without extra configuration. - Stated the default report output directory (
build/test-results/test/) in both recipes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/content/docs/test-insights/test-frameworks/testng.mdx | Drops removed Gradle report properties; keeps useTestNG() and documents the default XML output path. |
| src/content/docs/test-insights/test-frameworks/junit.mdx | Drops removed Gradle report properties; keeps useJUnitPlatform() guidance and documents the default XML output path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The CI Insights setup pages and the two matrix helpers disagreed with each other about how to override the job name a test report is filed under, and none of them said where the default comes from. The three setup pages now name `MERGIFY_TEST_JOB_NAME` — the variable the CLI reads, and the one every framework plugin (pytest, rspec, vitest) already documents — say where the default comes from on each provider (`GITHUB_JOB` on GitHub Actions, Jenkins' own `JOB_NAME`, the step label on Buildkite), and show where to set it. They also state why it matters: the job name is part of a test's identity, so a scheduled run that reports a different name splits its results off from the pull request ones. The GitHub Actions matrix case is stated the way it actually breaks: every leg of a matrix reports the same job name because they share one `GITHUB_JOB`. The old text left the reader to infer why an override was needed at all. The two matrix helpers keep recommending the native override — the action's `job_name` input and the Buildkite plugin's `job_name` property. Both currently export `MERGIFY_JOB_NAME`, which no uploader reads, so neither takes effect today; that is a bug in the three producers of that variable, not something the docs should route readers around. Fixing them is tracked separately, and the snippets pin moving tags (the action's `v25`, the plugin's `#v1`), so readers pick the fix up when those tags move. The pytest, rspec and vitest pages already agreed with this and are unchanged. Settles Mergifyio/ci-bot#369. Part of MRGFY-8720 Change-Id: I96e06bb4500bf9e7664d36d941ef0d962004e9a9
The JUnit and TestNG recipes told Gradle users to configure their report output
with a `reports { junitXml.enabled = true; junitXml.destination = ... }` block.
Gradle 8.0 removed both of those properties ("The deprecated `destination`, and
`enabled` properties of the `Report` type have been removed", per Gradle's own
upgrade notes), so on any current Gradle that block fails the build. A reader
following either page was stopped at the very first step, before ever reaching
the upload step.
Nothing needs to replace it. Gradle's `test` task already writes JUnit XML to
`build/test-results/test/`, which is the path both pages then tell the reader to
upload, so the block was configuring the default. It goes, the default location
is stated instead, and only the line that does have to be there stays:
`useJUnitPlatform()` for JUnit 5, `useTestNG()` for TestNG.
That also settles the version question the recipe would otherwise have to
answer, since `useJUnitPlatform()` and `useTestNG()` are accepted by every
Gradle version anyone is running.
Settles Mergifyio/ci-bot#370. The same broken block was in the TestNG recipe,
which that issue did not mention.
Part of MRGFY-8720
Change-Id: I24b7f2d8324397dd1371a46550777fc658995b54
562fa29 to
d3835e0
Compare
Merge Queue Status
This pull request spent 2 minutes 57 seconds in the queue, including 2 minutes 23 seconds running CI. Required conditions to merge
|
The JUnit and TestNG recipes told Gradle users to configure their report output
with a
reports { junitXml.enabled = true; junitXml.destination = ... }block.Gradle 8.0 removed both of those properties ("The deprecated
destination, andenabledproperties of theReporttype have been removed", per Gradle's ownupgrade notes), so on any current Gradle that block fails the build. A reader
following either page was stopped at the very first step, before ever reaching
the upload step.
Nothing needs to replace it. Gradle's
testtask already writes JUnit XML tobuild/test-results/test/, which is the path both pages then tell the reader toupload, so the block was configuring the default. It goes, the default location
is stated instead, and only the line that does have to be there stays:
useJUnitPlatform()for JUnit 5,useTestNG()for TestNG.That also settles the version question the recipe would otherwise have to
answer, since
useJUnitPlatform()anduseTestNG()are accepted by everyGradle version anyone is running.
Settles Mergifyio/ci-bot#370. The same broken block was in the TestNG recipe,
which that issue did not mention.
Part of MRGFY-8720
Depends-On: #12415