Harsh Stqa
Harsh Stqa
ETCS – 453
2019-2023
1 Experiment-1: 21/09/2022
Introduction to software testing
2 Experiment-2: 28/09/2022
Write a program to determine the type of triangle,
its
input is triple positive integers (say a, b, c) and
the values may be from
the interval [1,100]. The program output may
be one of the following
[Scalene, Isosceles, Equilateral, not a triangle].
A) Perform BVA.
B) Perform worst-case testing.
3 Experiment-3: 12/10/2022
Write a program to find the roots of the quadratic
equation, its input is triple positive integers (say
a, b, c) and the values may be from the interval
[1,100] and perform BVA & ROBUST
TESTING.
4 Experiment-4: 19/10/2022
Write a program to find the largest among three
numbers, its input is triple positive integers (say
a, b, c) and the values may be from the interval
[1,100] and perform BVA & ROBUST
TESTING
5 Experiment-5: 02/11/2022
WAP in C/C++ to find the area of a circle,
Triangle, Square and Rectangle and perform
equivalence class testing.
6 Experiment-6: 09/11/2022
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
7 Experiment-7: 16/11/2022
Write a program in C/C++ to compute ab
and perform its decision tablebased testing
8 Experiment-8: 23/11/2022
WAP in C/C++ to compute previous
date, given the present date as input
and perform decision table-based
testing
9 Experiment-9: 07/12/2022
Create a test plan document for any
application (e.g. Library Management
System).
10 Experiment-10: 14/12/2022
Study of any open source testing tool(Open
STA)
11 Experiment-11: 21/12/2022
Study of any Test Management Tool(QA
Complete)
12 Experiment-12: 28/12/2022
Automated the Test cases using Test
Automation Tool(Using QA Complete)
EXPERIMENT 1
Introduction
Software Testing is the process of identifying the accuracy and quality
of the software product and service under test. Software testing is
nothing but an art of investigating software to ensure that its quality
under test is in line with the requirement of the client. Software testing
is carried out in a systematic manner with the intent of finding defects
in a system. It is required for evaluating the system.
2.Security:
It is another crucial point because software testing should not be taken
into consideration. Personal details of the user can be safe. Users can
receive products that are free from vulnerability with the aid of
software testing.
Limitation of testing
●Exhaustive (total) testing is impossible in present scenario.
●Time and budget constraints normally require very careful planning
of the testing effort.
●Compromise between thoroughness and budget.
●Test results are used to make business decisions for release dates.
●Even if you do find the last bug, you’ll never know it
●You will run out of time before you run out of test cases
●You cannot test every path
●You cannot test every valid input
●You cannot test every invalid input
Quality assurance and quality factor:
Quality Assurance is also known as QA Testing. QA is defined as an
activity to ensure that an organization is providing the best product or
service to the customers. Quality Assurance is a systematic way of
creating an environment to ensure that the software product being
developed meets the quality requirements. This process is controlled
and determined at the managerial level. It is a preventive process whose
aim is to establish the correct methodology and standard to provide a
quality environment to the product being developed. Quality Assurance
focuses on process standard, projects audit, and procedures for
development. QA is also known as a set of activities designed to
evaluate the process by which products are manufactured.
2.Reliability
It is defined as the capability of the software to perform under specific
conditions for a specified duration.
3.Usability
Usability of software is defined as its ease of use. Quality of the
software is also identified as how easily a user can understand the
functions of the software and how much efforts are required to follow
the features.
4.Efficiency
The efficiency of the software is dependent on the architecture and
coding practice followed during development.
5.Maintainability
Maintainability is also one of the significant factors to define the
quality of the software. It refers to identify the fault and fix in the
software. It should be stable when the changes are made.
6.Portability
Portability of the software, defined as how easily a system adapts to
changes in the specifications. Quality of the software is also determined
by the portability of the system how easy it is to install the software and
how easy it is to replace a component of the order in a given
environment.
8.Quality Instruments
The control and calibration of tools used to measure quality are integral
to the success of a QMS. The QMS system design within an
organization should dictate a clear policy for the maintenance of quality
instruments based on nationally or internationally recognized standards
for each piece of quality equipment.
9.Document Control
The definition of a document in a quality-driven organization is broad,
according to ISO. It includes all records of:
●Communications
●Evidence
●QMS Conformity
●Knowledge Sharing
EXPERIMENT 2
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
10 1 50 50 Isosceles
11 2 50 50 Isosceles
12 99 50 50 Isosceles
Aim: Write a program to find the roots of the quadratic equation, its
input is triple positive integers (say a, b, c) and the values may be from
the interval [1,100] and perform BVA & ROBUST TESTING.
Test Cases: -
1 1 50 50 Real Roots
2 2 50 50 Real Roots
3 50 50 50 Imaginary Roots
4 99 50 50 Imaginary Roots
6 50 1 50 Imaginary Roots
7 50 2 50 Imaginary Roots
8 50 99 50 Imaginary Roots
10 50 50 1 Real Roots
11 50 50 2 Real Roots
12 50 50 99 Imaginary Roots
1 0 50 50 Invalid INPUT
2 1 50 50 Real Roots
3 2 50 50 Real Roots
4 50 50 50 Imaginary Roots
5 99 50 50 Imaginary Roots
8 50 0 50 Invalid INPUT
9 50 1 50 Imaginary Roots
10 50 2 50 Imaginary Roots
11 50 99 50 Imaginary Roots
14 50 50 0 Invalid INPUT
15 50 50 1 Real Roots
16 50 50 2 Real Roots
17 50 50 99 Imaginary Roots
18 50 50 100 Imaginary Roots
19 50 50 101 Invalid INPUT
EXPERIMENT 4
Aim: Write a program to find the largest among three numbers, its input
is triple positive integers (say a, b, c) and the values may be from the
interval [1,100] and perform BVA & ROBUST TESTING
Code:
#include <stdio.h> int main()
{
int A, B, C;
printf("\n\tEnter three numbers: "); scanf("\n\t%d %d %d", &A, &B,
&C);
if( A<1 || B<1 || C<1 || A>100 || B>100 || C>100 )
printf("\n\t INVALID Input"); else
{
if (A >= B && A >= C)
printf("\n\t%d is the largest number.", A);
else if (B >= A && B >= C)
printf("\n\t%dis the largest number.", B);
else
printf("\n\t%d is the largest number.", C);
}
return 0;
}
BVA for nature of roots of a quadratic equation
Test Cases: -
Output:
ROBUST for nature of roots of a quadratic equation
Test Cases: -
Test Cases a b c Expected Output
1 0 50 50 Invalid INPUT
2 1 50 50 50
3 2 50 50 50
4 50 50 50 50
5 99 50 50 99
6 100 50 50 100
7 101 50 50 Invalid INPUT
8 50 0 50 Invalid INPUT
9 50 1 50 50
10 50 2 50 50
11 50 99 50 99
12 50 100 50 100
13 50 101 50 Invalid INPUT
14 50 50 0 Invalid INPUT
15 50 50 1 50
16 50 50 2 50
17 50 50 99 99
18 50 50 100 100
19 50 50 101 Invalid INPUT
EXPERIMENT 5
Aim: WAP in C/C++ to find the area of a circle, Triangle, Square and
Rectangle and perform equivalence class testing.
Code:
#include <iostream> using namespace std;
int main()
{
int ch; char c;
float b, h, a;
cout<<"\n\tEnter your choice"; cout<<"\n\t1.Triangle";
cout<<"\n\t2.Square"; cout<<"\n\t3.Rectangle"; cout<<"\n\t4.Circle";
cout<<"\n\t5.Exit";
cin>>ch;
switch(ch)
{
case 1 :
b: cout<<"\n\tEnter the base of the triangle (1-100)"; cin>>b;
if ((b<=0)||(b>100))
{
cout<<"\n\tInvalid entry for base\n"; goto b;
}
h: cout<<"\n\tEnter the height of the triangle (1-100)"; cin>>h;
if ((h<=0)||(h>100))
{
cout<<"\n\tInvalid height for height\n"; goto h;
}
a= 0.5*b*h;
cout<<"\n\tThe area is "<<a; break;
case 2 :
s: cout<<"\n\tEnter the side of the square (1-100)"; cin>>b;
if ((b<=0)||(b>100))
{
cout<<"\n\tInvalid entry for base \n"; goto s;
}
a= b*b;
cout<<"\n\tThe area is "<<a; break;
case 3:
d: cout<<"\n\tEnter the base of the triangle (1-100)" ; cin>>b;
if((b<=0)||(b>100))
{
cout<<"\n\tInvalid entry for base\n "; goto d;
}
p: cout<<"\n\tEnter the height of the triangle (1-100) ";
cin>>h;
if ((h<=0)||(h>100))
{
cout<<"\n\tInvalid height for height\n"; goto p;
}
a=b*h;
cout<<"\n\tThe area is "<<a; break;
case 4:
t: cout<<"\n\tEnter the radius of the circle "; cin>>b;
if ((b<=0)||(b>100))
{
cout<<"\n\tInvalid entry for base\n "; goto t;
}
a= 3.14*b*b; cout<<"\n\tThe area is "<<a; break;
case 5: exit(0); break;
default : cout<<"\n\t WRONG CHOICE";
}
return 0;
}
Case 1: Triangle
Input Domain:
I1 = {h : h<=0} I2 = {h : h>100}
I3 = {h : 1<=h<=100} I4 = {b : b<=0}
I5 = {b : b>100}
I6 = {b : 1<=b<=1001}
Test Cases for the Case of Triangle are as under:
2 50 50 1250
4 50 0 Invalid Input
5 50 50 1250
Output Domain:
O1 = {: Triangle if h > 0, b > 0}
O2 = {: Not a triangle if h <= 0, b <= 0}
Output:
Case 2: Square
Input Domain:
I1 = {s : s<=0}
I2 = {s : s>100}
I3 = {s : 1<=s<=100}
Test Cases for the Case of Square are as under:
Test Case ID S Expected Output
1 0 Invalid Input
2 50 2500
3 101 Invalid Input
Output Domain:
O1 = {: Square if s>}
O2 = {: Not a square if s <= 0}
Output:
Case 3: Rectangle
Input Domain:
I1 = {l : l<=0} I2 = {l : l>100}
I3 = {l : 1<=l<=100} I4 = {b : b<=0}
I5 = {b : b>100}
I6 = {b : 1<=b<=100}
Test Cases for the Case of Rectangle are as under
Test Case ID L b Expected Output
1 0 50 Invalid Input
2 50 50 2500
3 101 50 Invalid Input
4 50 0 Invalid Input
5 50 50 2500
6 50 101 Invalid Input
Output:
Case 4: Circle
Input Domain:
I1 = {r : r<=0} I2 = {r : r>100}
I3 = {r : 1<=r<=100}
Test Cases for the Case of Circle are as under:
Test Case ID R Expected Output
1 0 Invalid Input
2 50 7850
3 101 Invalid Input
Output Domain:
O1 = {: Circle if 1<=r<=100}
O2 = {: Not a Circle if r <= 0}
Output:
EXPERIMENT 6
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:
Code-
#include<bits/stdc++.h>
using namespace std; int
main(){
int t;
cout<<"How many times you wish to run ?";
cin>>t;
while(t-){
int a,b;
cout<<"enter value of a ";
cin>>a;
cout<<endl<<"enter value of b ";
cin>>b;
float c=pow(a,b);
cout<<c<<endl;
}
return 0;
}
Conditions
C1:a = 0,b = 0
C2:a = -ve, b =+ve
C3:a = +ve, b = -ve
C4:a = -ve, b = -ve
C5:a = +ve, b = +ve
C6:a = 0, b = integer
C7:b = 0, a = integer
C8:a = -ve, b = -ve odd
Actions
A1: Domain Error
A2: Negative Output
A3: Output = 1
A4: Positive Output
A5: Output = 0
OUTPUT-
Test Case Table
S.No. A B Output
1 2 3 +ve result
2 -1 3 -ve result
3 -2 -4 +ve result
4 0 1 Result is 0
5 0 0 Domain error
6 -1 -0.6 Result is 1
EXPERIMENT – 8
AIM: WAP in C/C++ to compute previous date, given the present date as input
and perform decision table-based testing
Code:
#include <iostream>
using namespace std;
int main()
{
int dd,mm,yy;
int a=0;
cout<<"\n\tEnter Date:";
cin>>dd;
cout<<"\n\tEnter Month:";
cin>>mm;
cout<<"\n\tEnter Year:";
cin>>yy;
if(yy>=1900 && yy<=9999)
{
//check month
if(mm>=1 && mm<=12)
{
//check days
if((dd>=1 && dd<=31) && (mm==1 || mm==3 || mm==5 || mm==7 || mm==8 ||
mm==10 || mm==12))
a=1;
else if((dd>=1 && dd<=30) && (mm==4 || mm==6 || mm==9 || mm==11))
a=1;
else if((dd>=1 && dd<=28) && (mm==2))
a=1;
else if(dd==29 && mm==2 && (yy%400==0 ||(yy%4==0 && yy%100!=0)))
a=1;
else
a=0;}
else
{
a=0;
}}
else
{a=0;}
if(a==0)
cout<<"\n\tImpossible";
else
{getPrevDate(&dd,&mm, &yy);
cout<<endl<<"\tPrevious date : "<<dd<<"/"<<mm<<"/"<<yy;}
return 0;
}
Decision Table Based Test Cases
Test Cases: -
Output:
EXPERIMENT – 9
AIM - Create a test plan document for any application (e.g. Library Management
System).
The goal of this document is to develop a test plan for the Online Book
Store design system. This document defines all the procedures and
activities required to prepare for testing of the functionalities of the
system which are specified in Vision document. The objectives of the test
plan are to define the activities to perform testing, define the test
deliverables documents and to identify the various risks and
contingencies involved in testing.
2. Features to be tested
USER:
Registration
Login
Add To Cart
Edit Cart
ADMIN:
Create and Delete book from Category
Create and Delete a Category
Manage Orders
Manage Members
3. Test Cases
3.1 USER
Registration
ID TEST CASE USER INPUT PASS CRITERIA
U_REG_4 User User enters all the details User account created
Registration successfully
Login
ID TEST USER INPUT PASS CRITERIA
CASE
Add to Cart
ID TEST USER INPUT PASS CRITERIA
CASE
U_AC_1 Add to User selects a book and clicks Book is added to the
Cart add to cart button shopping cart
U_AC_2 Add to Guest selects a book and clicks User should create an
Cart add to cart button account.
Edit Cart
ID TEST USER INPUT PASS CRITERIA
CASE
U_EC_1 Edit Cart User changes the Quantity Quantity and total cost of Cart
should be updated
U_EC_2 Edit Cart User deletes a book from Books and total cost of Cart
shopping Cart should be updated
U_EC_3 Edit Cart User selects a new book to Books and total cost of Cart
shopping Cart should be updated
3.2 ADMIN
AD_CDB_1 Create and Delete a Admin adds a new Book should be updated
Book from book to category in Categories list
Category
Manage Orders
ID TEST CASE ADMIN INPUT PASS CRITERIA
Manage Members
ID TEST CASE ADMIN INPUT PASS CRITERIA
AD_MM_1 Manage Members Admin accepts Members Member is accepted
4. Approach
This section describes the overall approach of the testing which ensures that the each feature
and the combination of the features are adequately tested. The major tasks that are used are
4.1 Unit testing
Unit testing is a method of testing that verifies the individual units of source code are
working properly. The goal of unit testing is to isolate each part of the program and show
that the individual parts are correct. The NUnit a testing tool for C#, will be used for unit
testing.
4.2 Load testing
Load testing is the process of creating demand on a system or device and measuring its
response. It generally refers to the practice of modeling the expected usage of a software
program by simulating multiple users accessing the program concurrently. As such, this
testing is most relevant for multi-user systems; often one built using a client/server model,
such as web servers
4.3 System Testing
Once the entire system has been built then it has to be tested against the Software
Requirement Specification and System Specification to check if it delivers the features
required. System testing can involve a number of specialist types of test to see if all the
functional and non-functional requirements have been met.
4.4 Performance Testing
The system should meet the performance requirements as mentioned in the Vision document.
The performance will be evaluated based on the response time of the GUI and the database
commands. Using JMETER tool performance testing will be done.
4.5 Manual Testing
Manual Testing will be done to ensure the correctness of various parts of the code using test
cases generated by the tester.
5. Pass/fail criteria
The system should satisfy all the functional requirements, in the Vision document. Each
feature to be tested will be evaluated against its requirement as stated in the Vision
Document. The pass or fail of a test depends on whether the system meets with all the
particular post conditions.
Test cases executed on the Online Book Store will pass if they meet the specific
requirements as mentioned in the Vision Document.
7. Test deliverables
The following documents are the available test deliverables:-
• Test plan
• Test case specifications
• Test input and output data
• Test procedure specifications
• Test logs
EXPERIMENT - 10
AIM: Study of Any Testing Tool (Win Runner).
INTRODUCTION:
HP Win Runner software was an automated functional GUI testing tool that allowed a user to
record and play back user interface (UI) interactions as test scripts.
As a functional test suite, it worked with HP Quick Test Professional and supported
enterprise quality assurance. It captured, verified and replayed user interactions
automatically, in order to identify defects and determine whether business processes worked
as designed. The software implemented a proprietary Test Script Language (TSL) that
allowed customization and parameterization of user input.
HP Win Runner was originally written by Mercury Interactive. Mercury Interactive was
subsequently acquired by Hewlett Packard (HP) in 2006. On February 15, 2008, HP Software
Division announced the end of support for HP Win Runner versions 7.5, 7.6, 8.0, 8.2, 9.2—
suggesting migration to HP Functional Testing software as a replacement.
3. Edit Script - Depends on corresponding manual test, test engineer inserts check
points in to that record script.
4. Run Script - During test script execution, win runner compare tester given expected
values and application actual values and returns results.
5. Analyse Results - Tester analyses the tool given results to concentrate on defect
tracking if required.
When you finish any test in WinRunner, WinRunner displays the results in a report
format.
The report logs the general information about the test run.ie, date, operator mode and
total run time. Also, the report details all the major events that occurred during the run,
such as checkpoints, error messages, system messages, or user messages.
A mismatch can be found in the report panel by seeing the actual result and the expected
result. If a test run fails due to a defect in the application being tested, you can report
information about the defect directly from the Test Results window.
This information is sent via e-mail to the quality assurance manager, who tracks the
defect until it is fixed.
Step 1: Open a new document: File -> New (or) Select "New Test" from the
WinRunner's Welcome screen.
Step 4: Select the application to be tested by clicking on the application's title bar.
The procedure for saving the GUI map file in Global GUI map file mode is
as follows:
Step 1: Record a test case by following the preceding procedure.
Step 2: Open the GUI Map Editor window as shown in Fig. Tools -> GUI Map Editor.
Step 3: On selecting the GUI Map Editor. The screen as shown in figure is displayed.
Step 4: Save the GUI Map file.
File -> Save As
A File dialog appears and you need to enter the filename.
INTRODUCTION
QA Complete is a Test management tool that can be used for both
manual and automated Testing. It is a tool with powerful test
management capabilities that allow us to track all aspects of
software quality in an efficient manner. QA Complete supports all
aspects of test process and ensures the delivery of high quality
software.
Benefits
Step 7: If any of the steps fail in a Test Set during the run, it
prompts to create a defect automatically
Stop Services -> Manage -> Add -> Fill in the details -> Click OK
Step 3: Select the Synchronization Profile -> Manage -> Edit ->
Settings -> Set the Synchronization
Step 6: Navigate to the Field Mapping tab and select the desired
fields to synchronize the corresponding data in JIRA
Introduction
QA Complete is a test management tool that can be used for both
manual and automated testing. It is a tool with powerful test
management capabilities that allow us to track all aspects of software
quality in an efficient manner. QA Complete supports all aspects of
test process and ensures the delivery of high-quality software.
Benefits
1. QA Complete can be integrated with any number of tools
2. Customizable as per the tester’s needs
3. Requirements and tests can be traced to defect effectively
4. Reports and dashboards are the key features of QA Complete
Features
1. Test case management – simple test case structuring also allows for
focused metrics and clear status report
2. Test environment management – various environments are linked
to individual test cases for effective test coverage across different
platforms, operating systems, and devices
3. Defect and issue management – mainly tracks the resolution
process of bugs for each release and automatically creates bugs
when test cases fail
4. Test automation integration – can be integrated with various
automation tools, and it allows us to track and report overall
(manual and automated) test management efforts at a single place
5. Bug tracker integration – can be integrated with various bug tracking tools
6. Shared documents – stores all test documents in one central
location to improve collaboration
Steps to Setup and Work on QA Complete
To manage and produce the right test deliverables, let us assume an e-
work sight login page needs to be tested manually. The following
steps and screenshots will explain how we can manage the test
deliverables using QA Complete test management tool.
Step 1: Log into QA Complete Tool
Step 2: Create a new release as e-work under the release tab by
clicking the add new icon and click the add new item to add an
iteration/build.
Step 3: Navigate to the test management tab -> test library -> add new folder.
Step 4: Navigate to test management tab -> test sets -> create a folder
(add the ‘+’ @ left panel) -> create a new test set using the add new
icon -> after entering the details click the submit button -> navigate to
the tests tab and design the steps accordingly.
Step 5: To run the test sets -> test management tool ->
test sets -> click the run icon.
Step 6: Click the start run at the top right corner. Based on the
working functionality, select the run status and click the End-Run
option finally.
Step 7: If any of the steps fail in a test set during the run, it
prompts to create a defect automatically.
Conclusion
QA Complete test management tool might be of great use to the
QA team in producing effective deliverables at the right time.