NPTEL Software Testing | Week 6 Assignment Answers 2022

 

Week 6 : Assignment 6

Due date: 2022-09-07, 23:59 IST.
Assignment not submitted
1 point
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?
 
 
1 point
How do logical predicates occur in finite state machines?
 
 
1 point
In a requirements specification document, where do logical predicates occur?
 
 
 
 

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;
}
1 point
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.
 
 
1 point
Is it true that predicate coverage for the first predicate will also subsume predicate coverage for the second predicate?
 
 
1 point
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?
 
 
1 point
State true or false: The set of test case inputs {(x=5,y=3),(x=4,y=6),(x=5,y=6)} will satisfy clause coverage for the second predicate.
 
 
1 point
State yes or no: The set of test case inputs {(x=5,y=3),(x=4,y=6),(x=5,y=6)}
 
 
1 point
How many test cases are needed for satisfying RACC for all the clauses for the second predicate?
 
 
 
 
1 point
State true or false: The set of test case inputs {(x=4,y=6),(x=6,y=4),(x=4,y=5)} satisfy RACC for the second predicate.
 
 

You may submit any number of times before the due date. The final submission will be considered for grading.


Answers:


1. b
2. b
3. b
4. a
5. b
6. a
7. a
8. a
9. c
10. a


NOT 100%

Comments

Post a Comment

Popular posts from this blog

Walmart Sparkplug 2022 | 150 students will be selected for summer internship | ₹1-1.1 lakh monthly

Flipkart Runway: Season 3 | 2025 | Internship

Python for Data Science NPTEL Assignment Solutions Week 4 2022

GATE 2022 Answer Key Release Date Announced; Details Here