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

What annotation replaces JUnit 4's @RunWith in JUnit Jupiter?

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

More quizzes

.NETAccessibilityAgile MethodologyAirflowAlertmanagerAlgorithms