Skip to content

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

@bvkatwijk

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.

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