Skip to content

Add support for JUnit 6 in azure-sdk-archetype - #50444

Open
Alan Zimmer (alzimmermsft) wants to merge 4 commits into
mainfrom
UpdateSdkArchetypeToSupportJunit6
Open

Alan Zimmer (alzimmermsft) wants to merge 4 commits into
mainfrom
UpdateSdkArchetypeToSupportJunit6

Conversation

@alzimmermsft

Copy link
Copy Markdown
Member

Description

Adds support for JUnit 6 as the testing framework in azure-sdk-archetype. Updates dependency version of JUnit 5 to latest release.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added the Azure SDK Tools Label for tracking issues related to Azure SDK Tools label Sep 14, 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.

🟡 Changes recommended

JUnit 6 dependency metadata is unused and conflicts with the template version, requiring correction before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds JUnit 6 support to azure-sdk-archetype while preserving JUnit 4 and JUnit 5 generation.

Changes:

  • Adds JUnit 6 configuration, dependencies, tests, and documentation.
  • Updates JUnit 5 dependency metadata and integration coverage.
  • Improves cross-platform post-generation output and changelog coverage.
File summaries
File Summary
sdk/tools/azure-sdk-archetype/src/test/resources/projects/verify.groovy Verifies generated dependency versions and test reports.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit6/goal.txt Runs the JUnit 6 generated-project tests.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit6/archetype.properties Defines the JUnit 6 test scenario.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit5-default/goal.txt Runs the default JUnit 5 tests.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit5-default/archetype.properties Defines the default JUnit 5 scenario.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit4/goal.txt Runs the JUnit 4 tests.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit4/archetype.properties Defines the JUnit 4 scenario.
sdk/tools/azure-sdk-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml Allows JUnit version 6.
sdk/tools/azure-sdk-archetype/src/main/resources/META-INF/archetype-post-generate.groovy Improves portable status output.
sdk/tools/azure-sdk-archetype/src/main/resources/archetype-resources/src/test/java/AppTest.java Generates Jupiter-compatible tests for JUnit 5 and 6.
sdk/tools/azure-sdk-archetype/src/main/resources/archetype-resources/pom.xml Adds JUnit 6 and Surefire configuration; the JUnit 6 version conflicts with tracked metadata (moderate, 1 vote).
sdk/tools/azure-sdk-archetype/README.md Documents JUnit 6 usage and testing.
sdk/tools/azure-sdk-archetype/pom.xml Configures archetype integration tests.
sdk/tools/azure-sdk-archetype/CHANGELOG.md Records the new support and fixes.
eng/versioning/external_dependencies.txt Registers JUnit 6 metadata, but the alias is unused and its version conflicts with the template (critical, 2 votes).
Review details

Suppressed comments (1)

sdk/tools/azure-sdk-archetype/src/main/resources/archetype-resources/pom.xml:25

  • The JUnit 6 version is inconsistent with the dependency registered for this archetype: eng/versioning/external_dependencies.txt adds archetype_org.junit.jupiter:junit-jupiter;6.0.3, but this template resolves 6.1.3. Generated projects therefore use an untracked/different version, and the repository versioning checks cannot update it. Use the tracked version and attach the matching external-dependency marker to this property.
        <junit6.version>6.1.3</junit6.version>
  • Files reviewed: 15/15 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/versioning/external_dependencies.txt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure SDK Tools Label for tracking issues related to Azure SDK Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants