Tag: testing

Questions Related to testing

  1. a.) Test a single unit of code

  2. b.)Test a one module of the application

  3. c.)Test a whole application

  4. d.)Test the data, stored in database.


Correct Option: A
  1. a.) Name of the Class must end with “Test”

  2. b.) Name of the method must start with “test”

  3. c.) Return type of the test method must be “void”

  4. d.) Test method must not have any parameter.

  5. e.) All of the above


Correct Option: E
  1. a.) Using the Mock class, related to corresponding Test class

  2. b.) Using the reflection if using Jdk 1.3 or higher version

  3. c.) Both a.) & b.)

  4. d.) No way to test it


Correct Option: C
  1. a.) There is no option to test it in Junit

  2. b.) Modifying the testcase to run with SecurityManager that prevents calling System.exit, then catch the SecurityException.

  3. c.) Remove the System.Exit() line then continue the testing with that methods.

  4. d.) Test it everything as-is.


Correct Option: B
  1. a.) Reflection provides the option to do this.

  2. b.) Copy the method content into the testcase methods.

  3. c.) Place your tests in the same package as the classes under test.

  4. d.) Can't do the testing for protected methods.


Correct Option: C
  1. The JUnit JAR file.

  2. b.) Location of your JUnit test classes.

  3. c.) Location of classes to be tested.

  4. d.) JAR files of class libraries that are required by classes to be tested

  5. e.) All of the above


Correct Option: E

JUnit TestSuite is a

  1. a.) Container class, which used to group multiple test cases into a collection and run them together.

  2. b.) defines test fixture, which contains all the test methods.

  3. c.) interface, which contains the declaration of all the methods, needs to be implemented by Testcases.

  4. d.) None of the above


Correct Option: A
  1. CR_ACC_ADC

  2. CR_ADC_ACC

  3. ILM_CREATEACCOUNT

  4. ILM_ADC_CREATEACCOUNT


Correct Option: B