Software Testing Lab File
Software Testing Lab File
&
Quality Assurance
BY Submitted To:
a Dr.Preeti Arora
03120802718
31-CSEA-18
CSEA
Aim: To determine the Next date, given the current date. Perform
following Black Box Testing techniques:
1. Boundary value Analysis
2. Robust testing
3. Worst case testing
4. Equivalence class testing
5. Decision table
6. Cause effect graph
4 6 15 2024 16 june,2024
10 1 15 1962 16 january,
1962
11 2 15 1962 16 february,
1962
12 11 15 1962 16 november,
1962
13 12 15 1962 16 december,
1962
2 1 15 1901 16 january,
1901
3 2 15 1962 16 february,
1902
4 11 15 2024 16 november,
2024
5 12 15 2025 16 december,
2025
1 1 1 1900 2 january,
1900
2 1 1 1901 2 january,
1901
3 1 1 1962 2 january,
1962
4 1 1 2024 2 january,
2024
5 1 1 2025 2 january,
2025
6 1 2 1900 3 january,
1900
7 1 2 1901 3 january,
1901
8 1 2 1962 3 january,
1962
9 1 2 2024 3 january,
2024
10 1 2 2025 3 january,
2025
4. Equivalence class testing
M1 = {month: month has 30 days}
M2 = {month: month has 31 days}
M3 = {month: month is February}
D1 = {day: 1 =< day =< 28}
D2 = {day: day = 29}
D3 = {day: day = 30}
D4 = {day: day = 31}
Y1 = {year: 1900 =< year =< 2025}
5. Decision table
M1 = {month: 1….12/days(month)=30}
M2 = {month: 1….12/days(month=31 where month does not equal
12)}
M3 = {month: {12}}
M4 = {month: {2]}
D1 = {day: 1….27}
D2 = {day: {20}}
D3 = {day: {29}}
D4 = {day: {30}}
D5 = {day: {31}}
Y1 = {year: 1900….2025/ leap year(year)}
Y2 = {year: 1900….2025/ common year(year)}
Test Cases For Decision Table:
Aim: To determine the Next date, given the current date. Perform
following White Box Testing techniques:
1. Flow graph
2. DD Path
3. Cyclomatic complexity
4. Identification of independent paths
White Box Testing:
Program Next Date
Declare tomorrow Day, tomorrow Month, tomorrow Year as integer
Declare Day, Month, Year as integer
Output(“Enter today’s date in the form, MM DD YYYY”)
Input(month, day, year)
Case month of
Case1: month is 1,3,5,7,8 or 10 : 31 day months-(except Dec)
If Day < 31
Then tomorrow Day = day+1
Else
tomorrow Day = 1
tomorrow Month = month+1
Else if
Case 2: month is 4,6,9 or 11 : 30 day months-
If day < 30
Then tomorrow Day = day+1
Else
tomorrow Day = 1
tomorrow Month = month+1
End if
Case 3: month is 12 : December
If day < 31
Then tomorrow Day = day+1
Else
tomorrow Day = 1
tomorrow Month = 1
tomorrow Year = year+1
If year = 2025 then output (“out of range”)RETURN
End if
Case 4: month is 2: February
If day < 28
Then tomorrow Day = day+1
Else
If day = 28
Then if (is leap)
Then tomorrow Day = 29
Else
tomorrow Day = 1
tomorrow Month = 3
End if
End if day = 29
Then if (is leap)
Then
tomorrow Day = 1
tomorrow Month = 3
Else
output(“Invalid Date”) Return
End if
End if
End if
End case
output(“Tomorrow Date is”, tomorrow Month, tomorrow Day,
Tomorrow Year”)
End Next Date
Flow Graph
DD Path
Flow Graph Nodes DD Path Graph Remarks
Corresponding nodes
3 B1 Decision node
4 C1 Decision node
5 D1 Decision node
6 E1 Sequential node
10 G1 Junction node
11 H1 Decision node
12 I1 Decision node
13 J1 Sequential node
17 L1 Junction node
18 M1 Decision node
19 N1 Decision node
20 O1 Sequential node
26 Q1 Junction node
27 R1 Decision node
28 S1 Decision node
29 T1 Sequential node
30 U1 Decision node
31 V1 Sequential node
32 W1 Decision node
33 X1 Sequential node
34,35,36 Y1 Sequential node
37 Z1 Junction node
38 A2 Sequential node
39 B2 Decision node
46 E2 Junction node
47 F2 Junction node
50 H2 Junction node
Cyclomatic Complexity
Number of edges(e) = 41
Number of nodes(n) = 33
1) V(G) = e - n + 2p = 42 - 33 + 2 = 11
2) V(G) = R + 1 = 10 + 1 = 11
Independent paths
Independent paths in the above flow chart are:
1. A1B1C1D1E1G1G2H2
2. A1B1C1D1F1G1G2H2
3. A1B1H1I1J1L1G2H2
4. A1B1H1I1K1L1G2H2
5. A1B1C1M1N1O1Q1G2H2
6. A1B1C1M1N1P1H2
7. A1B1C1R1S1T1F2G2H2
8. A1B1C1R1S1U1V1W1X1Z1E2F2G2H2
9. A1B1C1R1S1U1V1W1Y1Z1E2F2G2H2
10. A1B1C1R1S1U1A2B2C2E2F2G2H2
11. A1B1C1R1S1U1A2B2D2H2
Experiment-3
Range : [1,100]
1<= a <=100
1<= b <=100
1<= c <=100
2. Robust testing –
In robust testing, like the boundary value analysis, it generates test cases
based on a number of variables. The difference here is that it also
considers the invalid values making the test cases 6n+1.
So, total test cases = 19
Test case
A B C Expected Output
no.
1 50 50 1 Isosceles
2 50 50 2 Isosceles
3 50 50 50 Equilateral
4 50 50 99 Isosceles
5 50 50 100 Not a triangle
6 50 1 50 Isosceles
7 50 2 50 Isosceles
8 50 99 50 Isosceles
9 50 100 50 Not a triangle
10 1 50 50 Isosceles
11 2 50 50 Isosceles
12 99 50 50 Isosceles
13 100 50 50 Not a triangle
14 50 50 0 Invalid Input
15 50 50 101 Invalid Input
16 50 0 50 Invalid Input
17 50 101 50 Invalid Input
18 0 50 50 Invalid Input
19 101 50 50 Invalid Input
Test case
A B C Expected Output
no.
1 50 50 50 Equilateral
2 50 50 99 Isosceles
3 100 99 50 Scalene
4 50 100 50 Not a triangle
I1={a: a < 1}
I2={a: a > 100}
I3={a: 1 ≤ a ≤ 100}
I4={b: b < 1}
I5={b: b > 100}
I6={b: 1 ≤ b ≤ 100}
I7={c: c < 1}
I8={c: c > 100}
I9={c: 1 ≤ c ≤ 100}
I10={< a,b,c >: a = b = c}
I11={< a,b,c >: a = b, a ≠ c}
I12={< a,b,c >: a = c, a ≠ b}
I13={< a,b,c >: b = c, a ≠ b}
I14={< a,b,c >: a ≠ b, a ≠ c, b ≠ c}
I15={< a,b,c >: a = b + c}
I16={< a,b,c >: a > b +c}
I17={< a,b,c >: b = a +c}
I18={< a,b,c >: b > a + c}
I19={< a,b,c >: c = a + b}
I20={< a,b,c >: c > a +b}
Test case
A B C Expected Output
no.
1 0 50 50 Invalid Input
2 101 50 50 Invalid Input
3 50 50 50 Equilateral
4 50 0 50 Invalid Input
5 50 101 50 Invalid Input
6 50 50 50 Equilateral
7 50 50 0 Invalid Input
8 50 50 101 Invalid Input
9 50 50 50 Equilateral
10 60 60 60 Equilateral
11 50 50 60 Isosceles
12 50 60 50 Isosceles
13 60 50 50 Isosceles
14 100 99 50 Scalene
15 100 50 50 Not a triangle
16 100 50 25 Not a triangle
17 50 100 50 Not a triangle
18 50 100 25 Not a triangle
19 50 50 100 Not a triangle
20 25 50 100 Not a triangle
5. Decision table –
C1={ a<b+c }
a1={ Not a triangle }
C2={ b<a+c }
a2={ Scalene }
C3={ c<a+b }
a3={ Isosceles }
C4={ a=b }
a4={ Equilateral }
C5={ b=c }
a5={ Impossible }
C6={ a=c }
3. Cyclomatic complexity –
Number of edges, e = 23
Number of nodes, n = 18
V(G) = e – n + 2*P = 7
1 35 40 1 3560 537
2 35 40 2 3595 544
3 35 40 45 5100 845
4 35 40 89 6640 1153
5 35 40 90 6675 1160
6 35 1 45 3540 533
7 35 2 45 3280 541
8 35 79 45 6660 1157
9 35 80 45 6700 1165
10 1 40 45 3530 471
11 2 40 45 3285 482
12 69 40 45 6970 1219
13 70 40 45 7025 1230
2. Robust testing -
In robust testing, like the boundary value analysis, it
generates test cases based on a number of variables.
The difference here is that it also considers the invalid
values making the test cases 6n+1.
So, total test cases = 19
Case ID Fans Pumps Bodies Sales Commission
1 35 40 1 3560 537
2 35 40 2 3595 544
3 35 40 45 5100 845
4 35 40 89 6640 1153
5 35 40 90 6675 1160
6 35 1 45 3540 533
7 35 2 45 3280 541
8 35 79 45 6660 1157
9 35 80 45 6700 1165
10 1 40 45 3530 471
11 2 40 45 3285 482
12 69 40 45 6970 1219
13 70 40 45 7025 1230
14 35 40 0 invalid -
15 35 40 91 invalid -
16 35 81 45 invalid -
17 35 0 45 invalid -
18 0 40 45 invalid -
19 71 40 45 invalid -
2 1 1 2 165
3 1 1 45 1670
4 1 1 89 3210
5 1 1 90 3245
6 1 2 1 170
7 1 2 2 205
8 1 2 45 1710
9 1 2 89 3250
10 1 2 90 3285
11 1 40 1 1690
12 1 40 2 1725
… … … … …
124 70 80 89 10165
125 70 80 90 10200
1 35 40 45 5100
2 0 40 45 Invalid input
3 35 0 45 Invalid input
4 35 40 0 Invalid input
5 71 40 45 Invalid input
6 35 81 45 Invalid input
7 35 40 91 Invalid input
5. Decision table -
R1 R2 R3 R4 R5 R6 R7 R8 R9
C1:fans=1 T F F F F F F F F
C2:1<=fans<=7 - T T F T F F F T
0
C3:1<=pumps< - T F T F T F F T
=80
C4:1<=bodies< - F T T F F T F T
=90
A1:terminate X
input loop
A2:invalid fans X X X X
input
A3:invalid X X X X
pumps inputs
A4:invalid X X X X
bodies inputs
A5:calculate X X X X X X X
sales &
commission
A6:proceed to X
next table
R1 R2 R3 R4
C1:sales=1 T F F F
C3:sales>1500 and T F
sales<=2000
C4:sales>2000 T
A2:commission=10%*sales X
A3:commission=10% of X
1500+(sales-1500)*15%
A4:commission=10% of X
1500+15% of
500+(sales-2000)*20%
14 B Decision node
15-19 C Sequential node
29 E Decision node
33 G Decision node
38 J Junction node
39 K Junction node
2. DD graph -
3. Cyclomatic complexity -
Number of edges, e = 15
Number of nodes, n = 12
V(G) = e - n + 2 * P = 5
Introduction –
The traditional system to manage libraries in every institution is either
keeping track of the books in a register or keeping track of a similar
entry on the computer in csv or excel format. This type of work is fine
until one needs data from the logs.
Purpose –
The library management system is an online application for assisting
a librarian in managing a book library in ,say, a university. The system
should provide a basic set of features to add or update books. Search
for books and manage them. This test plan document supports the
following objectives:
● Identify existing project information and software that should be
tested.
● List of recommended test requirements
● Description of testing techniques to be employed
● Identify required resources and provide an estimate of test
efforts
● List the deliverables elements of test activities
Scope -
The system that is to be developed provides the related information on
students and system administrators.
● Creating a system admin who will manage system
● Admin will have login activity
● Can add/edit/delete/view the category
● Can add/edit/delete/view the books issued
● Can search for books
Testing Strategies -
Unit testing:
In order to test a single module, one needs to provide a complete
environment i.e. beside the module required:-
● Procedures belonging to other modules
● Non local data structures
● Procedure to call the function of module
Unit testing was done on each and every module.
a. Test for admin module
● Testing login interface
● Student account addition
● Book addition
b. Test for student login modules
● Test for student login interface
● Test for account creation
System and integration testing:
● UI: interface from where all inputs are given
● DBMS: location where all calculations are done and stored
● VAL: validation module
● CNI: these contents are displayed in the reports
Performance and stress testing:
Stress testing involving testing beyond normal operational opacity.
Normally this kind of test is done to determine the system’s
robustness in terms of extreme load for example multi-user testing.
User acceptance testing:
There are different types of acceptance testing. Most common is user
acceptance testing.
Features to be testing:
● GUI test
● Database test
● Base operation test
● Advanced operations test
● Checkin and checkout test
● Bill
Hardware requirements -
● OS: Windows
● IDE: VS
● Language: Python
● Browser: Chromium
● Database: MySQL
Environment Requirements -
● Mainframe: Specify both necessary and desired properties of the
test environment
● Workstation: Computers in the library to be used. Mobile phones
through which records can be viewed.
Test Schedule -
8. Summary 1 23 23 Team
testing september september
Risk and mitigation -
● Reassigned developer staff to limited staff to avoid pending
work.
● Keeping a backup of the battery for electricity issues.
Tools -
● Selenium
● QTP
Experiment-8