Skip to content

build: upgrade TestNG 7.8.0 -> 7.9.0 - #206

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785171871-upgrade-testng-7.9.0
Open

build: upgrade TestNG 7.8.0 -> 7.9.0#206
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785171871-upgrade-testng-7.9.0

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Upgrades the TestNG test dependency, the only coordinate touched:

-    testImplementation 'org.testng:testng:7.8.0'
+    testImplementation 'org.testng:testng:7.9.0'

Why 7.9.0 and not 7.11.0 (the newest stable 7.x): TestNG 7.10.0 added isEnabled() to ITestNGListener. Gradle 7.4's TestNGListenerAdapterFactory proxies its own listeners and cannot answer that call, so seleniumTest dies before running a single test on 7.10.x/7.11.0:

Caused by: org.gradle.internal.reflect.NoSuchMethodException:
    Could not find method isEnabled() on TestNGTestResultProcessorAdapter.
  at org.gradle.api.internal.tasks.testing.testng.TestNGListenerAdapterFactory$AdaptedListener.invoke
  at org.testng.TestNG.addListener(TestNG.java:734)

Verified empirically on this branch: 7.11.0 FAILED, 7.10.2 FAILED, 7.9.0 PASSED. Fixing it would require bumping the Gradle wrapper (out of scope for this PR — only the assigned dependency may move), so 7.9.0 is the highest TestNG 7.x that works on Gradle 7.4 + Java 11 + Boot 2.6.3. 7.9.0 is a stable release published 2023-12-26 (no -M/-RC/-alpha/-beta, far older than 7 days).

BOM / ext overrides

None required. The Spring Boot 2.6.3 BOM does not manage org.testng:testng, so the literal version in build.gradle is what resolves.

dependencyInsight evidence

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 ./gradlew dependencyInsight --configuration testRuntimeClasspath --dependency org.testng:testng

org.testng:testng:7.9.0 (selected by rule)
   variant "runtimeElements" [
      org.gradle.jvm.version         = 11
      org.gradle.status              = release (not requested)
   ]

org.testng:testng:7.9.0
\--- testRuntimeClasspath

org.gradle.jvm.version = 11 confirms the Java 11 baseline of the published variant.

Transitives (no downgrades, no split families, identical to the 7.8.0 baseline):

artifact baseline (7.8.0) after (7.9.0)
jcommander com.beust:jcommander:1.82 com.beust:jcommander:1.82
slf4j-api 1.7.33 (Boot BOM pin) 1.7.33 (Boot BOM pin)

TestNG 7.9.0 requests org.slf4j:slf4j-api:1.7.36, which the Boot 2.6.3 BOM pins to 1.7.33 — the same pre-existing pin that applied to 7.8.0 (webdrivermanager likewise requests 2.0.9 -> 1.7.33 on both sides). No new downgrade is introduced by this change. Note that TestNG 7.10.0+ would also have moved jcommander to the new org.jcommander:jcommander group; staying on 7.9.0 keeps the classpath unchanged.

API migration

No source changes needed. All TestNG API used by the Selenium suite is unchanged between 7.8.0 and 7.9.0:

  • src/test/java/io/spring/selenium/listeners/TestListener.javaITestContext, ITestListener, ITestResult
  • src/test/java/io/spring/selenium/tests/BaseTest.javaITestResult, org.testng.annotations.*
  • src/test/java/io/spring/selenium/tests/SeleniumSetupTest.java — static org.testng.Assert.*, @Test

src/test/resources/selenium/testng-smoke.xml still parses (the suite ran to completion). 7.8.0 appears nowhere else in the tracked tree, so no stale references to update.

Gate output

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 ./gradlew clean test spotlessCheck -x jacocoTestCoverageVerification

> Task :test
> Task :spotlessJavaCheck
> Task :spotlessCheck
BUILD SUCCESSFUL in 16s

Test results parsed from build/test-results/test/*.xml: 68 tests, 0 failures, 0 errors, 0 skipped — exactly the recorded baseline on untouched main (68/0/0/0).

Additional checks:

  • ./gradlew compileTestJavaBUILD SUCCESSFUL
  • ./gradlew seleniumTestBUILD SUCCESSFUL, both SeleniumSetupTest cases PASSED (testBrowserLaunches, testWebDriverManagerSetup)

Pre-existing on base, not addressed here

  • jacocoTestCoverageVerification fails at ~0.33 instruction coverage against the 0.80 rule in build.gradle. This is red on untouched main; CI excludes it (-x jacocoTestCoverageVerification) and so does this PR's gate. Threshold untouched, no coverage tests added.
  • Gradle 7.4 emits spotlessJava implicit-dependency validation warnings and Gradle 8.0 deprecation warnings on both base and this branch. Unrelated to this change.

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/7e5e8d52b22649ef8d58dc065f0c0134
Requested by: @mbatchelor81

Highest TestNG 7.x compatible with the project's Gradle 7.4 TestNG integration; 7.10.0+ adds ITestNGListener.isEnabled(), which Gradle 7.4's listener adapter cannot proxy.
@mbatchelor81 mbatchelor81 self-assigned this Jul 27, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant