C. Error, Bug, Fault
C. Error, Bug, Fault
C. Error, Bug, Fault
1. Identify the synonyms among the following terms related to program testing:
error, bug, mistake, failure, and fault:
a. error, bug, mistake, failure, and fault:
b. error, bug, failure:
c. error, bug, fault
d. bug, failure, fault:
2. Verification is __________________ .
a. making sure that it is what the user really wants
b. checking that we are building the right system
c. checking that we are building the system right
d. performed by an independent test team
a. (-15 to -100)
b. (>=-101), (-15 to -100), (<=-15)
Cont...
c. (<=-101), (-15 to -100), (>=-14)
d. None of these
6. If the invoking module for a module which is unit tested is not available, we
should use
a. A stub module
b. A driver module
c. A global module
d. No special module
7. Consider a program that computes largest among three integers A,B,C, where
A lies in between [1,10], B lies in between [1,20 ] and C lies in between [1,30].
How many test cases can be designed, if you are using Robustness Testing
method?
a. 13
b. 15
c. 17
d. 19
8. Consider a function named compute-grade that computes the grade of a
student based on his attendance and the total marks obtained out of 100. If the
attendance is below 80%, the student is assigned an “F” grade irrespective of
the marks scored. If the attendance of a student is 80% or more, the student
with mark M is assigned a grade from EX, A, B, C, D, P, F depending upon
whether M>89%, 90%>M>79%, 80%>M>69%, 70%>M>59%, 60%>M>49%,
50%>M>29%, or M<30%. If the decision making about the grade computation
is represented in the form of a decision table, how many test cases are needed
for decision table testing?
a. 2
b. 7
c. 8
d. 9
9. At least how many test cases are required to achieve multiple condition
coverage of the following code segment:
If((a>5) and (b<100) and (c>50) or (i<45)) x=x+1;
a. 2
b. 14
c. 16
d. 8
10. A changed version that has not passed a regression test is called ………….
a. Baseline version
b. Delta version
c. Delta build
d. Modified version
11. Test log is ……………
a. An evaluation report prepared when the testing over
b. A form of bug report
c. A record of the testing events that takes place during test
d. None of these
12. For a typical software product, testing should account for what percentage of
the total software development costs?
a. 5-10
b. 10-20
c. 40-50
d. 80-90
13. Among the following data-flow anomalies, which one is the most dangerous
one?
a. du
b. ud
c. ku
d. uk
14. Suppose, T contains 100 tests of which 25 are modification-revealing for P and
P’ and a regression test selection technique M selects 5 of these 25 tests, then
what is the inclusiveness of M relative to P, P’ and T?
a. 10
b. 20
c. 30
d. 80
15. If you have 3 variables that have 3 values each, then the possible number of
test cases using orthogonal array testing will be ______.
a. 3
b. 9
c. 27
d. 81
16. A program computes ab where a lies in the range of [1,20] and b lies in the
range of [1, 12]. How many test cases are possible using worst-case testing
method?
a. 31
b. 25
c. 125
d. 625
17. Problem to choose a subset T’ of T with which P’ will be tested is called -----
a. regression test selection problem
b. coverage identification problem
c. test suite execution problem
d. test suite maintenance problem
18. Regression testing is helpful in
a. Detecting bugs
b. Detecting undesirable side effects by changing the operating environment
c. Integration testing
d. All of these
19. The set of statements executed under a test case, having an effect on the
program output under that test case is called
a. Execution slice
b. Dynamic slice
c. Relevant slice
d. Static slice
20. Cluster level testing refers to -----
a. Testing of interactions among the components of an individual class
b. The internal testing of an individual method in a class
c. Testing of interactions among a group of cooperating classes
d. External inputs and outputs visible to the users of a system
21. Inherited methods should be retested in the context of a / an -----
a. Super class
b. Subclass
c. Base class
d. Object
22. System testing can be performed with ---
a. Object diagram
b. Class diagram
c. Use-case diagram
d. Package diagram
30. Which one of the followings categorizes and tests operations based on the
generic function each performs?
a. State-based partitioning
b. Attribute-based partitioning
c. Category-based partitioning
d. Equivalence partitioning
31. Which one of the following testing technique integrates the classes required to
demonstrate one collaboration
a. Thread-based testing technique
b. Use-based testing technique
c. Cluster testing technique
d. Pair-wise integration testing technique
32. Which one of the followings uncovers interaction errors?
a. Fault-based testing
b. Random testing
c. Partition testing
d. Scenario-based testing
40. Which one of the followings techniques is used to determine the adequacy of
the test suite?
a. Boundary value testing
b. MC/DC based testing
c. Equivalence class partitioning
d. Mutation testing
NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA-769008
END-SEMESTER EXAMINATION, 2021
SESSION: 2020 – 2021 (Spring)
B. Tech. 8th Semester
Q.
Particulars Marks
No.
1. 10*2=20
(a) Consider a program for determining the day of the week. Its input is a triplet
<day, month, year> with the values in the range
1≤day≤31,
1≤month≤12,
1900≤year≤2058.
The possible outputs would be the day of the week or invalid date. Design the
test cases using BVC technique.
(b) Consider a system having an FSM for a stack having the following states and
transitions:
States
Initial: Before creation
Empty: Number of elements=0
Holding: Number of elements>0, but less than the maximum capacity
Full: Number of elements=maximum
Final: After destruction
Transitions
Initial to Empty: Create
Empty to Holding, Empty to Full, Holding to Holding, Holding to Full:
Add
Empty to Final, Full to Final, Holding to Final: Destroy
Holding To Empty, Full to Holding, Full to Empty: Delete
Design test cases for this FSM using state table based testing.
Cont.
2. 10*2=20
(a) Write a function in C which takes an integer array as input and stores it in
ascending order.
Draw the CFG for the above function.
Determine the cyclomatic complexity.
List all independent paths.
Design test cases from all independent paths.
(b) Consider the following program. Find out the possible mutants and check how
many of them are killed by taking a set of arbitrary test data. Add new test data
if required.
#include<stdio.h>
main(){
float x,y,z;
printf(“Enter the three variables x,y,z”);
scanf(“%f%f%f”,&x,&y,&z);
if(x>y){
if(x>z)
printf(“x is greatest”);
else
printf(“z is greatest”);
}
else{
if(y>z)
printf(“y is greatest”);
else
printf(“z is greatest”);
}
}
3. 10*2=20
(a) Perform top-down and bottom-up integration procedure from the following
system hierarchy.
(b) Briefly explain about the process of behavioral integration testing. Consider the
class CreditCard in a banking system. Draw the state transition diagram and
generate test cases for the class CreditCard using behavioral integration testing.
You may assume appropriate operations of the class CreditCard.