0% found this document useful (0 votes)
9 views4 pages

Answer Testing Tutorial

The document provides answers to software testing tutorial questions, including equivalence partition classes, boundary values, and cyclomatic complexity calculations. It details independent paths and test cases for different scenarios, such as determining shapes based on input values. Additionally, it outlines the expected outputs for various test cases related to squares and rectangles.

Uploaded by

gboxanas54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Answer Testing Tutorial

The document provides answers to software testing tutorial questions, including equivalence partition classes, boundary values, and cyclomatic complexity calculations. It details independent paths and test cases for different scenarios, such as determining shapes based on input values. Additionally, it outlines the expected outputs for various test cases related to squares and rectangles.

Uploaded by

gboxanas54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1

Software Testing Tutorial Answers

Question 2:

Equivalence Partition Class:


Class1: 20-199
Class2: >=200
Class3: <20
Class 4: <0

Boundary Value:
19, 20, 200, 201, -1, 0, 1

Question 3:

(a) The flow graph


2

(b) Cyclomatic Complexity = 11-9 + 2 = 4 OR 3+1=4

(c) Independent Path:

1-2-3-9
1-2-4-5-9
1-2-4-6-7-9
1-2-4-6-8-9

(d) Test Cases:

Independent BoxA BoxB BoxC Output


Path
1-2-3-9 2 3 4 722
1-2-4-5-9 1 1 2 312.80
1-2-4-6-7-9 1 2 3 468
1-2-4-6-8-9 3 1 1 360

Question 4:

(a) Equivalence Partitioning:

Class 1 <a, b, c, d>: It is a square


Class 2 <a, b, c, d>: It is a rectangle
Class 3 <a, b, c, d>: a, b, c, d do not form either a square or a rectangle
Class 4 <a,b,c,d>: Either a, b, c, d or all are negative integers

(b) Example:

Class 1: a=b=c=d=3
Class 2: a=b = 2 AND c=d=4
Class 3: a=1, b=2, c=3, d=4
Class 4: a=-1, b=2,c=-3, d=5

(c) 10 test cases

(d)

Test Case A B C D Output


#
1 3 3 3 3 Square
2 2 2 4 4 Rectangle
3 1 2 2 2 Cannot be
determined
4 2 2 1 2 Cannot be
determined
3

5 -1 2 2 2 Cannot be
determined
6 -1 -1 -1 -1 Cannot be
determined
7 0 2 2 2 Cannot be
determined
8 0 0 0 0 Cannot be
determined
9 1 2 3 4 Cannot be
determined
10 -2 -2 -3 -3 Cannot be
determined

Question 5:
(a)
4

(b) Cyclometic Complexity= 8-7+2=3 OR 2+1=3

(c) Independent Paths:


1-2-3-7
1-2-4-5-7
1-2-4-6-7

(d)
Independent Path A B C D Output
1-2-3-7 3 3 3 3 Square
1-2-4-5-7 2 2 4 4 Rectangle

1-2-4-6-7 2 1 4 3 Unidentified
Rectangle

You might also like