National Institute of Technology Rourkela-769008 Mid-Semester Examination, 2020
National Institute of Technology Rourkela-769008 Mid-Semester Examination, 2020
National Institute of Technology Rourkela-769008 Mid-Semester Examination, 2020
Design test cases for this FSM using state table based testing.
P.T.O.
1
(c) Consider a scenario in which you need to derive the test cases for a web page of a 7
research paper, that has four different sections as follows: (i) Introduction, (ii) Basic
Concepts (iii) Methodology (iv) Summary. These four sections can individually be
shown or hidden to the user or show error message. Design the test conditions using
orthogonal array to test the interaction between the different sections.
3.
(a) Write a function for finding the prime numbers in between 1-100. . 10
i. Construct the CFG of the above function.
ii. Determine its cyclometic complexity.
iii. Identify the linearly independent paths in the CFG.
iv. Design a test suite for the above function that satisfies path coverage.
(b) Consider the following program to find the greatest number among three
numbers: 10
#include <stdio.h>
main()
{
float x,y,z;
clrscr();
printf(“enter the three variables x,y,z”);
scanf(“%f %f %f”,&x,&y,&z);
if(x > y)
{
if(x > z)
printf(“greatest number =%f”, x);
else
printf(“(“greatest number =%f”, z”);
}
else
{
if(y > z)
printf(“(“greatest number =%f”, y”);
else
printf(“(“greatest number =%f”, z”);
}
getch();
}
Find out five possible mutants in the above program and check how many of them are
killed by a set of test data. Add new test data if required. Show the mutation score achieved.