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

Software Testing (Anurag)

Uploaded by

abhinavpaul54
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Software Testing (Anurag)

Uploaded by

abhinavpaul54
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Anurag IT-1 01413203120

SOFTWARE TESTING
PRACTICAL FILE

Bachelor of Technology in
Information Technology

Anurag

IT-1
(01413203120)

Guru Tegh Bahadur Institute of Technology


(Guru Gobind Singh Indraprastha University)
(Year 2020-2024)
Anurag IT-1 01413203120

INDEX

S.No AIM OF EXPERIMENT SIGNATURE


1 To determine the nature of roots of a quadratic equations, its input is
triple of +ve integers (say x,y,z) and values may be from
interval[1,100] the program output may have one of the following:-
[Not a Quadratic equations, Real roots, Imaginary roots, Equal roots]
Perform BVA.
2 To determine the type of triangle. Its input is triple of +ve integers
(say x,y,z) and the values may be from interval[1,100].The program
output may be one of the following [Scalene, Isosceles, Equilateral,
Not a Triangle].
Perform BVA

3 Perform robust case testing on Problem No. 1.

4 Perform robust case testing on Problem No. 2

5 To determine the area of the circle, triangle, square and rectangle


and write test cases by performing equivalence class testing.
6 To develop a program for determination of previous date.
1<=months<=12
1<=day<=31
1900<=year<=2025
The possible outputs are ‘previous date’ and ‘Invalid date’. Perform
decision table based testing and design the test cases.
7 To determine the values of x raise to y and design test cases by
performing decision table based testing on it.
8 Perform decision table based testing for the same problem as in
question no.2
9 To determine the three sides of the triangle ,its input will be +ve
integers greater than 0 and less than or equal to 100.Show that they
form scalene ,isosceles, or equilateral triangle and design the test
cases by using cause effect graphing testing technique.

10 Make a case study on static and dynamic testing tools.


Anurag IT-1 01413203120

EXPERIMENT – 1
Aim: To determine the nature of roots of a Quadratic Equation, its
input is triple of positive integers (say a, b, c) and values may be from
interval [1, 100]. The output may have one of the following:
Real & Distinct Roots, Imaginary Roots or Real & Equal Roots.
Design the Boundary Value Test Cases.

Algorithm:

 Take 3 inputs from the user for the quadratic equation.


 Check whether they lie in the given interval.
 If the condition is false, stop the program and exit.
 Else if condition is true, check the nature of the roots.
 If the Discriminant is greater than 0, Real & Distinct Roots.
 If the Discriminant is less than 0, Imaginary Roots.
 If the Discriminant is equal to 0, Real & Equal Roots.
 According to the formula 4n+1, there will be 13 test cases, where n is
number of inputs.

Program:
#include <iostream>
#include <math.h>

using namespace std;

int bva(int, int, int);

int main()
{
int min, max;
int x, y, z;
cout << "Enter Range : ";
cin >> min >> max;
if (min < 0 || max > 100)
{
cout << "Invalid Range";
return 0;
}
int nominal = (min + max) / 2;
int values[] = {min, min + 1, nominal, max - 1, max};
cout << "a\tb\tc\tOutput\t\t\tRoots" << endl;
for (int i = 0; i < 5; i++)
{
Anurag IT-1 01413203120

bva(values[i], nominal, nominal);


}

for (int i = 0; i < 5; i++)


{
if (values[i] != nominal)
bva(nominal, values[i], nominal);
}
for (int i = 0; i < 5; i++)
{
if (values[i] != nominal)
bva(nominal, nominal, values[i]);
}

cout << "Enter the Coefficients (a, b, c) : ";


cin >> x >> y >> z;
cout << "a\tb\tc\tOutput\t\t\tRoots" << endl;
bva(x, y, z);
return 0;
}

int bva(int a, int b, int c)


{
if (a == 0)
{
cout << "Not a Quadratic Equation\n";
return 0;
}
int d = b * b - 4 * a * c;
double sqrt_val = sqrt(abs(d));
cout << a << "\t" << b << "\t" << c << "\t";
if (d < 0)
{
cout << "Imaginary Roots\t\t";
cout << -(double)b / (2 * a) << "+i" << sqrt_val << ", ";
cout << -(double)b / (2 * a) << "-i" << sqrt_val << endl;
}
else if (d == 0)
{
cout << "Real and Equal\t\t";
cout << -(double)b / (2 * a) << endl;
}
else
{
cout << "Real and Distinct\t";
cout << (double)(-b + sqrt_val) / (2 * a);
cout << ", " << (double)(-b - sqrt_val) / (2 * a) << endl;
Anurag IT-1 01413203120

}
return 0;
}

