0% found this document useful (0 votes)
30 views

ST LAB1 Program - Merged

The document describes a program to classify triangles based on the lengths of three sides. It includes test cases to test the program using boundary value analysis. The test cases cover valid and invalid input values at the minimum, maximum, and nominal values to test valid triangle classifications and invalid inputs. The test cases are designed to test boundaries and corner cases to thoroughly validate the program's functionality.

Uploaded by

venu
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)
30 views

ST LAB1 Program - Merged

The document describes a program to classify triangles based on the lengths of three sides. It includes test cases to test the program using boundary value analysis. The test cases cover valid and invalid input values at the minimum, maximum, and nominal values to test valid triangle classifications and invalid inputs. The test cases are designed to test boundaries and corner cases to thoroughly validate the program's functionality.

Uploaded by

venu
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/ 23

Software Testing Lab Manual RNSIT

Program 1 and 4 (Boundary Value and Equivalence Class Analysis program)

/* 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. 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 */

#include<stdio.h>
int main()
{
int a,b,c,c1,c2,c3;
char istriangle;
do
{
printf("\n enter 3 integers which are sides of triangle\n");
scanf("%d%d%d", &a, &b, &c);
printf("\n a=%d\t b=%d\t c=%d", a, b, c);
c1 = a>=1 && a<=10;
c2= b>=1 && b<=10;
c3= c>=1 && c<=10;
if (!c1)
printf("\n the value of a=%d is not the range of permitted value", a);
if (!c2)
printf("\n the value of b=%d is not the range of permitted value", b);
if (!c3)
printf("\n the value of c=%d is not the range of permitted value", c);
} while(!(c1 && c2 && c3));

// to check is it a triangle or not

if( a<b+c && b<a+c && c<a+b )


istriangle='y';
else
istriangle ='n';
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;
}

Dept. of ISE 2020 Page 1


Software Testing Lab Manual RNSIT

Test Case Name :Boundary Value Analysis for triangle problem


Experiment Number : 1
Test Data : Enter the 3 Integer Value( a , b And c )
Pre-condition : 1 ≤ a ≤ 10 , 1 ≤ b ≤ 10 and 1 ≤ c ≤ 10 and 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

Triangle Problem -Boundary value Test cases for input data

Input Data
Case Actual
Description Expected Output Status Comments
Id Output
a b c
Should display the message Isosceles
1 Keep a and b at nominal value and vary c 5 5 1 triangle
Keep a and b at nominal value and vary c Should display the message Isosceles
2 5 5 2 triangle
Keep a and b at nominal value and vary c Should display the message Equilateral
3 5 5 5
triangle
Keep a and b at nominal value and vary c Should display the message Isosceles
4 5 5 9
triangle
Keep a and b at nominal value and vary c
5 5 5 10 Should display the message Not a triangle

Keep a and cat nominal value and vary b Should display the message Isosceles
6 5 1 5
triangle
Keep a and c at nominal value and vary b Should display the message Isosceles
7 5 2 5
triangle
Keep a and c at nominal value and vary b Should display the message Equilateral
8 5 5 5
triangle

Dept. of ISE 2020 Page 2


Software Testing Lab Manual RNSIT

Keep a and c at nominal value and vary b Should display the message Isosceles
9 5 9 5
triangle
Keep a and c at nominal value and vary b
10 5 10 5 Should display the message Not a triangle

Should display the message Isosceles


11 Keep b and cat nominal value and vary a 1 5 5
triangle

Keep b and c at nominal value and vary a Should display the message Isosceles
12 2 5 5
triangle

Keep b and c at nominal value and vary a Should display the message Equilateral
13 5 5 5
triangle

Keep b and c at nominal value and vary a Should display the message Isosceles
14 9 5 5 triangle

Keep b and c at nominal value and vary a


15 10 5 5 Should display the message Not a triangle

Dept. of ISE 2020 Page 3


Software Testing Lab Manual RNSIT

Triangle Problem Worst-Case-Test Cases (one corner of a triangle)


Description a b c Expected Output Actual
Case Status Comments
Output
Should display the message as Equilateral
1 Enter the min value for a , b and c 1 1 1
triangle

Enter the min value for 2 items and min +1


