You are on page 1of 2

NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA-769008

MID-SEMESTER EXAMINATION, 2018


SESSION: 2017 – 2018 (Spring)
M.Tech.2ndSemester

Subject code: CS620 Subject Name: Software Testing Dept. Code: CS


No. of pages: 2 Full Marks: 60 Duration: 2hrs

Figures at the right hand margin indicate marks.


All parts of a question should be answered at one place.
Answer all questions.

Q. No. Particulars Marks


1. 2x10=20
(a) Give an example of a bug that is detected by the black-box test suite, but is not detected
by the white-box test suite. Justify your answer.
(b) Suppose a program contains N decision points. If there are M choices at each decision
point, how many test cases are needed for branch testing?
(c) Suppose two programmers are assigned the same programming problem and they
develop this independently. Explain how you can compare their programs with respect
to Understanding difficulty.
(d) Suppose in order to estimate the number of latent errors in a program, you seed it with
hundred errors of different kinds. After testing the software using its full test set, you
discover only eighty of the introduced errors. You discover fifteen other errors also.
Estimate the number of latent errors in the software.
(e) What do you understand by concolic testing?
(f) In dataflow anomalies, du is a ________ .
(i) Serious bug
(ii) Normal case
(iii) Harmless bug
(iv) None of the above
(g) How do you calculate the cyclomatic complexity of the program having many
connected components?
(h) What do you mean by mutation score? Why is it used?
(i) T contains 90 tests of which 20 are modification-revealing for P and P’ and M selects
12 of these 20 tests, then calculate the inclusiveness of M relative to P, P’, and T.
(j) What do you understand by positive and negative test cases? Give one example of each.

P.T.O
1
2. 5 *4 = 20
(a) Passengers who travel more than 50,000km. per calendar year and in addition, pay cash
for tickets or have been travelling regularly for more than eight years are to receive a
free round trip ticket around India. Passengers who travel less than 50,000km. per
calendar year and have been availing railway services regularly for more than eight
years also get a free ticket around India. Design test cases for this system using decision
table testing.
(b) What do you mean by regression testing? When is regression testing carried out? Why
is regression testing necessary?
(c) Designed an optimal test suit using MC/DC testing for the following expression:
a && (b || c)
(d) Consider the following program:
#include<stdio.h>
main()
{
int a, b, c, d;
clrscr;
printf(“Enter the two variables a,b”);
scanf(“%d %d”, &a, &b);
printf (“Enter the options 1:Addition, 2:substraction, 3:multiplication,
4:division”);
scanf(“%d”, &c);
switch(c)
{
case 1:d = a+b;
printf(“Addition of two numbers = %d”, d);
break;
case 2:d = a-b;
printf(“Subtraction of two numbers = %d”, d);
break;
case 3:d = a*b;
printf(“Multiplication of two numbers = %d”, d);
break;
case 4:d = a/b;
printf(“Division of two numbers = %d”, d);
break;
}
}
Perform static data flow analysis for the above program by finding out the define-use-
kill patterns for the variable d in the source code.

3. 10*2= 20
(a) Design black-box test suite for the following program. The program accepts two pairs
of co-ordinates (x1,y1), (x2,y2), (x3,y3), (x4,y4). The first two points (x1,y1) and
(x2,y2) represent the lower left and the upper right points of the first rectangle. The
second two points (x3,y3) and (x4,y4) represent the lower left and the upper right
points of the second rectangle. It is assumed that the length and width of the rectangle
are parallel to either the x-axis or y-axis. The program computes the points of
intersection of the two rectangles and prints their points of intersection.

(b) Consider the program given in Question 2(d)


a) Draw the CFG for the above program.
b) Calculate the cyclomatic complexity of the above program.
c) List all the independent paths.
d) Design test cases from independent paths.

You might also like