Software Testing | Week 2

Session: JAN-APR 2024

Course name: Software Testing

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q1. Which of the following are not black box testing techniques?
a. Boundary value testing
b. Cause-effect graph testing
c. Path testing
d. Combinatorial testing
e. Basic Condition testing

Answer: c, e


Q2. Assume you have developed a simple web-based calculator. The user interface has 3 input fields: Operand1, Operator, and Operand2. The user can give 9 valid inputs: {1, 2, .., 9} for Operand1 and also for Operand2. The user can enter four valid inputs for Operator: (+, -, *, /3. How many test cases would exhaustive functional testing require?
a. 3
b. 12
c. 22
d. 256
e. 324

Answer: e. 324


Q3. Which of the following are false about white-box testing?
a. Test cases are designed using only functional specification of the software:
b. Test cases are designed without any knowledge of the internal structure of the software.
c. White-box testing is also known as structural testing.
d. Test case design requires a knowledge of the internal structure of the unit under test
e. White-box tests can detect trojans in the code
f. White-box testing can be used to detect if a software meets all its functional requirements

Answer: a, b, f


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q4. Assume that a function test takes three parameters x, y, and z as arguments. Each of these three parameters can assume values in the range -100 to +100. How many boundary value test cases with valid values should be designed?
a. 7
b. 9
c. 11
d. 13
e. 17

Answer: d. 13


Q5. Consider the function find-intersection(float mi, float c1, float m2, float 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?
а. 1
b. 2
c. 3
d. 4
e. 6

Answer: c. 3


Q6. Which of the following are not combinatorial testing techniques?
a. Decision table-based testing
b. Condition-coverage testing
c. Cause-effect graphing
d. Pair-wise testing
e. Path testing

Answer: b, e


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q7. 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 behave similarly to an input
d. Equivalence classes define the behaviorally similar components of a program
e. Equivalence classes help identify program functions that can be considered to be behaviorally similar

Answer: a. A program behaves in similar ways to every input value belonging to an equivalence class.


Q8. Consider a function that takes an integer a (which can assume integral values between 0 to 100) as argument and carries out actions involving setting the value of a variable b as specified in the following table.
During black box testing of the function, how many valid equivalence class test cases with valid input values are required?
a. 4
b. 5
c. 8
d. 9
e. 10

Answer: b. 5


Q9. Which one of the following techniques is not used to identify the equivalence classes of a unit?
a. Identity scenarios
b. Examine the input data.
c. Analyze program structure
d. Examine output
e. Develop cause-effect model of the program

Answer: c. Analyze program structure


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q10. Suppose a function named try takes two Boolean variables as input. At least how many valid equivalence classes needs to be designed for the black-box testing of the function try?
a. 2
b. 4
c. 6
d. 8
e. 10

Answer: b. 4


For answers or latest updates join our telegram channel: Click here to join

These are NPTEL Software Testing Week 2 Assignment 2 Answers

More Weeks of Software Testing: Click here

More Nptel Courses: https://progiez.com/nptel-assignment-answers


Session Jan-Apr 2023

Course Name: Soft Skills Development

Course Link: Click Here

These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q1. Cause-effect test cases are, in effect, are designed using which one of the following types of testing techniques?
a. Decision-table based testing
b. Coverage-based testing
c. Fault-based testing
d. Path-based testing
e. Equivalence testing

Answer: a. Decision-table based testing


Q2. 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 of the given function, at the first level of the equivalence 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

Answer: c. 3


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q3. Consider a function compute-grade has been written by the academic unit of an Institute to compute the grade of a student from the marks obtained. Assume that the following grading scheme is being used by the academic Institute.

image 70

During black box testing of the function compute-grade, altogether at least how many equivalence test cases are needed to be designed, assuming that robust testing is targeted?
a. 6
b. 7
c. 8
d. 9
e. 10

Answer: d. 9


Q4. Which one of the following types of bugs may not get detected in black-box testing, but are very likely to be get detected by white-box testing?
a) Incorrect functionality
b) Missing functionality
c) Trojans
d) Incorrect algorithm
e) Performance errors

Answer: c) Trojans


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q5. Consider the following program code. At least how many test cases are needed for basic condition coverage?
a. 2
b. 3
c. 4
d. 5
e. 6

Answer: a. 2


