Complete the code to import the correct package for the @Execution annotation.
import org.junit.jupiter.api.parallel.[1];
The @Execution annotation is part of the org.junit.jupiter.api.parallel package in JUnit 5.
Complete the code to set the execution mode to concurrent using @Execution.
@Execution(ExecutionMode.[1]) public class MyTests { }
The ExecutionMode.CONCURRENT tells JUnit to run tests in parallel threads.
Fix the error in the annotation usage to correctly specify execution mode.
@Execution(ExecutionMode.[1]) public class MyTests { }
ExecutionMode enum constants must be uppercase and exactly as defined, like CONCURRENT.
Fill both blanks to import the ExecutionMode enum and use it to run tests in the same thread.
import org.junit.jupiter.api.parallel.[1]; @Execution(ExecutionMode.[2]) public class SampleTest { }
You must import ExecutionMode enum and use SAME_THREAD to run tests sequentially.
Fill all three blanks to create a test class that runs tests concurrently and imports both required annotations.
import org.junit.jupiter.api.parallel.[1]; import org.junit.jupiter.api.[2]; @Execution(ExecutionMode.[3]) public class ConcurrentTests { }
Import Execution and Test annotations, then set execution mode to CONCURRENT for parallel tests.