Home / Interview / Junit :: General Questions

Interview :: Junit

11) Is the use of 'main' method possible for unit testing?

Yes

12) Is it necessary to write the test class to test every class?

No

13) What does XMLUnit provide?

Junit extension class, XMLTestCase and set of supporting classes is provided by the XMLUnit.

14)

List the core components of Cactus?

  • Cactus Framework
  • Cactus Integration Module
15) What are the methods in fixtures?
  • setup
  • tearDown
16) What is the Unit Test Case?

A Unit Test Case is the combination of input data and expected output result. It is defined to test the functionality of a unit.

17) What is the use of @Test annotation?

The @Test annotation is used to mark the method as the test method.

18) What is the test suit?

The test suit allows us to group multiple test cases so that it can be run together. TestSuit is the container class under junit.framework.TestSuite package.

19) What does test runner?

The test runner is used to execute the test cases.

20) What are the important JUnit annotations?

The test runner is used to execute the test cases.

  • @Test
  • @BeforeClass
  • @Before
  • @After
  • @AfterClass