1.

What happens if the tester does not define a Suite?(a) The test runner automatically creates a Suite(b) Compilation Error(c) Every test fails(d) Every test passesThis question was addressed to me in an online quiz.Question is taken from Composing Tests with a Suite in portion Exploring Core JUnit of JUnit

Answer»

Correct choice is (a) The TEST runner automatically creates a Suite

Easiest explanation: The default Suite scans the test CLASS for any methods annotated with @Test. Internally, the default Suite creates an instance of the test class for each @Test method. JUNIT then EXECUTES every @Test method independently from the OTHERS to avoid potential side effects.



Discussion

No Comment Found

Related InterviewSolutions