Skip to content

Remove support for legacy jUnit 4 Spock Groovy tests#611

Merged
sabieber merged 3 commits into
mainfrom
feature/sbi/kill-groovy
May 27, 2026
Merged

Remove support for legacy jUnit 4 Spock Groovy tests#611
sabieber merged 3 commits into
mainfrom
feature/sbi/kill-groovy

Conversation

@sabieber

Copy link
Copy Markdown
Member

BREAKING CHANGE

  • All unit tests written in Groovy with Spock need to be migrated to Kotlin or Java

Details

All tests have been migrated to jUnit 5 Kotlin or Java

Additional Notes

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

sabieber added 2 commits May 26, 2026 21:13
All tests have been migrated to jUnit 5 Kotlin or Java
This utilizes the test view of IntelliJ instead of just giving simple Maven output.
@sabieber
sabieber requested a review from Copilot May 26, 2026 19:22
@sabieber sabieber added 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code 🛠️ Maintenance Translations, Code Cleanup, ... 🖐 Keep open Should not be merged labels May 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes remaining support code for legacy JUnit 4 / Spock (Groovy) tests and aligns the test setup documentation and IDE run configurations with the JUnit 5-based test infrastructure used in this repository.

Changes:

  • Migrates the remaining JUnit 4-style assertThrows usage in Kotlin tests to JUnit 5’s Kotlin-friendly assertThrows.
  • Removes Spock/JUnit 4 scenario-suite infrastructure and Groovy base specification classes from src/test.
  • Updates testing documentation and replaces an IntelliJ Maven test run configuration with a JUnit run configuration excluding nightly tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/kotlin/sirius/kernel/nls/FormatterTest.kt Switches assertThrows to JUnit 5 Kotlin API usage.
src/test/java/sirius/kernel/SiriusExtension.java Cleans up Javadoc to match removed scenario-suite support.
src/test/java/sirius/kernel/ScenarioSuite.java Removes legacy JUnit 4 / Spock-based scenario suite runner.
src/test/java/sirius/kernel/Scenarios.java Removes legacy scenario annotation container.
src/test/java/sirius/kernel/Scenario.java Removes legacy scenario annotation.
src/test/java/sirius/kernel/BaseSpecification.groovy Removes Spock base specification class.
README.md Documents SiriusExtension as the preferred way to run framework-backed tests.
.run/test.run.xml Adds IntelliJ JUnit run configuration excluding nightly tests.
.run/mvn clean test - without nightly.run.xml Removes IntelliJ Maven run configuration previously used to exclude nightly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sabieber sabieber removed the 🖐 Keep open Should not be merged label May 27, 2026
@sabieber
sabieber merged commit 93f85cb into main May 27, 2026
5 checks passed
@sabieber
sabieber deleted the feature/sbi/kill-groovy branch May 27, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code 🛠️ Maintenance Translations, Code Cleanup, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants