Professional Documents
Culture Documents
QUALITY ASSURANCE
AIM
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.
THEORY
A quadratic Equation ax2+bx+c=0 with input as three positive integers a,b,c having
values ranging from interval [1,100].
We consider the values as 1(Minimum), 2(just above Minimum), 50(Nominal), 99(Just above
Maximum) , 100(Maximum)
#include<conio.h>
void main( )
clrscr( );
int a,b,c,d;
cin>>a;
b:"; cin>>b;
"; cin>>c;
d = (b*b)-4*a*c; if((a<0)||(b<0)||(c<0)||(a>100)||
if(a==0)
else if(d==0)
else if(d<0)
cout<<"Imaginary roots";
else
cout<<"Real roots";
getch();
}
EXPERIMENT NO. 2
Aim:
To determine the type of triangle.Input is a triple +ve integers , Values may be between x,y,z
Theory :
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 Isosceles
SOUCE CODE
#include<iostream.h>
#include<conio.h>
void main()
int a,b,c;
clrscr();
cin>>a>>b>>c;
else
getch();
}
OUTPUT
EXPERIMENT NO.3
Aim:
Theory:
Robustness testing is any quality assurance methodology focused on testing the robustness of
software. It has also been used to describe the process of verifying the correctness of test cases in
a test process.
It is a extention of boundary value analysis. Here , we went to go outside the legitimate boundary
of input domain.
There are four additional test cases which are outside the legitimate input domain.
1 -1 50 50 Invalid input
2 0 50 50 Not quadratic eqn
3 1 50 50 Real Roots
4 50 50 50 Imaginary Roots
5 99 50 50 Imaginary Roots
6 100 50 50 Imaginary Roots
7 101 50 50 Invalid input
8 50 -1 50 Invalid input
9 50 0 50 Imaginary Roots
10 50 1 50 Imaginary Roots
11 50 99 50 Imaginary Roots
12 50 100 50 Equal Roots
13 50 101 50 Invalid input
14 50 50 -1 Invalid input
15 50 50 0 Real Roots
16 50 50 1 Real Roots
17 50 50 99 Imaginary Roots
18 50 50 100 Imaginary Roots
19 50 50 101 Invalid input
Source Code:
#include <iostream.h>
#include <math.h>
#include <conio.h>
void main() {
imaginaryPart; clrscr();
if (discriminant > 0) {
else if (discriminant == 0) {
else {
realPart = -b/(2*a);
imaginaryPart =sqrt(-discriminant)/(2*a);
cout << "x1 = " << realPart << "+" << imaginaryPart << "i" <<
endl; cout << "x2 = " << realPart << "-" << imaginaryPart << "i" <<
endl;
getch();
}
EXPERIMENT NO. 4
AIM
#include<conio.h>
#include<iostream.h>
void main()
clrscr();
int a,b,c;
cin>>a;
cin>>b;
cin>>c; if(a<1||b<1||c<1||a>100||
b>100||c>100)
cout<<"not a triangle!\n";
else
if((a==b)&&(b==c)&&(c==a))
if((a==b)&&(b!=c))
if((a!=b)&&(b!=c)&&(c!=a))
cout<<"the triangle is scalene\n";
}
getch();
}
OUTPUT
EXPERIMENT NO. 5
1ABCD
2ABCD
3ABCD
4ABCD
5ABCD
6ABCD
7ABCD
The program should display the seat pattern, with an ‘X’ marking the seats already
assigned. After displaying the seats available, the program prompts the seat desired, the
user types in a seat, and then the display of available seats is updated. This continues until
all seats are filled or until the user signals that the program should end. If the user types in
a seat that is already assigned, the program should say that the seat is occupied and ask for
another choice.
SOURCE CODE:
#include <bits/stdc++.h>
using namespace std;
if(count==28)
return 1;
return 0;
}
//to display the sits
void display(char arr[7][5]){
for(int i=0;i<7;i++){
for(int j=0;j<5;j++){
cout<<arr[i][j]<<" ";
}
cout<<endl;
}
return;
}
return p;
}
int row=-1,col=-1;
//find the row no of the user sit
for(int i=0;i<7;i++){
if(arr[i][0]==s[0])
row=i;
}
//find the column no of user sit
for(int j=0;j<5;j++){
if(arr[row][j]==s[1])
col=j;
}
//check whether sit is already occupied or not.
if(col==-1){
cout<<"Seat is already occupied\n";
return 0;
}
else{
//if it's a valid sit & not occupied,
//process the requested & update the sit as occupied
update(arr,row,col);
}
return 1;
}
int main()
{
//2-D array for storing sit number
char arr[7][5];
for(int i=0;i<7;i++){
//forst column is row number
arr[i][0]=i+1+'0';
for(int j=1;j<5;j++){
//to represent sit number A,B,C,D respectively arr[i]
[j]='A'+j-1;
}
}
return 0;
}
EXPERIMENT NO. 6
AIM
Test the program of triangle using Decision Table Testing.
THEORY
A Decision Table Testing is a good way to deal with different combination of inputs
which produce different results. It is also called Cause-Effect Table. It provides a
systematic way of stating complex business rules, which is useful for developers as well
as for testers. Decision tables can be used in test design as they help testers to explore
the effects of combinations of different inputs.
A decision table is basically an outstanding technique used in both testing and
requirements management. It is a structured exercise to prepare requirements when
dealing with complex business rules.
ADVANTAGES
1. Any complex business flow can be easily converted into the
test scenarios & test cases using this technique.
2. It provide complete coverage of test cases which help to reduce the
rework on writing test scenarios & test cases.
3. These tables guarantee that we consider every possible combination of
condition values. This is known as its “completeness property”.
4. Simple to understand and everyone can use this method to design the
test scenarios and test cases.
C1: x < y+z? O T T T T T T T T T T
C2: y < y+z? F T T T T T T T T T
C3: z < x+y? F T T T T T T T T
C4: x = y? T T T T F F F F
C5: y = z? T T F F T T F F
C6: x = z? T F T F T F T F
O1: Not a T T T
triangle
O2: Scalene T
O3: Isosceles T T T
O4: T
Equilateral
O5: T T T
Impossible
Test Cases:
Inputs:
C1: Side x is less than sum of sides of y & z.
C2: Side y is less than sum of sides of x & z.
C3: Side z is less than sum of sides of x & y.
C4: x < y
C5: x < z
C6: y < z
Outputs:
O1: Not a triangle
O2: Scalene triangle
O3: Isosceles triangle
O4: Equilateral triangle
O5: Impossible stage
Test Case Side ‘a’ Side ‘b’ Side ‘c’ Output
1 50 50 0 Invalid Input
2 50 50 1 Isosceles
3 50 50 50 Equilateral
4 50 100 1 Scalene
5 50 99 50 Isosceles
6 50 50 50 Isosceles
7 50 100 50 Not a triangle
Source Code:
#include<conio.h>
#inclde<iostream.h>
void main(){
clrscr();
int a,b,c;
cout<<”enter the value of a:\n”;
cin>>a;
cout<<”enter the value of b:\n”;
cin>>b;
cout<<”enter the value of c:\n”;
cin>>c; if(a<1||b<1||c<1||a>100||b>100||
c>100){ cout<<”not a triangle\n”;
}
else{ if((a==b)&&(b==c)&&(c==a)
) cout<<”the triangle is
equilateral\ n”;
if((a==b)&&(b!=c))
cout<<”the triangle is isosceles\n”;
if((a!=b)&&(b!=c)&&(c!=a))
cout<<”the triangle is scalene\n”;
}
getch();
}
OUTPUT
EXPERIMENT NO. 7
Aim
Write a program for a triangle problem using weak Robust Equivalence class Testing.
Theory
Test Case ID side ‘a’ side ‘b’ side ‘c’ Expected Output
WR1 1 50 50 Invalid value of a
WR2 50 -1 50 Invalid value of b
WR3 50 50 -1 Invalid value of c
WR4 201 50 50 Out of Range
value of a
WR5 50 201 50 Out of Range
value of b
WR6 50 50 201 Out of Range
value of c
WR7 5 100 5 Isosceles
WR8 100 5 200 Scalene
WR9 50 50 5 Equilateral
Source Code
#include<iostream.h>
#include<conio.h>
void main(){
clrscr();
int a, b, c;
cin>>a;
b:"<<endl; cin>>b;
cin>>c; if(a<1||b<1||c<1||a>100||b>100||
c>100){
cout<<"Not a triangle"<<endl;
}else{
if((a==b)&&(b==c)&&(a==c))
if((a!=b)&&(b!=c)&&(c!=a))
getch();
}
OUTPUT:
EXPERIMENT NO. 8
AIM: Test the program of previous date using Strong Robust Equivalence Class Testing
THEORY
‘Previous Date’ is a function consisting of three variables like : month(mm), date(dd), year(yyyy).
It returns the date of next day as output. It reads current date as input date.
C1 : 1<=month<=12
C2 : 1<=day<=31
C3 : 1900<=year<=2020
M1 = {month : 1<=month<=12}
D1 = {day : 1<=day<=31}
Y1 = {year : 1900<=year<=2020}
M2 = {month : month<1}
M3 = {month : month>12}
D2 = {day : day<1}
D3 = {day : day>31}
Y2 = {year : year<1900}
Y3 = {year : year>2020}
Test Case ID Month Day Year Expected Output
SR1 -1 15 1912 Invalid value of month
SR2 6 -1 1912 Invalid value of day
SR3 6 15 1809 Invalid value of year
SR4 -1 -1 1900 Invalid value of month
Invalid value of day
SR5 6 -1 1811 Invalid value of day
Invalid Value of year
SR6 -1 15 1811 Invalid value of month
Invalid value of year
SR7 -1 -1 1811 Invalid value of month
Invalid value of day
Invalid value of year
SR8 2 4 2016 Valid values of month, day & year
Source Code
#include<stdio.h>
#include<Conio.h>
of triangle using
Decision Table
Testing void
main()
int d,d1,m,m1,y,y1,flag=0;
clrscr();
printf("\nProgram to find previous date :\n(Date should be entered in the format 'dd mm
yyyy')\n(yyyy should be between 1900-2020)\nEnter the date:");
scanf("%d %d %d", &d,&m,&y);
d1=d;
m1=m;
y1=y;
if(d<1||d>31)
if((d>=1 && d<=31) && (m>=1 && m<=12) && (y>=1900 && y<=2020))
flag=1; if(m==5||m==7||m==10||
m==12)
if(d==1)
{ d1=3 0;
m1=m-1;
else
d1=d-1;
else if(m==1||m==2||m==4||m==6||m==8||m==9||
m==11)
if(m==2)
if(d==29)
{
if((y%4==0 && y%100!=0)||y%400==0)
flag=1;
else
printf("Invalid value of
day"); flag=0;
}}
if(d==30||d==31)
printf("\nInvalid value of
day"); flag=0;
}}
if(m==4||m==6||m==9||m==11)
if(d==31)
printf("\nInvalid value of
day"); flag=0;
}}
if(d==1)
{ d1=3 1;
if(m==1)
{ m1=1
2;
y1=y-1;
else
m1=m-1;
}}
else
d1=d-1;}
if(flag==1)
else
if(m==3)
if(d==1)
{ d1=2 9;
m1=m-1;
else
{ d1=2
8;
m1=m-1;
else
d1=d-1;
}}
if(flag==1)
%d",d1,m1,y1);
getch();
}
OUTPUT
EXPERIMENT NO. 9
AIM : Test the program of greatest among two numbers with DD path testing.
Theory
Properties
The program of finding the largest number among the two numbers consist of 11 lines.
STEP 1: GENERATING FLOW GRAPH
1-> 2->3->4->5->6->7->8
|
12<-11<-10<-9->13->14->15
|
17
|
18
|
19
9 DECISION STEP
A
|
B
/ \
C D
\ /
E
|
F
No of Edges :- 6
No of Edges:- 6
SOURCE CODE-
#include<stdio.h.
#include<conio.h>
Void main()
Clrscr();
int a ,b ,big ;
scanf(“%d%d”,&a,&b);
if(a>b)
big =a;
else
big=b;
getch();
}
Next step is to find out independent path using cyclometric complexity :
1. e – n + 2p
= 6–6+2
=2
2. No of Regions = 2
1. ABCEF
2. ABDEF
Test Cases:
ID a b Output
1. 4 3 A is greater
2. 3 4 B is greater
OUTPUT :
Enter two
number : 4 3
Biggest of two number is 4
EXPERIMENT NO. 10
AIM
Create test plan document for any program
THEORY
Test plan reflects our entire project testing schedule and approach. Here, we are going to create
a test plan for Triangle problem tested though boundary value analysis.
1. Introduction
A program has been written for a Triangle problem to check whether the
triangle formed is scalene, isosceles or equilateral. To test this program, we are
using boundary value analysis.
2. Objectives
This test plan will define the strategy that is being used to the test the
program reliability, efficiency etc.
3. Scope
A Triangle problem is being tested to determine whether the triangle formed is
scalene, equilateral or isosceles. Different test cases will be generated that
corresponds to both valid and invalid inputs and outputs.
4. Testing Strategy
Boundary value analysis approach has been used to test the program BVA is a black
box testing in which we are not considering the internal structure. This type of
strategy does not require much knowledge as only boundary values are considered.
This type of strategy will generate 4n+1 test cases.
5. Hardware Requirements
Computers and modems
6. Feature to be tested
As BVA has been used, so there will be total 4n+1 test cases consisting of both valid
and invalid cases. Mainly there will be three features that will be focused - Whether
the triangle is isosceles, scalene or equilateral
8. Pre – conditions
Let us say, the 3 sides of a triangle are
x,y,z Then, x < y + z
y<x+z
z<x+y
9. Roles/Responsibilities
Different roles and responsibilities are performed by different persons. First
verification is done by developers and validation is done by customers.
10. Risks
If the number of variable increase then no. of test cases will definitely increase. Then
it will become impossible to test all possible combinations.
Experiment No. 11
Aim
Theory
QA complete tool is a test management tool that allows you to take a strategic approach to
testing by prioritizing key test functions, accounting for risk, planning for coverage and
controlling test execution.
Key features:
Defect management
QA complete allows you to track states and resolutions process of defects and issues for each
release instead of spending time entering data, QA complete automatically generates a defect
identifiers on fatted test cases, so testers can invert their time in running test.
Reports
Standard
reports
Organized by modules they can be exported to several different formats. Many of these crystals based
reports are right.
Summary report
Great for identification of distribution data.
EXPERIMENT NO. 12
THEORY:
OpenSTA supplies versatile Test development software that enables you to create and run Tests
tailor-made for the environment you are assessing. The contents and structure of a Test will
depend on the type of test you are conducting, the nature of the system you are targeting and the
aims of your performance test.
OpenSTA supports the creation of HTTP/S load Tests that include Scripts which supply the load
element, and may also include Collectors which are used to record additional performance data.
You can also use OpenSTA to develop Collector-only used Tests for monitoring production
environments.
It is possible to use the same Test in both these scenarios.
A Test may include Scripts or Collectors or both. Scripts define the operations performed by Virtual
Users. Collectors define sets of SNMP, NT Performance data or other data to be retrieved during all
or part of a Test-run. They can provide useful information about system activity and the Results can
be analyzed alongside those from other OpenSTA Modules.
The OpenSTA Architecture provides generic facilities that may be used by other OpenSTA
Modules. This chapter describes this architecture and its components.
Overview of HTTP/S Testing
OpenSTA is a distributed testing architecture that enables you to create and run
performance Tests to evaluate Web Application Environments (WAEs) and production
systems. It can be employed at all stages of WAE development as well as being used to
continuously monitor system performance once a WAE goes live.
Use it to develop load Tests that include an HTTP/S load element, known as Scripts, to help assess
the performance of WAEs during development, and to create Collector-only Tests that monitor and
record performance data from live WAEs within a production environment.
Creating Scripts
It involves deciding how you expect clients to use the WaE under test then recording browser
sessions which incorporate this behavior to produce scripts
Modelling scripts
Modeling Scripts enables you to develop realistic Tests and improve the quality of the
Test results produced.
There are extensive modeling options available within Script Modeler that can help you to develop
realistic performance Tests. When you are familiar with the structure of Scripts and in particular
the SCL code they are written in, you will be well equipped to model them. SCL is a simple
scripting language that gives you control over the Scripts you create. It enables you to model
Scripts to accurately simulate the Web activity and to generate the load levels you need against
target WAEs when a Test is run.
Creating collectors
It involves deciding which host computers or other devices to collect performances data
form and the type of data to collect during a test run.
Creating tests
It involves creating the scripts and collectors you want to include in them then select the scripts and
collectors you need from the repository window and add them one at atime to test.
Running a test enables you to initiate real and user web activity and accurately simulate the test
conditions you want in order to generate the level of load required against target WAE’s
Displaying Results
Running a test then displaying the results enables you to analyze and assesses whether WAE’s will
be able to meet the processing demands that will be placed on them.
Scripts form the content of an HTTP /S performance test using HTTP /S load.
All scripts are stored in the repository from where they can be included by reference
into multiple tests.
Script Modeller supplies versatile script creation and modeling functionality use the menu bar
and right click menu options to create and model scripts.