All quizzes
Free quiz · 39 questions in the bank

JUnit 5 quiz

Test your JUnit 5 knowledge with a free interactive quiz — 39 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

Which annotation replaces JUnit 4's @Before in JUnit Jupiter?

In this round
  1. Which annotation replaces JUnit 4's @Before in JUnit Jupiter?
  2. What is the purpose of the JUnit Vintage engine?
  3. What is a @TestFactory method used for?
  4. What Maven dependency do you add to get JUnit Jupiter's core API (assuming no legacy JUnit 4 tests need to run)?
  5. What annotation replaces JUnit 4's @RunWith in JUnit Jupiter?
  6. What does @MethodSource point to?
  7. What does @CsvSource let you provide to a parameterized test that @ValueSource cannot?
  8. In Jupiter, how is assertThrows typically written?
  9. What is JUnit Jupiter?
  10. What does @DisplayName do on a Jupiter test method?
  11. Can a single Jupiter test class register more than one extension with @ExtendWith?
  12. What does assertAll(...) do differently from writing several plain assertEquals calls in sequence?
Gaps to close?
Read the curated JUnit 5 notes — core concepts, patterns, interview prep.
JUnit 5 notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web