You are on page 1of 5

NPTEL Online Certification Courses

Indian Institute of Technology Kharagpur

Software Engineering
Assignment-10
TYPE OF QUESTION: MCQ/MSQ
Number of questions: 10 Total mark: 10 X 1 = 10

For each of the following questions one or more of the given options are correct. Choose the
correct options.

QUESTION 1:
Which of the following are not a black box testing techniques?

a. Boundary value testing


b. MC/DC testing
c. Cause-effect (Decision Table) testing
d. Combinatorial testing
e. Basic Condition testing

Correct Answer: b. MC/DC testing


e. Basic Condition testing
Detailed Solution:

Basic condition testing and MC/DC is a white-box testing as it requires the knowledge
internal structure of the program. It evaluates each condition True at least once and False at least
once.

QUESTION 2:
Which one of the following is an implicit assumption made in equivalence class testing?

a. A program behaves in similar ways to every input value belonging to an equivalence class.
b. Different equivalence classes of a program contain similar bugs
c. Different equivalence classes of a program contain dissimilar bugs
d. Equivalence classes define the behaviorally similar components of a program
e. Equivalence classes define the behaviorally similar code segments of a program

Correct Answer: a. A program behaves is similar ways to every input value belonging to an
equivalence class.
Detailed Solution:
In equivalence class testing program behaves in similar ways to every input value belonging to an
equivalence class.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 3:
In a certain bank, customers are offered different rates interest on deposits depending on the amount of
deposit and the duration of deposit. The rate of interest for deposits of any amount between Rs. 1000 and
Rs. 1 Lakh is as follows:

 6% for deposit upto 1 year


 7% for deposit over 1 year but less than 3 years
 8% for deposit over 3 years and less than 10 years
The rate of interest for deposits of any amounts between Rs. 1 Lakh to less than 1 crore, is as follows:
 7% for deposit upto 1 year
 8% for deposit over 1 year but less than 3 years
 9% for deposit over 3 years and less than 10 years

A function named compute-interest-rate(amount, months) was developed by the bank to compute


the interest rate applicable for a deposit made by a customer. At least how many test cases are needed for
weak equivalence class testing of the function compute-interest-rate?
a. 2
b. 3
c. 5
d. 6
e. 7
Correct Answer: b. 3
Detailed Solution:
Test cases are needed for weak equivalence testing =Maximum (Total number of
valid equivalence classes for Amount , Total number of valid equivalence classes for
Year) =max(2,3) = 3

QUESTION 4:
For the function compute-interest-rate of Q. 3, at least how many test cases are needed for strong
equivalence testing?
a. 3
b. 6
c. 8
d. 9
e. 12
Correct Answer: b. 6

Detailed Solution:
Test cases are needed for strong equivalence testing = Total number of valid equivalence
classes for Amount * Total number of valid equivalence classes for Year =(2)*(3) =6
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 5:
For the function compute-interest-rate of Q. 3, at least how many test cases are needed for strong robust
equivalence testing?
a. 6
b. 12
c. 15
d. 16
e. 20
Correct Answer: d. 16
Detailed Solution:
For Amount:
The valid classes are: Class-1: Rs 1000 to less than Rs 1 lakh ,Class-2: Rs 1 lakh to less than Rs
1 crore
The invalid classes are:
Class-1: less than Rs 1000, Class-2: more than or equal to Rs 1 crore
For Year:
The valid classes are: Class-1: upto 1 year, Class-2: over 1 year but less than 3 years, Class-3:
over 3 years and less than 10 years
The invalid classes are:
Class-1: over 10 years
Test cases are needed for strong robust equivalence testing = Total number of equivalence
classes for Amount * Total number of equivalence classes for Year =(2+2)*(3+1)
=16

QUESTION 6:
Consider the function find-intersection(m1,c1,m2,c2) that computes the point of intersection of two
straight lines of the form y=mx+c. For equivalence class testing, at the first level of the equivalent class
hierarchy the valid and invalid equivalence classes can be formed. The valid set of input values can be
further divided into how many equivalence classes?

a. 1
b. 2
c. 3
d. 4
e. 5

Correct Answer: c. 3
Detailed Solution:
The valid input divided in equivalence classes are the following:
• Parallel lines (m1=m2, c1≠c2)
• Intersecting lines (m1≠m2)
• Coincident lines (m1=m2, c1=c2)
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 7:
In a certain software development organization it was found based on an analysis of collected data over
several completed projects that black box unit tests detect 24% of the total defects detected, White box
tests detect 30% of the defects, Integration tests detect 16%, and system tests detect 10% of the defects,
and 20% defects were reported by the customers after the release of the software. What proportion of
the total test effort should be allocated to integration testing?

a. 10%
b. 12%
c. 15%
d. 20%
e. 25%

Correct Answer: d. 20%


Detailed Solution:
Total test effort for integration testing = (16/80)*100 = 20%

QUESTION 8:
During unit testing , why is it important to test the boundary values?
a. It reduces test costs as boundary values are easily computed by hand.
b. Debugging is easier when testing boundary values.
c. The correct execution of a function on all boundary values proves that the function is
correct.
d. Programming the boundary conditions is usually error-prone in practice
e. Each boundary value test case checks working of two equivalence classes
Correct Answer: d. Programming the boundary conditions is usually error-prone in practice
Detailed Solution:
The boundary conditions is usually error-prone. That’s why it is important to test the boundary
values.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 9:
To test a unit, the programmer has to write a piece of code which would call the function and passes it
test data. What would this piece of code called?
a. Stub
b. Driver
c. Proxy
d. Glue
e. Library routine
f. System call
Correct Answer: b. Driver
Detailed Solution:

Driver Simulates the behaviour of a function that calls and supplies necessary data to the function being
tested.

QUESTION 10:
If a user interface has two check boxes, at least how many test cases are required to achieve pair-wise
coverage?

a. 3
b. 4
c. 5
d. 6

Correct Answer: b. 4
Detailed Solution:

If we use the following test cases: (00), (01), (10), (11), all pairs of check boxes can be covered.

You might also like