Show List

Quiz - JUnit - 3

61%

Public Average Score
Select the right answer for below questions:

What is the use of JUnit rules in test cases?
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 apply additional behavior to test cases such as temporary folders, databases, etc.
To apply additional behavior to test cases such as temporary folders, databases, etc.

Can JUnit tests be executed on cloud platforms such as AWS and Azure?
Yes
No
Yes

What is the use of JUnit suite tests?
To run multiple test cases together as a single suite
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 multiple test cases together as a single suite

Can JUnit tests be executed in parallel?
Yes
No
Yes

What is the use of JUnit Assume in test cases?
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To mark a test case as "assumed" and skipped if a certain condition is not met
To compare the expected result with the actual result of a test case
To mark a test case as "assumed" and skipped if a certain condition is not met

What is the use of JUnit @Test annotation?
To mark a method as a test case
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 mark a method as a test case

What is the use of JUnit assertThat method?
To handle exceptions in a test case
To make a flexible and readable assertion 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 make a flexible and readable assertion in a test case

What is the use of JUnit assertArrayEquals method?
To compare two arrays for equality in a test case
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 compare two arrays for equality in a test case

What is the use of JUnit assertEquals method?
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 compare two values for equality in a test case
To compare two values for equality in a test case

What is the use of JUnit assertTrue method?
To assert that a statement is true in a test case
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 assert that a statement is true in a test case

Submit
Retry
{"qz1-426721":"To apply additional behavior to test cases such as temporary folders, databases, etc.","qz1-426722":"Yes","qz1-426723":"To run multiple test cases together as a single suite","qz1-426724":"Yes","qz1-426725":"To mark a test case as \"assumed\" and skipped if a certain condition is not met","qz1-426726":"To mark a method as a test case","qz1-426727":"To make a flexible and readable assertion in a test case","qz1-426728":"To compare two arrays for equality in a test case","qz1-426729":"To compare two values for equality in a test case","qz1-426730":"To assert that a statement is true in a test case"}

    Leave a Comment


  • captcha text