Boundary Value Analysis:


Range: [1, 100]
Domain: Minimum: 1
Above Minimum: 2
Nominal: 50
Below Maximum: 99
Maximum: 100
Output:
Anurag IT-1 01413203120

EXPERIMENT – 2
Aim: To determine the type of triangle. Its input is triple of positive
integers (say x, y, z) and the values may be from interval [1,100]. The
program output may be one of the following [Scalene, Isosceles,
Equilateral, Not a Triangle].
Algorithm:

 Take 3 inputs (sides of triangle) from user.


 Check if triangle is valid or not.
 If valid, check the type of triangle.
Program:
#include<iostream>
using namespace std;

int isTriangle(int a, int b, int c)


{
if ((a + b <= c) || (a + c <= b) || (b + c <= a))
return false;
else
return true;
}

int main()
{
int side1, side2, side3;

cout << "\nPlease Enter Three Sides of a Triangle = ";


cin >> side1 >> side2 >> side3;

if(isTriangle(side1, side2, side3) == false)


{
cout << "\nNot A Triangle" << endl;
return 0;
}

if (side1 == side2 && side2 == side3)


{
cout << "\nThis is an Equilateral Triangle";
}
else if (side1 == side2 || side2 == side3 || side1 == side3)
{
cout << "\nThis is an Isosceles Triangle";
}
else
cout << "\nThis is a Scalene Triangle";

return 0;
}
Anurag IT-1 01413203120

Outputs
Anurag IT-1 01413203120

Boundary Value Analysis:

Range: R [1, 100]

Domain: Minimum = 1
Above Minimum = 2
Nominal = 50
Below Maximum = 99
Maximum = 100
Test Id A B C Expected Output Program Output Tested
Outcome
1 1 50 50 Isosceles Triangle Isosceles Triangle Pass
2 2 50 50 Isosceles Triangle Isosceles Triangle Pass
3 99 50 50 Isosceles Triangle Isosceles Triangle Pass
4 100 50 50 Not A Triangle Not A Triangle Pass
5 50 1 50 Isosceles Triangle Isosceles Triangle Pass
6 50 2 50 Isosceles Triangle Isosceles Triangle Pass
7 50 99 50 Isosceles Triangle Isosceles Triangle Pass
8 50 100 50 Not A Triangle Not A Triangle Pass
9 50 50 1 Isosceles Triangle Isosceles Triangle Pass
10 50 50 2 Isosceles Triangle Isosceles Triangle Pass
11 50 50 99 Isosceles Triangle Isosceles Triangle Pass
12 50 50 100 Not A Triangle Not A Triangle Pass
13 50 50 50 Equilateral Triangle Equilateral Triangle Pass
Anurag IT-1 01413203120

EXPERIMENT – 3
Aim: To determine the nature of roots of a quadratic equations, its inputis
triple of +ve integers (say x,y,z) and values may be from interval[1,10] the
program output may have one of the following

[Not a Quadratic equations, Real roots, Imaginary roots, Equal roots]

Perform Robust Case Testing

Program:

#include <iostream>
#include <math.h>

using namespace std;

int bva(int, int, int);

int main()
{
int min, max;
int x, y, z;
cout << "Enter Range : ";
cin >> min >> max;
if (min < 0 || max > 100)
{
cout << "Invalid Range";
return 0;
}
int nominal = (min + max) / 2;
int values[] = {min, min + 1, nominal, max - 1, max};
cout << "a\tb\tc\tOutput\t\t\tRoots" << endl;
for (int i = 0; i < 5; i++)
{
bva(values[i], nominal, nominal);
}

for (int i = 0; i < 5; i++)


{
if (values[i] != nominal)
bva(nominal, values[i], nominal);
}
for (int i = 0; i < 5; i++)
{
if (values[i] != nominal)
Anurag IT-1 01413203120

bva(nominal, nominal, values[i]);


}

cout << "Enter the Coefficients (a, b, c) : ";


cin >> x >> y >> z;
cout << "a\tb\tc\tOutput\t\t\tRoots" << endl;
bva(x, y, z);
return 0;
}

int bva(int a, int b, int c)