2 1 1 2 Should display the message as Not a Triangle
for any one item

Enter the min value for 2 items and Average


3 1 1 5 Should display the message as Not a Triangle
value for any one item

Enter the min value for 2 items and Max -1


4 1 1 9 Should display the message as Not a Triangle
for any one item

Enter the min value for 2 items and Max for


5 1 1 10 Should display the message as Not a Triangle
any one item

Enter the min value for 2 items and min +1


6 1 2 1 Should display the message as Not a Triangle
for any one item

Enter the min+1 value for 2 items and min


7 1 2 2 Should display the message as Isosceles
for any one item

Enter the min value for 1 items, min+1 and


8 1 2 5 Should display the message as Not a Triangle
Average value for any one item

Enter the min value for 1 items, min+1 and


9 1 2 9 Should display the message as Not a Triangle
max-1 for any one item

Enter the min value for 1 items, min+1 and


10 1 2 10 Should display the message as Not a Triangle
max for any one item

Dept. of ISE 2020 Page 4


Software Testing Lab Manual RNSIT

Enter the min value for 2 items, average


11 1 5 1 Should display the message as Not a Triangle
value for any one item

Enter the min value for 1 items, min+1 and


12 1 5 2 Should display the message as Not a Triangle
average for any one item

Enter the min value for 1 items, and


13 1 5 5 Should display the message as Isosceles
average for any 2 items

Enter the min value for 1 items, max-1 and


14 1 5 9 Should display the message as Not a Triangle
average for any one item

Enter the min value for 1 items, max and


15 1 5 10 Should display the message as Not a Triangle
average for any one item

Enter the min value for 2 items and max -1


16 1 9 1 Should display the message as Not a Triangle
for any one item1

Enter the min value for 1 items, min+1 and


17 1 9 2 Should display the message as Not a Triangle
max-1 for any one item

Enter the min value for 1 items, max-1and


18 1 9 5 Should display the message as Not a Triangle
Average value for any one item

Enter the min value for1 items, max-1for 2


19 1 9 9 Should display the message as Isosceles
items

Enter the min value for 1 items, max-1and


20 1 9 10 Should display the message as Not a Triangle
Max value for any one item

Enter the min value for 2 items and max for


21 1 10 1 Should display the message as Not a Triangle
any one item

Dept. of ISE 2020 Page 5


Software Testing Lab Manual RNSIT

Enter the min value for 1 items, min+1 and


22 1 10 2 Should display the message as Not a Triangle
max for any one item

Enter the min value for 1 items, max and


23 1 10 5 Should display the message as Not a Triangle
Average value for any one item

Enter the min value for 1 items, max-1 ,


24 1 10 9 Should display the message as Not a Triangle
and max for 1 items

Enter the min value for 1 items, and Max


25 1 10 10 Should display the message as Isosceles
value for 2 items

Special Value Test Cases


Case Description a b c Expected Output Actual
Status Comments
Output
1 Enter the values for a , b and c 5 8 6 Should display the message as Scalene triangle

Enter the out of boundary value for a and Should display the message as value of a and b
2 11 0 5
b and normal value for c not in the permitted range

3 Enter the negative value for a, b and c Should display the message as value of a, b and
-1 -4 -6
c not in the permitted range

4 Enter the values for a , b and c 5 1 10 Should display the message as Not a Triangle

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3

CO1        

Dept. of ISE 2020 Page 6


Software Testing Lab Manual RNSIT
Program 3 and 6 (Boundary Value Analysis and Equivalence Class Testing)

