Show List
Quiz - JUnit - 2
Select the right answer for below questions:
What is the use of @BeforeClass and @AfterClass annotations in JUnit?
To set up and clean up test data before and after all test cases execution
To set up and clean up test data before and after each test case execution
To handle exceptions in a test case
To compare the expected result with the actual result of a test case
To set up and clean up test data before and after all test cases execution
What is the use of JUnit Parameterized tests?
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To run test cases with different input parameters
To run test cases with different input parameters
Can JUnit tests be integrated with build tools such as Maven and Gradle?
Yes
No
Yes
What is the use of JUnit categories?
To handle exceptions in a test case
To group test cases into different categories for better management
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To group test cases into different categories for better management
What is the use of JUnit Hamcrest Matchers?
To write expressive and readable test assertions
To set up and clean up test data before and after each test case execution
To handle exceptions in a test case
To compare the expected result with the actual result of a test case
To write expressive and readable test assertions
Can JUnit tests be executed on multiple operating systems?
Yes
No
Yes
Can JUnit tests be executed on multiple browsers?
Yes
No
No
Can JUnit tests be executed on multiple devices?
Yes
No
No
What is the use of JUnit Timeout in test cases?
To set a time limit for a test case to complete its execution
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To set a time limit for a test case to complete its execution
What is the use of JUnit ExpectedException in test cases?
To set up and clean up test data before and after each test case execution
To set a time limit for a test case to complete its execution
To handle and verify exceptions in a test case
To compare the expected result with the actual result of a test case
To handle and verify exceptions in a test case
Submit
Retry
{"qz1-463026":"To set up and clean up test data before and after all test cases execution","qz1-463027":"To run test cases with different input parameters","qz1-463028":"Yes","qz1-463029":"To group test cases into different categories for better management","qz1-463030":"To write expressive and readable test assertions","qz1-463031":"Yes","qz1-463032":"No","qz1-463033":"No","qz1-463034":"To set a time limit for a test case to complete its execution","qz1-463035":"To handle and verify exceptions in a test case"}
Leave a Comment