{
if (a == 0)
{
cout << "Not a Quadratic Equation\n";
return 0;
}
int d = b * b - 4 * a * c;
double sqrt_val = sqrt(abs(d));
cout << a << "\t" << b << "\t" << c << "\t";
if (d < 0)
{
cout << "Imaginary Roots\t\t";
cout << -(double)b / (2 * a) << "+i" << sqrt_val << ", ";
cout << -(double)b / (2 * a) << "-i" << sqrt_val << endl;
}
else if (d == 0)
{
cout << "Real and Equal\t\t";
cout << -(double)b / (2 * a) << endl;
}
else
{
cout << "Real and Distinct\t";
cout << (double)(-b + sqrt_val) / (2 * a);
cout << ", " << (double)(-b - sqrt_val) / (2 * a) << endl;
}
return 0;
}
Anurag IT-1 01413203120

Robust Case Analysis

Test Id A B C Expected Output Produced Tested


Output Outcome
1 -1 5 5 Real Equal Real Equal Pass
2 0 5 5 Not Quadratic Not Quadratic Pass
3 1 5 5 Real Real Pass
4 2 5 5 Imaginary Imaginary Pass
5 20 5 5 Imaginary Imaginary Pass
6 11 2 5 Real Equal Real Equal Pass
7 1 -1 5 Real Equal Real Equal Pass
8 1 0 5 Imaginary Imaginary Pass
9 1 1 5 Imaginary Imaginary Pass
10 1 0 5 Imaginary Imaginary Pass
11 1 10 5 Real Real Pass
12 1 11 -1 Not Valid Not Valid Pass
13 1 5 0 Not Valid Not Valid Pass
14 1 5 0 Real Real Pass
15 1 5 1 Real Real Pass
16 1 5 0 Imaginary Imaginary Pass
17 1 5 10 Imaginary Imaginary Pass
18 1 5 11 Not Valid Not Valid Pass
19 1 5 5 Imaginary Imaginary Pass

Output:
Anurag IT-1 01413203120

EXPERIMENT - 4
Aim: To write a program for classification of a triangle amongst right
angled triangle, acute angled triangle, obtuse angled triangle or invalid
and testing Range is [0,100].
Algorithm:

 Take 3 inputs (sides of triangle) from user.


 Check if triangle is valid or not.
 If valid, check the type of triangle.
Program:
#include<iostream>
#include<algorithm>
using namespace std;

int isTriangle(int a, int b, int c){


if ((a + b <= c) || (a + c <= b) || (b + c <= a))
return false;
else
return true;
}

int main()
{
int a, b, c;

cout << "\nPlease Enter Three Sides of a Triangle = ";


cin >> a >> b >> c;

if(isTriangle(a, b, c) == false)
{
cout << "\nNot A Triangle" << endl;
return 0;
}

int A[] = {a, b, c};


sort(A, A+3);

int s1 = A[0];
int s2 = A[1];
int s3 = A[2];

if (s1*s1 + s2*s2 == s3*s3)


cout << "\nThis is a Right Angled Triangle";
else if (s1*s1 + s2*s2 > s3*s3)
cout << "\nThis is an Acute Angled Triangle";
else if (s1*s1 + s2*s2 < s3*s3)
cout << "\nThis is an Obtuse Angled Triangle";

return 0;
}
Anurag IT-1 01413203120

Outputs
Anurag IT-1 01413203120

Robust Testing:
Range: R [1, 100]
Domain: Below Minimum = 0
Minimum = 1
Above Minimum = 2
Nominal = 50
Below Maximum = 99
Maximum = 100
Above Maximum = 101

Test Id A B C Expected Output Program Output Tested


Outcome
1 1 50 50 Acute Angled Acute Angled Pass
2 2 50 50 Acute Angled Acute Angled Pass
3 99 50 50 Obtuse Angled Obtuse Angled Pass
4 100 50 50 Not A Triangle Not A Triangle Pass
5 50 1 50 Acute Angled Acute Angled Pass
6 50 2 50 Acute Angled Acute Angled Pass
7 50 99 50 Obtuse Angled Obtuse Angled Pass
8 50 100 50 Not A Triangle Not A Triangle Pass
9 50 50 1 Acute Angled Acute Angled Pass
10 50 50 2 Acute Angled Acute Angled Pass
11 50 50 99 Obtuse Angled Obtuse Angled Pass
12 50 50 100 Not A Triangle Not A Triangle Pass
13 0 50 50 Not A Triangle Not A Triangle Pass
14 101 50 50 Not A Triangle Not A Triangle Pass
15 50 0 50 Not A Triangle Not A Triangle Pass
16 50 101 50 Not A Triangle Not A Triangle Pass
17 50 50 0 Not A Triangle Not A Triangle Pass
18 50 50 101 Not A Triangle Not A Triangle Pass
19 50 50 50 Acute Angled Acute Angled Pass
Anurag IT-1 01413203120

