We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Unit Testing with JUnit Jupiter - How to Use the new JUnit Jupiter Platform
"Discover the transformative power of JUnit Jupiter, with features like display names, categorization, and parameterized tests, plus tips on structuring and naming your tests for ultimate organization and readability."
- JUnit Jupiter has a new way of naming tests, with display names and categorization using nested classes
-
Use the
@DisplayNameannotation to rename tests - Separate test code into its own class or folder
-
Use
@ExtendWithto create reusable extensions -
Implement parameterized tests using
@ParameterizedTestandparameters -
Create custom test suites using
@SelectiveGroupsand@IncludeTags - Write descriptive names for test methods using lambda expressions
-
Use
@Nestedto create nested tests - Renote methods based on intention and categorization
-
Combine
@DisplayNameand@Nestedto create a hierarchical naming structure