Sei sulla pagina 1di 5

Knowledge Check Solution

1 ) Which of the following describes the purpose of Unit Testing ? (Select all those apply) To ensure that the code is consistent with the Detailed Design To ensure that a program can execute normally To find bugs early To prepare for future test plans To evaluate a programmers performance

2) Unit Test should cover which of the following? (Select all those apply) Code Branches Paths Cycles All of the above.

3) Which of the following statements hold well with respect to the scope of Unit Testing? All new units require unit testing Only the changed code of the unit needs to be tested. For the changed units, all the units that were impacted by the change should be tested again. Unit testing doesnt have a definite scope.

4. Which of the following are correct statements concerning to the benefits of unit testing? Facilitates Change Simplifies Integration Provides living documentation Serves as a design None of the above.

5) A _____________________ is a statement that defines a constraint that must be satisfied by the program being tested. Test condition Test data Test cycle

6) __________________________________coverage is similar to branch coverage Condition Coverage Branch Coverage Loop Coverage Interface Coverage.

7) Which of the following factors need to be considered while testing the Interface? Quantity, type and dimension for both real and formal parameters Sequence of parameters in modules Changing the value of read only parameters Consistency of Global variable definitions in different modules. Pay special attention to reference parameters All of the above.

8) The____________________ test checks the performance capability of software or a system. Performance Test Regression test Assembly test None of the above 9) Which of the following occur during the detailed design phase? (Select all that apply) Designing unit test conditions Defining test expected results Creating unit test data Reviewing unit test conditions

10) Which of the following conditions can be categorized under branch coverage? IF-ELSE-ENDIF CASE-WHEN-ENDCASE WHILE-ENDWHILE None of the above

11) Which of the following are not the responsibilities of a programmer? Defining the database environment Executing a unit test Reviewing the code Changing the test design

12 ) In the case of Database Operations the three cases should be tested in a unit test are WHERE Clause Data definition and Operation Stored procedure and function None of the above 13 ) ____________________is the smallest testable part of an application. Unit Class Procedure

14 )_________________ validates the source code of a defined functional unit. Unit Testing Procedural testing Functional Testing None of the above

15 ) Which of the following can be considered as unit testing deliverables? Test Conditions and Expected Results Test Cycle Control Sheet, Test Data Test Drivers Test Environment Document None of the above.

16 ) Refer to the image below and identify the type of coverage

Condition Coverage Branch Coverage None of the above

17 ) Which of the following is/are right?i (Select all that apply) Condition simplification can be used to reduce the number of test cases All of the test points in a GUI test can be applied to a report test The long logic path can be divided into several short paths to reduce the number of test conditions.

18 ) Refer to the code and specify the number of test conditions needed for the logic

IF X <=2 PERFORM 1000_LESS ELSE PERFORM 110_MOEW ENDIF

1 2 3 4

19) Unit may be called as a ______________________ Component

Block loop

20 ) Unit Test Script or Unit Test Case (popularly called as UTC) is the first step in _______________d phase where a Developer needs to prepare the cases before coding. Plan Build Test Deploy