Q6. Which one of the following captures the basic idea based on which design of the equivalence classes of a function based on its specification is carried out?
a. A set of input values constitute an equivalence class if the tester believes these are processed identically.
b. A set of test cases constitute an equivalence class, if the tester believes that these are processed differently
c. A set of input values that are partially ordered constitute an equivalence class
d. A set of dissimilar input values constitute an equivalence class
e. Equivalence classes define the behaviorally similar components of a program

Answer: a. A set of input values constitute an equivalence class if the tester believes these are processed identically.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q7. Which of the following is/are false regarding white-box testing?
a. White-box test cases designed based on the code structure of a program.
b. White-box testing is also called structural testing.
c. White-box test cases designed based on the design of a program.
d. White-box test cases designed based on the requirements specification of a program.
e. White-box testing is also called behavioral testing.

Answer: c, d, e


Q8. Assume that a function try takes four parameters w, x, y, and z as arguments. Each of these four parameters can assume values in the range 0 to 100. How many boundary value test cases should be designed for robust testing of the function try?
a. 9
b. 13
c. 17
d. 25
e. 30

Answer: d. 25


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q9. 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)) x=x+1;

a. 2
b. 4
c. 6
d. 8
e. 12

Answer: d. 8


Q10. Code coverage analysis is used to measure which one of the following?a
a. Extent of unreachable code
b. Sufficiency of test cases
c. Quality of code
d. Distribution of bugs
e. Percentage of bugs exposed

Answer: b. Sufficiency of test cases


These are NPTEL Software Testing Week 2 Assignment 2 Answers

More Weeks of Software Testing: Click Here


Session Jul-Dec 2022

Q1. Which of the following best defines an infeasible test path?

a)An infeasible test path is one that does not exist in the graph.

b)An infeasible test path is one that can be executed by a failed test case.

c)An infeasible test path is one that cannot be executed by any test case.

d)An infeasible test path is one that does not start at an initial vertex or end at a final vertex.

Answer: b)An infeasible test path is one that can be executed by a failed test case.


Q2.How are test requirements defined and met in graphs-based structural coverage criteria?

a)Test requirements are basically the same as test paths, they are given as test paths.

b)Test requirements are defined as properties of test paths and they are met by using test paths that satisfy each test requirement.

Answer: a)Test requirements are basically the same as test paths, they are given as test paths.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q3.In control flow graphs, which of the terms below represents a basic block?

a)A basic block is a sequence of statements such that there is no branching in the sequence.

b)A basic block is any sequence of statements that occurs as a path in the control flow graph.

Answer: b)A basic block is any sequence of statements that occurs as a path in the control flow graph.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q4.Consider a control flow graph GG corresponding to a method and a strongly connected component SS in CC. Which of the following does SS represent in the code that GG corresponds to?

a)SS represents the entire method in case the method does not have loops.

b)SS represents a loop in the method.

Answer: b)SS represents a loop in the method.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q5.Which of the algorithms will return the shortest paths between two nodes in a control flow graph?

w2q5
These are NPTEL Software Testing Week 2 Assignment 2 Answers

a)Breadth first search.

b)Depth first search.

Answer: a)Breadth first search.


Q6.State true or false: There are test paths that achieve node coverage but not edge coverage.

a)True.

b)False.

Answer: b)False.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q7.Which of the following test paths achieve edge coverage?

a)Test path [1, 2, 3, 2, 4].

b)Test paths [1, 2, 4] and [1, 2, 3, 2].

c)Both the paths above achieve edge coverage.

d)None of the above two paths achieve edge coverage.

Answer: c)Both the paths above achieve edge coverage.


Q8.State yes or no: In the graph above, the test path [1, 2, 3, 2, 4] tours the pair of edges [3, 2, 3].

a)Yes.

b)No.

Answer: a)Yes.


These are NPTEL Software Testing Week 2 Assignment 2 Answers


Q9.The test paths {[1, 2, 4], [1, 2, 3, 2, 3, 2, 4]} achieve which of the following coverage criteria?

a)Node coverage only.

b)Edge coverage only.

c)Node and edge coverage only.

d)Edge pair coverage.

Answer: d)Edge pair coverage.


Q10.State true or false: The test path [1, 2, 3, 2, 4] achieves edge coverage.

a)True.

b)False.

Answer: a)True.


These are NPTEL Software Testing Week 2 Assignment 2 Answers

All weeks Software Testing: Click Here

More Solution of NPTEL: Click me


These are NPTEL Software Testing Week 2 Assignment 2 Answers
The content uploaded on this website is for reference purposes only. Please do it yourself first.