Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

NPTEL Software Testing Assignment 6 Answers 2022

Hundreds of students demanded the reference answers to the NPTEL software testing assignment 6. In response to their demand, I have uploaded answers to this assignment here. To get the reference answer, connect with us on telegram.

NPTEL banner to the software testing all these text written in red color.

NPTEL Software Testing Assignment 6 Answers

Q1. While applying logic-based testing to test source code, is it true that the predicates can be taken exactly as they occur in code always?

a. Yes, the predicates can be considered exactly as they occur in code.
b. No, some times we have to add extra clauses to the predicate

Answer: b. No, some times we have to add extra clauses to the predicate

900+ Students helped through Instant Notifications on telegram


Q2. How do logical predicates occur in finite state machines?

a. The logical predicates occur as a part of the states of the finite state machines.

b. The logical predicates occur as guards in the transitions of the finite state machines.

Answer: b. The logical predicates occur as guards in the transitions of the finite state machines.


Q3. In a requirements specification document, where do logical predicates occur?

a. They occur directly as a part of the requirements.

b. They occur as pre-conditions, invariants and post-conditions in the requirements.

c. All the conditions in requirements can be translated into predicates.

d. Logical predicates cannot be found in requirements.

Answer: b. They occur as pre-conditions, invariants and post-conditions in the requirements.


Answer the following questions for the method twoPred() below.
The method is called with two input parameters x and y.

public String twoPred (int x, int y)
{
    boolean z;
    if (x < y)
        z = true;
    else
        z = false;
    if (z && x+y == 10)
        return z;
    else
        return z-1;
}

Q4. State true or false: The internal variable z in the second predicate needs to be re-written in terms of the input parameters x and y.

A. True

B. False

Answer: A. True


Q5. Is it true that predicate coverage for the first predicate will also subsume predicate coverage for the second predicate?

A. True

B. False

Answer: B. False


Q6. How many test cases will be needed for clause coverage for the second predicate if we explicitly count the true and false values for each clause?

a. Two test cases.

b. Four test cases

Answer: b. Four test cases


Q7. State true or false: The set of test case inputs {(x=5,y=3),(x=4,y=6),(x=5,y=6)}{(x=5,y=3),(x=4,y=6),(x=5,y=6)} will satisfy clause coverage for the second predicate.

a. True

b. False

Answer: a. True


Q8. State yes or no: The set of test case inputs {(x=5,y=3),(x=4,y=6),(x=5,y=6)}

a. Yes

b. No

Answer: a. Yes


Q9. How many test cases are needed for satisfying RACC for all the clauses for the second predicate?

a.  Only one test case

b. Two test cases

c. Three test cases

d. Five test cases

Answer: c. Three test cases


Q10. State true or false: The set of test case inputs {(x=4,y=6),(x=6,y=4),(x=4,y=5)}{(x=4,y=6),(x=6,y=4),(x=4,y=5)} satisfy RACC for the second predicate.

a. True

b. False

Answer: a. True


TELEGRAM FOR NOTIFICATIONClick Here
Follow on Google News (in one click)Click Here

Disclaimer: These answers are provided only for the purpose to help students to take references. This website does not claim any surety of 100% correct answers. So, this website urges you to complete your assignment yourself.


Also Available:

NPTEL Software Testing Assignment 5 Answers

NPTEL Software Testing Assignment 7 Answers

Related Posts