/* 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_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");

Dept. of ISE 2022 Page 21


Software Testing Lab Manual RNSIT
flag='n';
}

if(year<1812 || year>2019)
{
printf("value of year, not in the range 1812.......2019\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 9:
case 11: if(day<30)
tomm_day=day+1;
else
{
Dept. of ISE 2022 Page 22
Software Testing Lab Manual RNSIT
tomm_day=1;
tomm_month=month+1;
}
break;

case 12: if(day<31)


tomm_day=day+1;
else
{
tomm_day=1;
tomm_month=1;
if(year= =2019)
{
printf("the next day is out of boundary value of year\n");
}

else
tomm_year=year+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;
}

Dept. of ISE 2022 Page 23


Software Testing Lab Manual RNSIT

Test Case Name : Boundary Value Analysis test cases for NextDate program
Experiment Number :3
Test data : Enter the three integer value
Pre-condition : Month 1 to 12, Day 1 to 31 and Year 1812 to 2019
Brief Description : Min Min +1 Normal Max -1 Max
Month 1 2 6 11 12

Day 1 2 15 29/30 30/31

Year 1812 1813 1915 2018 2019

NextDate Boundary Value test cases (day=1 to 30)


Case Input Data Expected Output Actual output Status
Description Comment
Id month day year month day year month day year
1 Enter day and month as nominal
value and vary year from min to 6 15 1812 6 16 1812
max
Enter day and month as nominal
6 15 16
2 value and vary year from min to 1813 6 1813
max
Enter day and month as nominal
6 15 16
3 value and vary year from min to 1915 6 1915
max
Enter day and month as nominal
6 15 16
4 value and vary year from min to 2018 6 2018
max
Enter year and month as nominal 6 15 16
5 2019 6 2019
value and vary day from min to max
Enter year and month as nominal 6 1 6 2
6 1915 1915
value and vary day from min to max

Dept. of ISE 2022 Page 24


Software Testing Lab Manual RNSIT

Enter year and month as nominal value 6 2 1915 6 3 1915


7
and vary day from min to max
Enter year and month as nominal value 6 15 1915 6 16 1915
8
and vary day from min to max
Enter year and month as nominal value 6 29 1915 6 30 1915
9
and vary day from min to max
Enter year and month as nominal value 6 30 1915 7 1 1915
10
and vary day from min to max
11 Enter year and day as nominal value 15 1915 16 1915
1 1
and vary month from min to max
12 Enter year and day as nominal value 15 1915 16 1915
2 2
and vary month from min to max
13 Enter year and day as nominal value 15 1915 16 1915
6 6
and vary month from min to max
14 Enter year and day as nominal value 15 1915 16 1915
11 11
and vary month from min to max
15 Enter year and day as nominal value 15 1915 16 1915
12 12
and vary month from min to max

NextDate Boundary Value test cases (day=1 to 31)


Case Input Data Expected Output Actual output Status
Description Comment
Id month day year month day year month day year
1 Enter day and month as nominal value and 16
7 15 1812 7 1812
vary year from min to max
Enter day and month as nominal value and 7 15 7 16
2 1813 1813
vary year from min to max
Enter day and month as nominal value and 7 15 7 16
3 1915 1915
vary year from min to max
Enter day and month as nominal value and 7 15 7 16
4 2018 2018
vary year from min to max
Enter year and month as nominal value 7 15 7 16
5 2019 2019
and vary day from min to max

Dept. of ISE 2022 Page 25


Software Testing Lab Manual RNSIT

Enter year and month as nominal value 7 1 7 2


6 1915 1915
and vary day from min to max
Enter year and month as nominal value 7 2 1915 7 3 1915
7
and vary day from min to max
Enter year and month as nominal value 7 15 1915 7 16 1915
8
and vary day from min to max
Enter year and month as nominal value 7 30 1915 7 31 1915
9
and vary day from min to max
Enter year and month as nominal value 7 31 1915 8 1 1915
10
and vary day from min to max
11 Enter year and day as nominal value and 15 1915 16 1915
1 1
vary month from min to max
12 Enter year and day as nominal value and 15 1915 16 1915
2 2
vary month from min to max
13 Enter year and day as nominal value and 15 1915 16 1915
7 7
vary month from min to max
14 Enter year and day as nominal value and 15 1915 16 1915
11 11
vary month from min to max
15 Enter year and day as nominal value and 15 1915 16 1915
12 12
vary month from min to max

NextDate Worst case Test Cases


Input Data Expected Output Actual output
Case Id Description Status Comment
Month day year Month day year Month day year

1 Enter the min value month, day and year 1 1 1812 1 2 1812
Enter the min+1 value for year and min for
2 month and day 1 1 1813 1 2 1813
Enter the normal value for year and min
3 for month and day 1 1 1915 1 2 1915
Enter the max -1 value for year and min
4 for month and day 1 1 2018 1 2 2018

Dept. of ISE 2022 Page 26


Software Testing Lab Manual RNSIT

Enter the max value for year and min for


5 month and day 1 1 2019 1 2 2019
Enter the min+1 value of day and min for
6 month and year 1 2 1812 1 3 1812
Enter the min+1 value for day and year
7 and min for month 1 2 1813 1 3 1813
Enter the min+1 value for day , normal
8 value for year and min value for month 1 2 1915 1 3 1915
Enter the min+1 value for day , max -1
9 value for year and min value for month 1 2 2018 1 3 2018
Enter the min+1 value for day , max value
10 for year and min value for month 1 2 2019 1 3 2019
Enter the normal value of day and min for
11 year and month 1 15 1812 1 16 1812
Enter the normal value for day and min+1
12 for year and min for month 1 15 1813 1 16 1813
Enter the normal value for day , normal
13 value for year and min value for month 1 15 1915 1 16 1915
Enter the normal value for day , max -1
14 value for year and min value for month 1 15 2018 1 16 2018
Enter the normal value for day , max
15 value for year and min value for month 1 15 2019 1 16 2019
Enter the max - 1 value of day and min for
16 day and year 1 30 1812 1 31 1812
Enter the max -1 value for day and min
17 for month and min+1 for year 1 30 1813 1 31 1813
Enter the max - 1 value for day , normal
18 value for year and min value for month 1 30 1915 1 31 1915
Enter the max - 1 value for day , max -1
19 value for year and min value for month 1 30 2018 1 31 2018

Dept. of ISE 2022 Page 27


Software Testing Lab Manual RNSIT

Enter the max -1 value for day , max


20 value for year and min value for month 1 30 2019 1 31 2019
Enter the max value of day and min for
21 year and month 1 31 1812 2 1 1812
Enter the max value for day and min for
22 month and min + 1 for year 1 31 1813 2 1 1813
Enter the max value for day , normal
23 value for year and min value for month 1 31 1915 2 1 1915
Enter the max value for day , max -1 value
for year and min value for month
24 1 31 2018 2 1 2018
Enter the max value for day , max value
25 for year and min value for month 1 31 2019 2 1 2019

NextDate Special value test cases


Input Data Expected Output Actual output Status
Case Id Description Comment
month day year month day year month day year

Should display the


Enter the valid value for month, day and message value of the
1 12 31 1811
year year not in range
1812..2019
Enter the valid value for month, day and
2 12 31 2018 1 1 2019
year
Should display the
Enter the valid value for month, day and
3 12 31 2019 message Next year is out
year
of boundary 2019
Enter the valid value for month, day and
4 2 28 1900
year 3 01 1900
Enter the valid value for month, day and 3 01 2014
5 2 28 2014
year

Dept. of ISE 2022 Page 28


Software Testing Lab Manual RNSIT

Enter the valid value for month, day and


6 2 29 2012
year 3 01 2012
Should display the
Enter the valid value for month, day and message value of the
7 2 29 2020
year year not in range
1812..2019
Enter the valid value for month, day and
8 2 28 2012 2 29 2012
year
Enter the valid value for month, day and
9 2 28 2000 2 29 2000
year
Enter the valid value for month, day and
10 2 29 2000
year 3 01 2000

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3

CO1 ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

Dept. of ISE 2022 Page 29


Software Testing Lab Manual RNSIT
Program 2, 5 and 8 (Boundary, Equivalence and Decision Table for Commission
Problem)
/* 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 that could be
sold in a month is 70 locks, 80 stocks and 90 barrels. Commission on sales = 10 % on sales <=
1000 and 15 % on 1001 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("\n enter 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 the range 1..70 ", temp);
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;

Dept. of ISE 2020 Page 9


Software Testing Lab Manual RNSIT
if(temp>80)
printf("new total stocks =%d not in the range 1..80 ", 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 the range 1..90 ", temp);
else
tbarrels=temp;
}
printf("total barrels=%d", tbarrels);
printf("\n enter the number of locks and to exit the loop enter -1 for locks \n");
scanf("%d", &locks);
}
printf("\n total locks = %d\n total stocks =%d\n total barrels =%d\n", tlocks, tstocks, tbarrels);
sales = lprice*tlocks + sprice*tstocks + bprice*tbarrels;
printf("\n the 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.0);
}
else
comm=0.10*sales;
printf("the commission is=%f\n", comm);
}
else
printf("there is no sales\n");
return 0;
}

Dept. of ISE 2020 Page 10


Software Testing Lab Manual RNSIT

Test Case Name : Boundary Value for Commission Problem


Experiment Number : 2
Test data : price for lock = 45.0 , stock = 30.0 and barrel = 25.0
sales = total locks * lock price + total stocks * stock price + total barrels * barrel price
commission : 10% up to sales Rs 1000 , 15 % for the next Rs 800 and 20 % on any sales in excess of 1800
Pre-condition : lock = -1 to exit and 1< =lock < = 70 , 1<=stock <=80 and 1<=barrel<=90
Brief Description: The salesperson had to sell at least one complete rifle per month.

Commission Problem Boundary Value Analysis Test Cases


Expected
Case Input Data Output Actual output
Description
Id Total Total Total Comm- Comm-
Locks Stocks Barrels Sales ission Sales ission Status Comment
Set locks and stocks as nominal value and vary
1 barrels value. 35 40 1 2800
Set locks and stocks as nominal value and vary
2 barrels value. 35 40 2 2825
Set locks and stocks as nominal value and vary
3 barrels value. 35 40 45 3900
Set locks and stocks as nominal value and vary
4 barrels value. 35 40 89 5000
Set locks and stocks as nominal value and vary
5 barrels value. 35 40 90 5025
Set locks and barrels as nominal value and vary
6 stocks value 35 1 45 2730
Set locks and barrels as nominal value and vary
7 stocks value 35 2 45 2760
Set locks and barrels as nominal value and vary
8 stocks value 35 40 45 3900
Set locks and barrels as nominal value and vary
9 stocks value 35 79 45 5070
Set locks and barrels as nominal value and vary
10 stocks value 35 80 45 5100

Dept. of ISE 2020 Page 11


Software Testing Lab Manual RNSIT

Set stocks and barrels as nominal value and vary


11 locks value 1 40 45 2370
Set stocks and barrels as nominal value and vary
12 locks value 2 40 45 2415
Set stocks and barrels as nominal value and vary
13 locks value 35 40 45 3900
Set stocks and barrels as nominal value and vary
14 locks value 69 40 45 5430
Set stocks and barrels as nominal value and vary
15 locks value 70 40 45 5475

Commission Problem Output Boundary Value Analysis Test Cases


Input Data Expected Output Actual output
Case Total
Description Total Comm- Comm- Status
Id Total Stocks Barr Sales Sales Comment
Locks ission ission
els
Enter the min value for locks, stocks and
1 barrels 1 1 1 100 10 output minimum
2 1 1 2 125 12.5 output minimum +
Enter the min value for 2 items and min +1
3 1 2 1 130 13 output minimum +
for any one item
4 2 1 1 145 14.5 output minimum +
Enter the value sales approximately mid
5 value between 100 to 1000 5 5 5 500 50 Midpoint
6 Enter the values to calculate the 10 10 9 975 97.5 Border point -
7 commission for 10 9 10 970 97 Border point -
sales nearly less than 1000
8 9 10 10 955 95.5 Border point -

9 Enter the values sales exactly equal to 1000 10 10 10 1000 100 Border point

Dept. of ISE 2020 Page 12


Software Testing Lab Manual RNSIT

10 Enter the values to calculate the 10 10 11 1025 103.75 Border point +


11 commission for sales nearly greater than 10 11 10 1030 104.5 Border point +
1000
12 11 10 10 1045 106.75 Border point +
Enter the value sales approximately mid
14 14 14 1400 160 Midpoint
13 value between 1000 to 1800
14 18 18 17 1775 216.25 Border point -
Enter the values to calculate the
15 commission for sales nearly less than 1800 18 17 18 1770 215.5 Border point -
16 17 18 18 1755 213.25 Border point -
17 Enter the values sales exactly equal to 1800 18 18 18 1800 220 Border point
18 Enter the values to calculate the 18 18 19 1825 225 Border point +
19 commission for sales nearly greater than 18 19 18 1830 226 Border point +
1800
20 19 18 18 1845 229 Border point +
Enter the value sales approximately mid
48 48 48 4800 820 Midpoint
21 value between 1800 to 7800
22 70 80 89 7775 1415 Output maximum -
Enter the max value for 2 items and max - 1
23 for any one item 70 79 90 7770 1414 Output maximum -
24 69 80 90 7755 1411 Output maximum -
Enter the max value for locks, stocks and
70 80 90 7800 1420 Output maximum
25 barrels

Dept. of ISE 2020 Page 13


Software Testing Lab Manual RNSIT

Output Special Value Test Cases


Expected
Case Input Data Output Actual output
Description
Id Total Total Total Comm- Comm
Sales Sales Status Comment
Locks Stocks Barrels ission -ission
Enter the random values such that to calculate
1 11 10 8 995 99.5 Border point -
commission for sales nearly less than 1000
Enter the random values such that to calculate
2 10 11 9 1005 100.75 Border point +
commission for sales nearly greater than 1000
Enter the random values such that to calculate
3 18 17 19 1795 219.25 Border point -
commission for sales nearly less than 1800
Enter the random values such that to calculate
4 18 19 17 1805 221 Border point +
commission for sales nearly greater than 1800

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3

CO1        

Dept. of ISE 2020 Page 14


Software Testing Lab Manual RNSIT
Test Case Name :Equivalence Class Analysis for triangle problem
Experiment Number : 4
Test Data: Enter the 3 Integer Value ( a, b and c )
Pre-condition : 1 ≤ a ≤ 10, 1 ≤ b ≤ 10 and 1 ≤ c ≤ 10 and 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

Triangle Problem - Equivalence Class Test cases


Weak and Strong Normal Equivalence class Testing
Case Input Data
Description Expected Output Actual Output Status Comments
Id a b C
WN1 Should display the message Equilateral
Enter the nom value for a , b and c 5 5 5
/SN1 triangle
WN2 Should display the message Isosceles
Enter the valid value for a , b and c 2 2 3
/SN2 triangle
WN3 Should display the message Scalene
Enter the valid value for a , b and c 3 4 5
/SN3 triangle
WN4 Message should be displayed can't form a
Enter the valid value for a , b and c 4 1 2
/SN4 triangle

Weak Robust Equivalence Class Testing


Enter one invalid input and two valid Should display value of a is not in the
WR1 -1 5 5
value for a , b and c range of permitted values
Enter one invalid input and two valid Should display value of b is not in the
WR2 5 -1 5
value for a , b and c range of permitted values
Enter one invalid input and two valid Should display value of c is not in the
WR3 5 5 -1
value for a , b and c range of permitted values
Enter one invalid input and two valid Should display value of a is not in the
WR4 11 5 5
value for a , b and c range of permitted values
Enter one invalid input and two valid Should display value of b is not in the
WR5 5 11 5
value for a , b and c range of permitted values
Enter one invalid input and two valid Should display value of c is not in the
WR6 5 5 11
value for a , b and c range of permitted values
Dept. of ISE 2022-2023 Page 7
Software Testing Lab Manual RNSIT

Strong Robust Equivalence class Testing


Enter one invalid input and two Should display value of a is not in the
SR1 -1 5 5 range of permitted values
valid value for a , b and c

Enter one invalid input and two Should display value of b is not in the
SR2 5 -1 5 range of permitted values
valid value for a , b and c

Enter one invalid input and two Should display value of c is not in the
SR3 5 5 -1 range of permitted values
valid value for a , b and c

Enter two invalid input and one Should display value of a and b are not in
SR4 -1 -1 5
valid value for a , b and c the range of permitted values

SR5 Enter two invalid input and one Should display value of b and c are not in
5 -1 -1
valid value for a , b and c the range of permitted values

SR6 Enter two invalid input and one Should display value of a and c are not in
-1 5 -1
valid value for a , b and c the range of permitted values
Should display value of a, b and c are not
SR7 Enter all invalid inputs -1 -1 -1 in the range of permitted values

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3

CO2        

Dept. of ISE 2022-2023 Page 8

You might also like