Skip to content

Use @Nested classes instead of comments for grouping tests #2951

Description

@bvkatwijk

JUnit Jupiter, tests can be grouped using Nested classes

@nested tests give the test writer more capabilities to express the relationship among several groups of tests. Such nested tests make use of Java’s nested classes and facilitate hierarchical thinking about the test structure

This seems to fit the exact purpose of the -- comment divisors in test., and enables a number of useful features like being able to run the set of nested tests individually.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions