ST Assignment 1 (19011598-026)
ST Assignment 1 (19011598-026)
ST Assignment 1 (19011598-026)
ASSIGNMENT 1
SUBMITTED TO:
Miss Uzma
SUBMITTED BY:
Muhammad Hammad (19011598-026)
SEMESTER:
7th SEMESTER
SECTION:
A
COURSE NAME:
Software Testing
DATE:
December 19, 2022
1. Consider the quadrilateral problem given in chapter 2 (Section 2.6.1 page 30). Create robust
boundary value test cases for quadrilateral problem
Test Case ID a b c d
TC1 0 30 40 20
TC2 1 30 40 20
TC3 2 30 40 20
TC4 105 105 105 105
TC5 199 30 40 20
TC6 200 30 40 20
TC7 201 30 40 20
TC8 30 0 40 20
TC9 30 1 40 20
TC10 30 2 40 20
TC11 30 199 40 20
TC12 30 200 40 20
TC13 30 201 40 20
TC14 30 40 0 20
TC15 30 40 1 20
TC16 30 40 2 20
TC17 30 40 199 20
TC18 30 40 200 20
TC19 30 40 201 20
TC20 30 40 20 0
TC21 30 40 20 1
TC22 30 40 20 2
TC23 30 40 20 199
TC24 30 40 20 200
TC25 30 40 20 201
3. Consider a program for the classification of a triangle. Its input is a triple of positive integers
(say, a, b and c) from the interval [1, 100]. The output may be one of the following words
[scalene, Isosceles, Equilateral, Not a triangle]. Create equivalence classes and design weak
normal, strong normal, weak robust and strong robust test cases accordingly
Equilateral
Scalene
Isosceles
Not a Triangle
Week Normal
a b c
5 5 5
4 5 5
4 5 6
2 3 7
Week Robust
a b c
-1 5 5
5 -1 5
5 5 -1
205 5 5
5 205 5
5 5 205
Strong Normal
a b c
5 5 5
5 6 6
5 5 6
5 6 5
4 5 6
2 6 10
6 2 10
10 2 6
Strong Robust
A B C
-1 5 5
5 -1 5
5 5 -1
-1 -1 5
5 -1 -1
-1 -1 -1
201 5 5
5 201 201
201 201 5
201 201 5
5 201 201
201 201 201
4. Consider the quadrilateral problem given in chapter 2 (Section 2.6.1 page 30). Create
equivalence classes and design weak normal, strong normal, weak robust and strong robust test
cases accordingly
Square / Rhombus
Kite
Quadrilateral
Rectangle / Parallelogram
Trapezoid
Square and Rhombus are combined because its all sides are equal.
Week Normal
a b c d
6 6 6 6
6 6 4 4
5 7 3 9
6 4 6 4
4 6 2 6
Week Robust
a b c d
-1 6 6 6
6 -1 6 6
6 6 -1 6
6 6 6 -1
201 6 6 6
6 201 6 6
6 6 201 6
6 6 6 201
Strong Normal
a b c d
6 6 6 6
6 6 4 4
6 4 7 3
6 4 6 4
4 6 3 6
4 6 6 6
2 4 6 6
6 6 3 2
6 6 6 3
6 7 6 6
6 6 4 6
6 2 6 3
2 6 6 9
Strong Robust
A B X d
-1 6 6 6
-1 -1 6 6
-1 -1 -1 6
-1 -1 -1 -1
6 -1 -1 4
6 -1 -1 -1
6 6 -1 6
6 -1 6 6
201 6 6 6
6 201 6 6
6 6 201 6
6 6 6 201
6 6 201 201
6 201 201 201
6 201 201 201
201 201 201 201
201 201 6 6
201 201 201 8
5. If you use a compiler for a strongly typed language, discuss how it would react to robust
equivalence class test cases
Ans. A compiler for a strongly typed language would react to robust equivalence class test cases by
ensuring that the code is correctly typed and that the data is of the correct type for the operations it is
being used for. It would also ensure that the code adheres to the language’s syntax rules, and that any
data being used has the correct structure and format. In addition, it would also check that any function
calls or API calls are valid and that the parameters being passed in are of the correct type and format.
Finally, it would ensure that any loop conditions are valid, and that any branching logic is valid as well.
6. Consider the following problem and determine how you can perform the black box testing for
this problem. Create the test case using appropriate test design technique. Also give the
reasoning for the chosen technique.
Ans. I will use decision table design technique. Because in this statement there are some conditions, So I
will use decision table technique.
Matric ≥ 90 %
Inter ≥ 90 %
Admission Test ≥ 90 %
Marks 90 % ≤ 85 %
Need base
Kinship
Decision Table
Matric ≥ 90 T F T T T T T
%
Inter ≥ 90 % T DC F T T T T
Admission T DC DC F F F F
Test ≥ 90 %
Marks 90 % DC DC DC F T F T
≤ 85 %
Need base DC DC DC DC F DC T
Kinship DC DC DC F DC T DC
100 % 🗸
75 % 🗸
50 % 🗸
25 % 🗸
0% 🗸 🗸 🗸
7. If you use a compiler for a strongly typed language, discuss how it would react to robust
equivalence class test cases
…….
Decision Table:
8. Determine equivalence classes for Previous Date program, make a decision-table and specify
the test cases.
Decision Table