Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

» Software testing

Unit 2 - Week 1

Assignment 1

1) If the actual output produced after test case execution differs from the
expected output given as a part of the test case, the test case is said
to have

Passed
Failed

Accepted Answers:
Failed

2) Suppose a procedure P 1 calls a procedure P 2 , which in turn, calls an-


other procedure P 3 . The level of testing that tests for the interface of
calls from P 1 to P 2 and then to P 3 is called

Unit testing
Integration testing.
System testing
Functional testing.

Accepted Answers:
Integration testing.

3) Suppose a new functionality is added to the software and the software


is tested for the new functionality not damaging the existing function-
alities. This type of testing is called . . . . . . . . .

Accepted Answers:
(Type: String) Regression testing

4) State true or false: Black-box testing is applicable to all phases of


testing
05/01/2018 Software testing - - Unit 2 - Week 1

Accepted Answers:
(Type: String) True

5) Consider the code fragment given below:


if
(x < 10 && y > 0)
/* do something */
if (y < 50)
--- error ---
Assume that x and y are non-negative integers. Which of the predicates
below ensure reachability and infection of the error statement?

x < 10 && y > 0.


x < 10 && 0 < y < 50
x < 10 && y = 50.
x < 10 && y > 50

Accepted Answers:
x < 10 && 0 < y < 50

6) State true or false: There are models available for source code

Accepted Answers:
(Type: String) False

7) Which of the following two test cases will satisfy predicate coverage for
the predicate (x+1 ≤ 5 || z > 0)?

(i) x=1 and z=0 and (ii) x=5 and z=0.


(i) x=1 and z=0 and (ii) x=5 and z=1

Accepted Answers:
(i) x=1 and z=0 and (ii) x=5 and z=0.

8) State true or false: There are infeasible coverage criteria.

Accepted Answers:
(Type: String) True

9) State true or false: JUnit uses assertions to check and intimate an user
about a test case having passed or failed after execution.

Accepted Answers:
(Type:String)u

https://onlinecourses.nptel.ac.in/noc17_cs32/unit?unit=10&assessment=29 2/3
05/01/2018 Software testing - - Unit 2 - Week 1

10)State true of false: A coverage criterion C 1 said to subsume another


coverage criterion C 2 if there is at least one test case that satisfies C 1
which also satisfies C 2

Accepted Answers:
(Type: String) False

You might also like