EXPERIMENT - 5
Aim: To determine the area of the circle, triangle, square and rectangle
and write test cases by performing equivalence class testing.

Program:
#include <iostream>

#include <conio.h>

#include <math.h>

using namespace std;

void main()

clrscr();

int ch;

char c;

float, b, h, a;

1: cout<<“Enter your choice”;

cout<<“n1.Triangle”;

cout<<“n2.Square”;

cout<<“n3.Rectangle”;

cout<<“n4.Circle”;

cout<<“n5.Exitn”;

cin>>ch;

switch(ch)

{ case 1 : b: cout<<“nEnter the base of the triangle (1-200)”;

cin>>b;

if ((b<=0)||(b>200))

{ cout<<“nInvalid entry for base n”;

goto b;

h: cout<<“nEnter the height of the triangle (1-200)”;cin>>h;

if ((h<=0)||(h>200))
Anurag IT-1 01413203120

{ cout<<“nInvalid height nEnter the height (1-200)”;

goto h;

a= 0.5*b*h;

cout<<“nThe area is “<<a; <=”” font=””></a;>

cout<<“nWant to enter more?(y/n) “;

cin>>c;

if((c==’y’)||(c==’Y’))

goto 1;

break

case 2 : s: cout<<“nEnter the side of the square (1-200)”;

cin>>b;

if ((b<=0)||(b>200))

{ cout<<“nInvalid entry for base n”;

goto s;

a= b*b;

cout<<“nThe area is “<<a; <=”” font=””></a;>

cout<<“nWant to enter more?(y/n) “;

cin>>c;

if((c==’y’)||(c==’Y’))

goto 1;

break;

case 3: d: cout<<“nEnter the base of the triangle (1-200)” ;

cin>>b;

if((b<=0)||(b>200))

( cout<<“nInvalid entry for base n”;

goto d;

p: cout<<“nEnter the height of the triangle (1-200) “;

cin>>h;
Anurag IT-1 01413203120

if ((h<=0)||(h>200))

{ cout<<“nInvalid height nEnter the height(1-200)”;

goto p;

a=b*h;

cout<<“nThe area is “<<a; <=”” font=””></a;>

cout<<“nWant to enter more?(y/n) “;

cin>>c;

if((c==’y’)||(c==’Y’))

goto 1;

break;

case 4: t: cout<<“nEnter the radius of the circle “;

cin>>b;

if ((b<=0)||(b>200))

{ cout<<“nInvalid entry for base n”;

goto t;

a= 3.14*b*b;

cout<<“nThe area is “<<a; <=”” font=””></a;>

cout<<“nWant to enter more?(y/n)”;

cin>>c;

if ((c==’y’)||(c==’Y’))

goto 1;

break;

case 5: exit(0);

break;

default : cout<<“n WRONG CHOICE”;

goto 1;

getch();}
Anurag IT-1 01413203120

Test Cases:

Case 1: Triangle

Input Domain:

I1 = {h : h<=0}

I2 = {h : h>200}

I3 = {h : 1<=h<=200}

I4 = {b : b<=0}

I5 = {b : b>200}

I6 = {b : 1<=b<=2001}

Test Cases for the Case of Triangle are as under:

Test Case ID h b Expected Output


1 0 100 Invalid Input

2 100 100 5000

3 201 100 Invalid Input

4 100 0 Invalid Input

5 100 100 5000

6 100 201 Invalid Input


Output Domain:

O1 = {: Triangle if h > 0, b > 0}

O2 = {: Not a triangle if h <= 0, b <= 0}

Screenshot of output with Inputs of Triangle is as under:


Anurag IT-1 01413203120

Case 2: Square

Input Domain:

I1 = {s : s<=0}

I2 = {s : s>200}

I3 = {s : 1<=s<=200}

Test Cases for the Case of Square are as under:

Test Case ID s Expected Output


1 0 Invalid Input
Anurag IT-1 01413203120

2 100 10000

3 201 Invalid Input


Output Domain:

O1 = {: Square if s>}

O2 = {: Not a square if s <= 0}

Screenshot of output with Inputs of Square is as under:

Case 3: Rectangle

Input Domain:

I1 = {l : l<=0}

I2 = {l : l>200}

I3 = {l : 1<=l<=200}

I4 = {b : b<=0}

I5 = {b : b>200}
Anurag IT-1 01413203120

I6 = {b : 1<=b<=200}

Test Cases for the Case of Rectangle are as under:

Test Case ID l b Expected Output


1 0 100 Invalid Input

2 100 100 10000

3 201 100 Invalid Input

4 100 0 Invalid Input

5 100 100 10000

6 100 201 Invalid Input

Screenshot of output with Inputs of Rectangle is as under:

Case 4: Circle

Input Domain:

I1 = {r : r<=0}

I2 = {r : r>200}
Anurag IT-1 01413203120

I3 = {r : 1<=r<=200}

Test Cases for the Case of Circle are as under:

Test Case ID r Expected Output


1 0 Invalid Input

2 100 31400

3 201 Invalid Input


Output Domain:

O1 = {: Circle if 1<=r<=200}

O2 = {: Not a Circle if r <= 0}

Screenshot of output with Inputs of Circle is as under:


Anurag IT-1 01413203120

EXPERIMENT - 6
Aim: Consider a program for determining the Previous Date. Its input is
triple of Day, Month and Year with values in the range:
1 ≤ Day ≤ 31
1 ≤ Month ≤ 12
1900 ≤ Year ≤ 2025
Possible outputs would be Previous Date or Invalid Date. Design the
Boundary Value Test Cases.
Algorithm:

 Take 3 inputs from the user for Day, Month and Year.
 Check whether they lie in the given intervals.
 If the condition is false, stop the program and exit.
 If the condition is true, calculate the date according to the given values.
 Subtract 1 day from it to get the Previous Date.
 According to the formula 4n+1, there will be 13 test cases, where n is
number of inputs.

Program:

#include <iostream>
using namespace std;
void bva(int, int, int);
int main()
{ int amin, amax, bmin, bmax, cmin, cmax;
int x, y, z;
cout << "Enter Range for Day : ";
cin >> amin >> amax;
cout << "Enter Range for Month : ";
cin >> bmin >> bmax;
cout << "Enter Range for Year : ";
cin >> cmin >> cmax;
if (amin < 1 || amax > 31)
{
cout << "Invalid Day Range";
return 0;
}
if (bmin < 1 || bmax > 12)
{
cout << "Invalid Month Range";
return 0;
}
if (cmin < 1900 || amax > 2025)
Anurag IT-1 01413203120

{
cout << "Invalid Year Range";
return 0;
}

int anominal = (amin + amax) / 2;


int avalues[] = {amin, amin + 1, anominal, amax - 1, amax};
int bnominal = (bmin + bmax) / 2;
int bvalues[] = {bmin, bmin + 1, bnominal, bmax - 1, bmax};
int cnominal = (cmin + cmax) / 2;
int cvalues[] = {cmin, cmin + 1, cnominal, cmax - 1, cmax};
cout << "Day\tMonth\tYear\tExpected Output" << endl;
for (int i = 0; i < 5; i++)
bva(avalues[i], bnominal, cnominal);
for (int i = 0; i < 5; i++)
bva(anominal, bvalues[i], cnominal);
for (int i = 0; i < 5; i++)
bva(anominal, bnominal, cvalues[i]);
cout << "Enter the Day, Month and Year : ";
cin >> x >> y >> z;
cout << "Day\tMonth\tYear\tExpected Output" << endl;
bva(x, y, z);
return 0;
}

void bva(int a, int b, int c)


{
cout << a << "\t" << b << "\t" << c << "\t";
if (a != 1)
{
if ((b == 2 || b == 4 || b == 6 || b == 9 || b == 11) & (a == 31))
cout << "Invalid Date" << endl;
else if ((b == 2) & (a == 30))
cout << "Invalid Date" << endl;
else if ((b == 2) & (a == 29) & (c % 4 != 0))
cout << "Invalid Date" << endl;
else
cout << a - 1 << "-" << b << "-" << c << endl;
}
else
{
if (b == 3)
{
if (c % 4 == 0)
a = 29;
else
a = 28;
}
Anurag IT-1 01413203120

cout << a << "-" << b - 1 << "-" << c << endl;
}
}

Boundary Value Analysis:

Range: R [1, 31] [1, 12] [1900, 2025]

Domain: Minimum = 1, 1, 1900


Above Minimum = 2, 2, 1901
Nominal = 16, 6, 1962
Below Maximum = 30, 11, 2024
Maximum: 31, 12, 2025

Output
Anurag IT-1 01413203120

EXPERIMENT – 7
Aim: Write a program in C/C++ to compute ab and perform its decision
table-based testing.
Source Code:
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
int base, expo;

cout<<"Enter Base and Exponent: ";


cin>>base>>expo;

cout<< base << "^" << expo << " = " << pow(base, expo);

return 0;
}

Output:

Test Cases for decision table based testing are:

Test Cases A B Expected O/P


1 2 3 Positive Result
2 -1 3 Negative Result
3 -2 -4 Positive Result
4 0 1 Result is 0
5 0 0 Domain Error
6 -1 -0.6 Result is 1
Anurag IT-1 01413203120

Decision Table:
Anurag IT-1 01413203120

EXPERIMENT - 8
AIM: WAP in C/C++ to compute 3 sides of a triangle and to determine
whether they form scalene, isosceles, or equilateral triangle and
perform Cause effect testing, Decision table-based testing and
Equivalence Class testing

Code:
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c,result;
printf("\n\tEnter the values of a, b and c : = ");
scanf("\t%d %d %d", &a,&b,&c);
if(((a+b)>c)&&((b+c)>a)&&((c+a)>b))
{
if((a==b)&&(b==c))
printf("\n\t It is an Equilatral Triangle");
else if((a==b)||(b==c)||(c==a))
printf("\n\t It is an isosceles Triangle");
else
printf("\n\t It is a Scalene Triangle");
}
else
printf("\n\t not a triangle");
getch();
}

OUTPUT:
Anurag IT-1 01413203120

Decision Table Based Test Cases


Anurag IT-1 01413203120

EXPERIMENT - 9
AIM: WAP in C/C++ to compute 3 sides of a triangle and to determine
whether they form scalene, isosceles, or equilateral triangle and
perform Cause effect testing, Decision table-based testing and
Equivalence Class testing

Code:
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c,result;
printf("\n\tEnter the values of a, b and c : = ");
scanf("\t%d %d %d", &a,&b,&c);
if(((a+b)>c)&&((b+c)>a)&&((c+a)>b))
{
if((a==b)&&(b==c))
printf("\n\t It is an Equilatral Triangle");
else if((a==b)||(b==c)||(c==a))
printf("\n\t It is an isosceles Triangle");
else
printf("\n\t It is a Scalene Triangle");
}
else
printf("\n\t not a triangle");
getch();
}

OUTPUT:
Anurag IT-1 01413203120

Cause effect testing

The causes are:


c1: side x is less than sum of sides y and z c2:
side y is less than sum of sides x and y c3:
side z is less than sum of sides x and y c4:
side x is equal to side y
c5: side x is equal to side z
c6: side y is equal to side
and effects are
e1: Not a triangle
e2: Scalene triangle
e3: Isosceles triangle
e4: Equilateral triangle
e5: Impossible stage
Anurag IT-1 01413203120

Cause effect graph


Anurag IT-1 01413203120

EXPERIMENT - 10
Aim: Make a case study on static and dynamic testing tools

Static Testing Tools


Static testing is a software testing method that involves the examination of a
program, along with any associated documents, but does not require the
program to be executed. Dynamic testing, the other main categoryof
software testing, involves interaction with the program while it runs. The two
methods are frequently used together to try to ensure the basic functionalities
of a program.
Some of the well-known Static Testing Tools are: Check Style, SourceMeter
and Soot.

Dynamic Testing Tools:


AddressSanitizer:
An important dynamic testing/analysis tool, AddressSanitizer is also known as
ASan.
It is an effective memory error detector for C/C++ that helps find stack buffer
overflow, global buffer overflow, heap buffer overflow, memory leaks,
initialization of order bugs, among others.
It is a fast tool that consists of a compiler instrumentation module as well as
a runtime library, which replaces malloc function.
BoundsChecker:
A part of MicroFocus’ DevPartner, BoundsChecker offers assistance in
automatically detecting defects in the software code, identifying memory leaks,
as well as performance bottlenecks.
It is find the source of application instability, like heap and stack corruption,
overruns, and API overuse.
BoundsChecker finds memory errors in Windows based applications.

Daikon:
Diacon is an open source dynamic testing tool that detects likely invariants
of a program.
It can be used to detect invariants in C, C++, Java, Perl programs, and more.
The biggest advantage of this tool is that it is easily extendable to other
applications.

You might also like