Recall & Review
beginner
What is parallel test configuration in JUnit?
It is a setup that allows multiple tests to run at the same time to save time and improve efficiency.
Click to reveal answer
beginner
How do you enable parallel test execution in JUnit 5?
By configuring the
junit-platform.properties file with junit.jupiter.execution.parallel.enabled = true.Click to reveal answer
intermediate
What is the purpose of
ExecutionMode.CONCURRENT in JUnit?It tells JUnit to run tests or test classes at the same time instead of one after another.
Click to reveal answer
intermediate
Name one risk of running tests in parallel.
Tests might interfere with each other if they share data or resources, causing false failures.
Click to reveal answer
advanced
How can you control the number of threads used in JUnit parallel tests?
By setting
junit.jupiter.execution.parallel.config.fixed.parallelism in the junit-platform.properties file.Click to reveal answer
Which file is used to configure parallel execution in JUnit 5?
✗ Incorrect
JUnit 5 uses the junit-platform.properties file to set parallel execution options.
What does setting
junit.jupiter.execution.parallel.enabled = true do?✗ Incorrect
This property enables running tests in parallel in JUnit 5.
Which JUnit annotation or setting controls if tests run concurrently?
✗ Incorrect
ExecutionMode.CONCURRENT tells JUnit to run tests concurrently.
What is a common problem when running tests in parallel?
✗ Incorrect
Shared state or resources can cause tests to interfere and fail when run in parallel.
How do you limit the number of threads used in parallel tests in JUnit?
✗ Incorrect
This property controls the fixed number of threads for parallel test execution.
Explain how to enable and configure parallel test execution in JUnit 5.
Think about the properties file and execution modes.
You got /4 concepts.
What are the benefits and risks of running tests in parallel?
Consider speed vs test reliability.
You got /4 concepts.