Examples of Boundary Value software Testing with calculator

Last modified on January 7th, 2019 at 8:58 am

[insert_php]

$svar1=0;
$evar1=0;
$svar2=0;
$evar2=0;

[/insert_php]


 

BVT on 2 variables

 

Enter the starting value of var1 :
Enter the ending value of var1 :

Enter the starting value of var2 :
Enter the ending value of var2 :
[insert_php] if(isset($_POST[‘ok’]))
{
$svar1=$_POST[‘svar1’];
$evar1=$_POST[‘evar1’];
$svar2=$_POST[‘svar2’];
$evar2=$_POST[‘evar2’];
}
[/insert_php] [insert_php]echo “”;echo “”;
echo “”;
echo “”;
echo “”;
echo””;echo “”;
$sv1=$svar1;
echo “”;
$sv2=$svar2;
echo “”;
echo “”;
echo “”;echo “”;
$nominal1= ($svar1+$evar1)/2;echo “”;
$nominal2= ($svar2+$evar2)/2;
echo “”;
echo “”;
echo “”;echo “”;
$sinc1=++$svar1;
echo “”;
$sinc2=++$svar2;
echo “”;
echo “”;
echo””;echo “”;
$ev1=$evar1;
echo “”;
$ev2=$evar2;
echo “”;
echo “”;
echo “”;echo “”;
$edec1=–$evar1;
echo “”;
$edec2=–$evar2;
echo “”;
echo “”;[/insert_php]
X1X2
Min” .$sv1. “” .$sv2. “
Nominal” .$nominal1. “” .$nominal2. “
Min+” .$sinc1.”” .$sinc2. “
Max” .$ev1. “” .$ev2. “
Max-” .$edec1.”” .$edec2. “

we are generating 9 test cases for variable x1 and x2

[insert_php]echo “”;echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;
echo “”;echo “”;
echo “”;
echo “”;
echo “”;echo “”;
echo “”;
[/insert_php]
Test Case NoX1,X2Test Case NoX1,X2Test Case NoX1,X2
1” .$sv1. “,” .$nominal2. “2” .$sinc1. “,” .$nominal2. “3” .$nominal1. “,” .$nominal2. “
4” .$edec1. “,” .$nominal2. “5” .$ev1. “,” .$nominal2. “6” .$sv2. “,” .$nominal1. “
7” .$sinc2. “,” .$nominal1. “8” .$edec2. “,” .$nominal1. “9” .$ev2. “,” .$nominal1. “
Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.