JUnit Flashcards
@Test
Denotes that a method is a test method. Unlike JUnit 4’s @Test annotation, this annotation does not declare any attributes, since test extensions in JUnit Jupiter operate based on their own dedicated annotations. Such methods are inherited unless they are overridden.
Denotes that a method is a test method. Unlike JUnit 4’s @Test annotation, this annotation does not declare any attributes, since test extensions in JUnit Jupiter operate based on their own dedicated annotations. Such methods are inherited unless they are overridden.
@Test
@ParameterizedTest
Denotes that a method is a parameterized test. Such methods are inherited unless they are overridden.
Denotes that a method is a parameterized test. Such methods are inherited unless they are overridden.
@ParameterizedTest
@RepeatedTest
Denotes that a method is a test template for a repeated test. Such methods are inherited unless they are overridden.
Denotes that a method is a test template for a repeated test. Such methods are inherited unless they are overridden.
@RepeatedTest
@TestFactory
Denotes that a method is a test factory for dynamic tests. Such methods are inherited unless they are overridden.
Denotes that a method is a test factory for dynamic tests. Such methods are inherited unless they are overridden.
@TestFactory
@TestTemplate
Denotes that a method is a template for test cases designed to be invoked multiple times depending on the number of invocation contexts returned by the registered providers. Such methods are inherited unless they are overridden.
Denotes that a method is a template for test cases designed to be invoked multiple times depending on the number of invocation contexts returned by the registered providers. Such methods are inherited unless they are overridden.
@TestTemplate
@TestClassOrder
Used to configure the test class execution order for @Nested test classes in the annotated test class. Such annotations are inherited.
Used to configure the test class execution order for @Nested test classes in the annotated test class. Such annotations are inherited.
@TestClassOrder
@TestMethodOrder
Used to configure the test method execution order for the annotated test class; similar to JUnit 4’s @FixMethodOrder. Such annotations are inherited.
Used to configure the test method execution order for the annotated test class; similar to JUnit 4’s @FixMethodOrder. Such annotations are inherited.
@TestMethodOrder
@TestInstance
Used to configure the test instance lifecycle for the annotated test class. Such annotations are inherited.
Used to configure the test instance lifecycle for the annotated test class. Such annotations are inherited.
@TestInstance
@DisplayName
Declares a custom display name for the test class or test method. Such annotations are not inherited.