Software Testing Lab Manual: Dept. of Ise, Vkit Bangalore
Software Testing Lab Manual: Dept. of Ise, Vkit Bangalore
1. Design and develop a program in a language of your choice to solve the triangle problem
defined as follows: Accept three integers which are supposed to be the three sides of a triangle
and determine if the three values represent an equilateral triangle, isosceles triangle, scalene
triangle, or they do not form a triangle at all. Derive test cases for your program based on
decision-table approach, execute the test cases and discuss the results.
2. Design and develop a program in a language of your choice to solve the triangle problem
defined as follows: Accept three integers which are supposed to be the three sides of a triangle
and determine if the three values represent an equilateral triangle, isosceles triangle, scalene
triangle, or they do not form a triangle at all. Assume that the upper limit for the size of any side
is 10. Derive test cases for your program based on boundary-value analysis, execute the test
cases and discuss the results.
3. Design and develop a program in a language of your choice to solve the triangle problem
defined as follows: Accept three integers which are supposed to be the three sides of a triangle
and determine if the three values represent an equilateral triangle, isosceles triangle, scalene
triangle, or they do not form a triangle at all. Assume that the upper limit for the size of any side
is 10. Derive test cases for your program based on equivalence class partitioning, execute the test
cases and discuss the results.
4. Design, develop, code and run the program in any suitable language to solve the commission
problem. Analyze it from the perspective of dataflow testing, derive different test cases, execute
these test cases and discuss the test results.
5. Design, develop, code and run the program in any suitable language to solve the commission
problem. Analyze it from the perspective of boundary value testing, derive different test cases,
execute these test cases and discuss the test results.
6. Design, develop, code and run the program in any suitable language to solve the commission
problem. Analyze it from the perspective of equivalence class testing, derive different test cases,
execute these test cases and discuss the test results.
7. Design, develop, code and run the program in any suitable language to solve the commission
problem. Analyze it from the perspective of decision table-based testing, derive different test
cases, execute these test cases and discuss the test results.
8. Design, develop, code and run the program in any suitable language to implement the binary
search algorithm. Determine the basis paths and using them derive different test cases, execute
these test cases and discuss the test results.
9. Design, develop, code and run the program in any suitable language to implement the quick
sort algorithm. Determine the basis paths and using them derive different test cases, execute
these test cases and discuss the test results.
10. Design, develop, code and run the program in any suitable language to implement an
absolute letter grading procedure, making suitable assumptions. Determine the basis paths and
using them derive different test cases, execute these test cases and discuss the test results.
11. Design, develop, code and run the program in any suitable language to implement the
NextDate function. Analyze it from the perspective of boundary value testing, derive different
test cases, execute these test cases and discuss the test results.
12. Design, develop, code and run the program in any suitable language to implement the
NextDate function. Analyze it from the perspective of equivalence class value testing, derive
different test cases, execute these test cases and discuss the test results.
Notes:
•In the examination each student picks one question from the lot of all 12 questions.
•The programs must be executed in UNIX / LINUX environment.
/* Design and develop a program in a language of your choice to solve the triangle problem
defined as follows : Accept three integers which are supposed to be the three sides of triangle
and determine if the three values represent an equilateral triangle, isosceles triangle, scalene
triangle, or they do not form a triangle at all. Derive test cases for your program based on
decision-table approach, execute the test cases and discuss the results */
#include<stdio.h>
int main()
{
int a,b,c;
char istriangle;
printf("enter 3 integers which are sides of triangle\n"); scanf("%d%d%d",&a,&b,&c);
printf("a=%d\t,b=%d\t,c=%d",a,b,c);
if (istriangle=='y')
if ((a==b) && (b==c))
printf("equilateral triangle\n");
else if ((a!=b) && (a!=c) && (b!=c))
printf("scalene triangle\n");
else
printf("isosceles triangle\n");
else
printf("Not a triangle\n");
return 0;
}
Experiment Number : 1
Test Data : Enter the 3 Integer Value( a , b And c )
Pre-condition : a < b + c , b < a + c and c < a + b
Brief Description : Check whether given value for a equilateral, isosceles , Scalene triangle or can't form a triangle
Test Case Name :Decision table for triangle problem
INPUT DATA DECISION TABLE
RULES R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11
C1: a < b + c F T T T T T T T T T T
C2 : b < a + c - F T T T T T T T T T
C3 : c < a + b - - F T T T T T T T T
Conditions
C4 : a = b - - - T T T T F F F F
C5 : a = c - - - T T F F T T F F
C6 : b = c - - - T F T F T F T F
a1 : Not a triangle X X X
a2 : Scalene triangle X
Actions a3 : Isosceles triangle X X X
a4 : Equilateral triangle X
a5 : Impossible X X X
Input Data
Case Id Description Expected Output Actual Output Status Comments
a b c
Enter the value of a, b and c Message should be
1 Such that a is not less than 20 5 5 displayed can't form a
sum of two sides triangle
Enter the value of a, b and c
Such that b is not less than Message should be
2 sum of two sides and a is 3 15 11 displayed can't form a
less than sum of other two triangle
sides
Enter the value of a, b and c
Such that c is not less than Message should be
3 sum of two sides and a and 4 5 20 displayed can't form a
b is less than sum of other triangle
two sides
Enter the value a, b and c Should display the
4 satisfying precondition and 5 5 5 message Equilateral
a=b, b=c and c=a triangle
Enter the value a ,b and c
Should display the
5 satisfying precondition and 10 10 9
message Isosceles triangle
a=b and b ≠ c
Enter the value a, b and c
Should display the
6 satisfying precondition and 5 6 7
message Scalene triangle
a ≠b , b ≠ c and c ≠ a
/* Design and develop a program in a language of your choice to solve the triangle problem
defined as follows : Accept three integers which are supposed to be the three sides of triangle
and determine if the three values represent an equilateral triangle, isosceles triangle,
scalene triangle, or they do not form a triangle at all. Derive test cases for your program based on
boundary value analysis, execute the test cases and discuss the results */
#include<stdio.h>
int main()
{
int a,b,c,c1,c2,c3;
char istriangle;
do
{
printf("\nenter 3 integers which are sides of triangle\n");
scanf("%d%d%d",&a,&b,&c);
printf("\na=%d\tb=%d\tc=%d",a,b,c);
c1 = a>=1 && a<=10;
c2= b>=1 && b<=10;
c3= c>=1 && c<=10;
if (!c1)
printf("\nthe value of a=%d is not in range of permitted value",a);
if (!c2)
printf("\nthe value of b=%d is not the range of permitted value",b);
if (!c3)
printf("\nthe value of c=%d is not the range of permitted value",c);
if (istriangle=='y')
if ((a==b) && (b==c))
printf("equilateral triangle\n");
else if ((a!=b) && (a!=c) && (b!=c))
printf("scalene triangle\n");
else
printf("isosceles triangle\n");
else
printf("Not a triangle\n");
return 0;
}
Input Data
Actual
Case Id Description Expected Output Status Comments
Output
a b c
Should display the message Equilateral
1 Enter the min value for a , b and c 1 1 1
triangle
Enter the min value for 2 items and Message should be displayed can't form a
2 1 1 2
min +1 for any one item1 Triangle
Enter the min value for 2 items and Message should be displayed can't form a
3 1 2 1
min +1 for any one item1 triangle
Enter the min value for 2 items and Message should be displayed can't form a
4 2 1 1
min +1 for any one item1 triangle
Enter the normal value for 2 items Should display the message Isosceles
5 5 5 1
and 1 item is min value triangle
Enter the normal value for 2 items Should display the message Isosceles
6 5 1 5
and 1 item is min value triangle
Enter the normal value for 2 items Should display the message Isosceles
7 1 5 5
and 1 item is min value triangle
Should display the message Equilateral
8 Enter the normal Value for a, b and c 5 5 5
triangle
Enter the max value for 2 items and Should display the message Isosceles
13 10 9 10
max - 1 for any one item triangle
Enter the max value for 2 items and Should display the message Isosceles
14 9 10 10
max - 1 for any one item triangle
Should display the message Equilateral
15 Enter the max value for a, b and c 10 10 10
triangle
WN2 Enter the equal value for a and b and 2 2 3 Should display the message
different for c Isosceles triangle
WN3 Enter the diff. value for a , b and c 3 4 5 Should display the message
Scalene triangle
WN4 Enter the value for a , b and c such that 1 2 3 Message should be
it can not form a triangle displayed can't form a
triangle
Case Description Input Data Expected output Actual output Status Comments
ID a b c
WR1 Enter one invalid input and two -1 5 5 Should display value of a is
valid value for a , b and c not in the range of permitted
values
WR2 Enter one invalid input and two 5 -1 5 Should display value of b is
valid value for a , b and c not in the range of permitted
values
WR3 Enter one invalid input and two 5 5 -1 Should display value of c is
valid value for a , b and c not in the range of permitted
values
WR4 Enter one invalid input and two 11 5 5 Should display value of a is
valid value for a , b and c not in the range of permitted
values
WR5 Enter one invalid input and two 5 11 5 Should display value of b is
valid value for a , b and c not in the range of permitted
values
WR6 Enter one invalid input and two 5 5 11 Should display value of c is
valid value for a , b and c not in the range of permitted
values
Case Description Input Data Expected output Actual output Status Comments
ID a b c
SR1 Enter one invalid input and -1 5 5 Should display value of a is not in
two valid value for a , b and c the range of permitted values
SR2 Enter one invalid input and 5 -1 5 Should display value of b is not in
two valid value for a , b and c the range of permitted values
SR3 Enter one invalid input and 5 5 -1 Should display value of c is not in
two valid value for a , b and c the range of permitted values
SR4 Enter two invalid input and -1 -1 5 Should display value of a and b is
two valid value for a , b and c not in the range of permitted values
SR5 Enter two invalid input and 5 -1 -1 Should display value of b and c is
two valid value for a , b and c not in the range of permitted values
SR6 Enter two invalid input and -1 5 -1 Should display value of a and c is
two valid value for a , b and c not in the range of permitted values
24 lsales = lprice*tlocks;
25 ssales=sprice*tstocks;
26 bsales=bprice*tbarrels;
27 sales=lsales+ssales+bsales;
28 printf("\nthe total sales=%f\n",sales);
29 if(sales > 1800.0)
30 {
31 comm=0.10*1000.0;
32 comm=comm+0.15*800;
33 comm=comm+0.20*(sales-1800.0);
}
34 else if(sales > 1000)
35 {
36 comm =0.10*1000;
37 comm=comm+0.15*(sales-1000);
}
38 else
39 comm=0.10*sales;
40 printf("the commission is=%f\n",comm);
41 return 0;
42 }
20-21-22-23-
24-25>
5 Check for total stocks variable (11 , 17) <11-12-13- Yes (11 , 17)
DEF((tstocks,11) and DEF(tstocks,17)) and 14-15-16-17>
3 usage (11 , 22) <11-12-13- No
node(USE(tstocks,17),USE(tstocks,22),USE 14-15-16-17-
(tstocks,25) 18-19-20-21-
14-21>
(11, 25) <11-12-13- No (11, 25)
14-15-16-17-
18-19-20-21-
14-21-23-24-
25>
(17 , 17) <17- Yes (17 , 17)
17>
8 Check for sales DEF(sales, 27) and (27 ,28) <27-28> Yes
USE(Sales, 28), USE(Sales , 29),
USE(Sales,33) , USE(Sales , 34) ,
USE(Sales,37) , USE(Sales , 39) (27 , 29) <27-28-29> Yes
/* Design, develop, code and run the program in any suitable language to solve the commission problem. Analyze it from the
perspective of boundary value, derive test cases, execute these test cases and discuss the test results */
/* Assumption price for lock=45.0, stock=30.0 and barrels=25.0 production limit could sell in a month 70 locks,80 stocks and 90
barrels commission on sales = 10 % <= 1000 and 15 % on 1000 to 1800 and 20 % on above 1800*/
#include<stdio.h>
int main()
{
int locks, stocks, barrels, tlocks, tstocks, tbarrels;
float lprice, sprice, bprice, sales, comm;
int c1,c2,c3,temp;
lprice=45.0;
sprice=30.0;
bprice=25.0;
tlocks=0;
tstocks=0;
tbarrels=0;
printf("\nenter the number of locks and to exit the loop enter -1 for locks\n");
scanf("%d",&locks);
while(locks!=-1)
{
c1=(locks<=0||locks>70);
printf("Enter the number of stocks and barrels\n");
scanf("%d%d",&stocks,&barrels);
c2=(stocks<=0||stocks>80);
c3=(barrels<=0||barrels>90);
if(c1)
printf("value of locks not in the range 1..70 ");
else
{
temp=tlocks+locks;
if(temp>70)
printf("new total locks=%d not in range1..70,so old ,temp\n”);
else
tlocks=temp;
}
printf("total locks = %d\n",tlocks);
if(c2)
printf("value of stocks not in the range 1..80 ");
else
{
temp=tstocks+stocks;
if(temp>80)
printf("new total stocks=%d not in range 1..80 so old ",temp);
else
tstocks=temp;
}
printf("total stocks=%d\n",tstocks);
if(c3)
printf("value of barrels not in the range 1..90 ");
else
{
temp=tbarrels+barrels;
if(temp>90)
printf("new total barrels=%d not in range 1..90 so old ",temp);
else
tbarrels=temp;
}
printf("total barrel=%d",tbarrels);
printf("\nenter the number of locks and to exit the loop enter -1 for locks\n");
scanf("%d",&locks);
}
printf("\ntotallocks=%d\ntotalstocks=%d\ntotalbarrels=%d\n",tlocks,tstocks,tbarrels);
sales =( lprice*tlocks)+(sprice*tstocks)+(bprice*tbarrels);
printf("\nthe total sales=%f\n",sales);
if(sales > 0)
{
if(sales > 1800.0)
{
comm=0.10*1000.0;
comm=comm+0.15*800;
comm=comm+0.20*(sales-1800.0);
}
else if(sales > 1000)
{
comm =0.10*1000;
comm=comm+0.15*(sales-1000);
}
else
comm=0.10*sales;
printf("The commission is=%f\n",comm);
}
else
printf("There is no sales\n");
return 0;
}
CHECKING BOUNDARY VALUE FOR LOCKS, STOCKS AND BARRELS AND COMMISSION
Commission Problem Output Boundary Value Analysis Cases
value sales
approximately
mid value
between 100
to 1000
6 Enter the 10 10 9 975 97.5
7 values to 10 9 10 970 97
8 calculate the 9 10 10 955 95.5
commission
for sales
nearly less
than 1000
9 Enter the 10 10 10 1000 100
values sales
exactly equal
to 1000
10 Enter the 10 10 11 1025 103.75
11 values to 10 11 10 1030 104.5
12 calculate the 11 10 10 1045 106.75
commission
for sales
nearly greater
than 1000
13 Enter the 14 14 14 1400 160
value sales
approximately
mid value
between 1000
to 1800
RULES R1 R2 R3 R4 R5 R6 R7 R8 R9
Conditions C1: Locks = -1 T F F F F F F F F
C2 : 1 ≤ Locks ≤ 70 - T T F T F F F T
C3 : 1 ≤ Stocks ≤ - T F T F T F F T
80
C4 : 1 ≤ Barrels ≤ - F T T F F T F T
90
Actions a1 : Terminate the X
input loop
a2 : Invalid locks X X X X
input
a3 : Invalid stocks X X X X
input
a4:Invalid barrels X X X X
input
a5 : X X X X X X X X
Calculate total
locks, stocks and
barrels
a6 : X
Calculate Sales
a7:proceed to X
commission
decision table
RULES R1 R2 R3 R4
Conditions C1 : Sales = 0 T F F F
C1 : Sales > 0 AND Sales ≤ T F F
1000
C2 : Sales > 1001 AND sales ≤ T F
1800
C3 : sales ≥1801 T
Actions a1 : Terminate the input loop X
a2 : X
comm= 10%*sales
a3 : X
comm = 10%*1000 + (sales-
1000)*15%
a4: X
comm = 10%*1000 + 15% *
800 + (sales-1800)*20%
Precondition : Initial Value Total Locks= 0 , Total Stocks=0 and Total Barrels=0
Precondition Limit :Total locks, stocks and barrels should not exceed the limit 70,80 and 90 respectively
Commission Problem -Decision Table Test cases for input data
Case Description Input data Expected output Actual Status Comments
Id Locks Stocks Barrels output
1 Enter the -1 Terminate the input
value of loop check for sales
/* Design, develop a code and run the program in any suitable language to implement the binary search algorithm. Determine the
basis paths and using them derive different test cases execute these test cases and discuss the test results */
#include<stdio.h>
int binsrc(int x[],int low,int high,int key)
{
int mid;
while(low<=high)
{
mid=(low+high)/2;
if(x[mid]==key)
return mid;
if(x[mid]<key)
low=mid+1;
else
high=mid-1;
}
return -1;
}
int main()
{
int a[20],key,i,n,succ;
printf("Enter the n value");
scanf("%d",&n);
if(n>0)
{
printf("enter the elements in ascending order\n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("enter the key element to be searched\n");
scanf("%d",&key);
succ=binsrc(a,0,n-1,key);
if(succ>=0)
printf("Element found in position = %d\n",succ+1);
else
printf("Element not found \n");
}
else
printf("Number of element should be greater than zero\n");
return 0;}
6 high=mid-1;
7 }
8 return -1;
9}
1
Program Graph – for Binary Search
F L<=H
2
T X[m]=key
3
T F 4
8 X[m]<key X[m]>key
6
5
7
9
Independent Paths:
#Edges=11, #Nodes=9, #P=1
V(G)= E-N+2P = 11-9+2 = 4
P1: 1-2-3-8-9
P2: 1-2-3-4-5-7-2
P3: 1-2-3-4-6-7-2
P4: 1-2-8-9
/*Design, develop, code and run the program in any suitable language to implement the Quick-Sort Algorithm. Determine the basis
paths and using them derive different test cases, execute these test cases and discuss the test results.*/
#include<stdio.h>
void quicksort(int x[10],int first,int last)
{
int temp,pivot,i,j;
if(first<last)
{
pivot=first;
i=first;
j=last;
while(i<j)
{
while(x[i]<=x[pivot] && i<last)
i++;
while(x[j]>x[pivot])
j--;
if(i<j)
{
temp=x[i];
x[i]=x[j];
x[j]=temp;
}
temp=x[pivot];
x[pivot]=x[j];
x[j]=temp;
quicksort(x,first,j-1);
quicksort(x,j+1,last);
}
}
// main program
int main()
{
int a[20],i,key,n;
printf("Enter the size of the array");
scanf("%d",&n);
if(n>0)
{
printf("enter the elements of the array");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
quicksort(a,0,n-1);
printf("the elements in the sorted array is:\n");
for(i=0;i<n;i++)
printf("%d\t",a[i]);
}
else
printf(“size of array is invalid\n”);
}
Independent Paths:
#Edges=18, #Nodes=13, #P=1
A V(G)= E-N+2P = 18-13+2 = 7
Initialization
B First<last
F T
C i<j
F T Right Scan
N
J D
F
T
E F Left Scan
K
T F
i<j F
M G T
H I
P1: A-B-N
P2: A-B-C-J-K-B
P3: A-B-C-J-K-M-B
P4: A-B-C-D-F-H-C
P5: A-B-C-D-F-H-I-C
P6: A-B-C-D-E-D-F-H
P7: A-B-C-D-F-G-F-H
/* Design, develop, code and run the program in any suitable language to implement an absolute letter grading procedure, making
suitable assumptions. Determine the basis paths and using them derive different test cases, execute these test cases and discuss the test
results */
#include<stdio.h>
int main()
{
float per;
char grade;
scanf("%f",&per);
if(per>=90)
grade= 'A';
else if(per>=80 && per<90)
grade ='B';
else if(per>=70 && per<80)
grade ='C';
else if(per>=60 && per<70)
grade='D';
else grade='E';
switch(grade)
{
case 'A': printf("\nEXCELLENT"); break;
case 'B':printf("\nVery Good"); break;
case 'C' : printf("\nGood"); break;
case 'D': printf("\nAbove Average"); break;
case 'E': printf("\n Satisfactory"); break;
}
printf("\t The percentage = %f and grade is %c ",per,grade);
return 0;
}
1
Absolute grade program with line number
int main() 2
{
float per;
3
char grade;
1. scanf("%f",&per);
4
2. if(per>=90)
3. grade= 'A'; 5
4. else if(per>=80 && per<90)
5. grade ='B';
6
6. else if(per>=70 && per<80)
7
7. grade ='C';
8. else if(per>=60 && per<70)
8
9. grade='D';
10. else grade='E'; 9
11. switch(grade) 10
12. {
13. case 'A': printf("\nEXCELLENT"); break;
11
14. case 'B':printf("\nVery Good"); break;
15. case 'C' : printf("\nGood"); break;
16. case 'D': printf("\nAbove Average"); break;
18 15 14 16 17
17. case 'E': printf("\n Satisfactory"); break; 13
18. default: printf(“Grade is not correct”); break;
19. }
20.printf("\t The percentage = %f and grade is %c ",per,grade); 20
21. return 0; }
21
Independent Paths:
#Edges=22, #Nodes=19, #P=1
V(G)= E-N+2P = 22-19+2 = 05
/* Design, develop, code and run the program in any suitable language to implement the NextDate function. Analyze it from the
perspective of boundary value testing and equivalence class analysis. Derive different test cases, execute these test cases and discuss
the test results. */
#include<stdio.h>
int check(int day,int month)
{
if((month==4||month==6||month==9 ||month==11) && day==31)
return 1;
else
return 0;
}
int isleap(int year)
{
if((year%4==0 && year%100!=0) || year%400==0)
return 1;
else
return 0;
}
int main()
{
int day,month,year,tomm_day,tomm_month,tomm_year;
char flag;
do
{
flag='y';
printf("\nenter the today's date in the form of dd mm yyyy\n"); scanf("%d%d%d",&day,&month,&year);
tomm_month=month;
tomm_month=month;
tomm_year= year;
if(day<1 || day>31)
{
printf("value of day, not in the range 1...31\n");
flag='n';
}
if(month<1 || month>12)
{
printf("value of month, not in the range 1....12\n");
flag='n';
}
else if(check(day,month))
{
printf("value of day, not in the range day<=30");
flag='n';
}
if(year<=1812 || year>2013)
{
printf("value of year, not in the range 1812.......2013\n");
flag='n';
}
if(month==2)
{
if(isleap(year) && day>29)
{
printf("invalid date input for leap year");
flag='n';
}
else if(!(isleap(year))&& day>28)
{
printf("invalid date input for not a leap year");
flag='n';
}
}
}while(flag=='n');
switch (month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:if(day<31)
tomm_day=day+1;
else
{
tomm_day=1;
tomm_month=month+1;
}
break;
case 4:
case 6:
case 11: if(day<30)
tomm_day=day+1;
else
{
tomm_day=1;
tomm_month=month+1;
}
break;
case 2:if(day<28)
tomm_day=day+1;
else if(isleap(year)&& day==28)
tomm_day=day+1;
else if(day==28 || day==29)
{
tomm_day=1;
tomm_month=3;
}
break;
}
printf("next day is : %d %d %d",tomm_day,tomm_month,tomm_year);
return 0;
}
Test Case Name : Boundary Value Analysis test cases for Next date program
Experiment Number : 11
Test data : Enter the three integer value
Pre-condition : Month 1 to 12 , DAY 1 TO 31 AND YEAR 1812 TO 2013 / we consider one corner for the input space
Brief Description :
Case Description Input data Expected output Actual output Status Comments
Id M D Y M D Y M D Y
1 Enter the min value 1 1 1812 1 2 1812
month, day and year
2 Enter the min+1 1 1 1813 1 2 1813
value for year and
min for month and
day
3 Enter the normal 1 1 1912 1 2 1912
Case Description Input data Expected output Actual output Status Comments
Id M D Y M D Y M D Y
1 Enter the D1, M1 and 12 31 1811 Should display the
Y1 valid cases message value of
the year in range
1812..2013
Test Case Name : Equivalence class test cases for Next date
Experiment Number : 12
Test data : Enter the three integer value
Pre-condition : Month 1 to 12 , DAY 1 TO 31 AND YEAR 1812 TO 2013
Valid Cases
M1 = { month ; 1 ≤ month ≤ 12 }
D1 = { day : 1 ≤ day ≤ 31 }
Y1 = { year : 1812 ≤ year ≤ 2013 }
Invalid cases
M2 = {month : month < 1}
M3 = {month : month > 12}
D2 = {day : day < 1}
D3 = {day : day > 31}
Y2 = {year : year < 1812}
Y3 = {year : year > 2013}
Next date Output Equivalence Class Testing
( Weak and Strong Normal Equivalence Class )
Case Description Input data Expected output Actual output Status Comments
Id M D Y M D Y M D Y
WN1, Enter the M1, D1 and 6 15 1912 6 16 1912
SN1 Y1 valid cases
Case Description Input data Expected output Actual output Status Comments
Id M D Y M D Y M D Y
WR1 Enter the M1, D1 and 6 15 1912 6 16 1912
Y1 cases
WR2 Enter the M2 , D1 -1 15 1912 Should display the
and Y1 cases message value of
the month not in
the range 1..12
Case Description Input data Expected output Actual output Status Comments
Id M D Y M D Y M D Y
SR1 Enter the M2 , D1 -1 15 1912 Should display the
and Y1 cases message value of
the month not in
the range 1..12
SR2 Enter the M1, D2 and 6 -1 1912 Should display the
Y1 cases message value of
the day not in the
range 1..31
SR3 Enter the M1, D1 and 6 15 1811 Should display the
Y2 cases message value of
the year not in the
range 1812..2013
SR4 Enter the M2 , D2 -1 -1 1912 (i)Should display
and Y1 cases the message value
of the month in
range 1..12
(ii) Should display
the message value
of the day in range
1..31
SR5 Enter the M1, D2 and 6 -1 1811 (i)Should display
Y2 cases the message value
of the month in
range 1..12
(ii) Should display
the message value
of the year in range
1812..2013
SR6 Enter the M2, D1 and -1 15 1811 (i)Should display
Y2 cases the message value
of the day in range
1..31
(ii) Should display
the message value
of the year in range
1812..2013
SR7 Enter the M2, D2 and -1 -1 1811 (i)Should display
Y2 cases the message value
of the month in
range 1..12
(ii) Should display
the message value
of the day in range
1..31
(iii) Should display
the message value
of the year in range
1812..2013