Software Testing Methodologies Lab
Software Testing Methodologies Lab
LABORATORY MANUAL
B.TECH (IVYEAR–I SEM)
(2022‐2023)
Vision
To acknowledge quality education and instill high patterns of discipline making the students
technologically superior and ethically strong which involves the improvement in the quality of life
in human race.
Mission
To achieve and impart holistic technical education using the best of infrastructure, outstanding
technical and teaching expertise to establish the students in to competent and confident engineers.
Evolving the center of excellence through creative and innovative teaching learning practices
for promoting academic achievement to produce internationally accepted competitive and world
class professionals.
PROGRAMME EDUCATIONAL OBJECTIVES (PEOs)
To facilitate the graduates with the ability to visualize, gather information, articulate,
analyze, solve complex problems, and make decisions. These are essential to address the
challenges ofcomplex andcomputation intensiveproblems increasingtheirproductivity.
To facilitate the graduates with the technical skills that prepare them for immediate
employment and pursue certification providing a deeper understanding of the technology in
advanced areas of computer science and related fields, thus encouraging to pursue higher
educationandresearchbasedon their interest.
To facilitate the graduates with the soft skills that include fulfilling the mission, setting
goals, showing self-confidence by communicating effectively, having a positive attitude, get
involved inteam- work, beinga leader, managing their career and their life.
1. Fundamentals and critical knowledge of the Computer System:- Able to Understand the
working principles of the computer System and its components , Applythe knowledge to build,
asses, andanalyze thesoftwareandhardwareaspectsofit .
3. Applications of Computing Domain & Research: Able to use the professional, managerial,
interdisciplinary skill set, and domain specific tools in development processes, identify the
research gaps, and provide innovative solutionstothem.
PROGRAM OUTCOMES (POs)
Engineering Graduates will be able to:
1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design / development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis
of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering
activitieswith an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant
to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities withthe
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multi disciplinary environments.
12. Life- long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
1. Students are advised to come to the laboratory at least 5 minutes before (to the Starting time); those
who come after 5 minutes will not be allowed into the lab.
2. Plan your task properly much before to the commencement, come prepared to the lab with the
synopsis / program / experiment details.
i. Student should enter into the laboratorywith:
ii. Laboratory observation notes with all the details (Problem statement, Aim, Algorithm,
Procedure, Program, Expected Output, etc.,) filled in for the lab session.
iii. Laboratory Record updated up to the last session experiments and other utensils (if
any) neededin the lab.
iv. Proper Dress code and Identity card.
v. Sign in the laboratory login register, write the TIME-IN, and occupy the computer
systemallotted to you by the faculty.
vi. Execute your task in the laboratory, and record the results / output in the lab
observation note book, and get certified by the concerned faculty.
vii. All the students should be polite and cooperative with the laboratory staff, must
maintain the discipline and decency in the laboratory.
viii. Computer labs are established with sophisticated and high end branded systems,
whichshould be utilized properly.
ix. Students / Faculty must keep their mobile phones in SWITCHED OFF mode during
the lab sessions. Misuse of the equipment, misbehaviors with the staff and systems
etc., will attract severe punishment.
x. Students must take the permission of the faculty in case of any urgency to go out; if
anybody found loitering outside the lab / class without permission during working
hourswill be treated seriously and punished appropriately.
xi. Students should LOG OFF/ SHUT DOWN the computer system before he/she leaves
the lab after completing the task (experiment) in all aspects. He/she must ensure the
system / seat is kept properly.
2. 11
A program written in C- language for Matrix Multiplication fails
Introspect thecauses for its failure and write down the possible reasons
for its failure.
3. 14
A program written in C- language for Matrix Addition´Introspect the
causes forits failure and write down the possible reasons for its failure.
4. Take any system (e.g. ATM system) and study its system specifications 16
5. 19
Write the test cases for any known application (e.g. Banking application)
8. Create atestplan document for any application (e.g. Library Management System) 30
11. BUG TRACKING TOOL Study of bug tracking tool (e.g. Bugzilla). 53
SOFTWARE TESTING
EXPERIMENT: 1
NAME OF THE EXPERIMENT: Write program in „C„ language to demonstrate the working of the
following constructs
Objective
To understand the working of do while with different range of values and test cases
#include <stdio.h>
void main (){
int i, n=5,j=0;
clrscr();
printf(“enter a no”);
scanf(“%d”,&i);
do {
if(i%2==0) {
printf("%d", i);
printf("is a even no.");
i++;
else
printf("%d", i);
printf("is a odd no.\n");
i++;
j++; }
} while(i>0&&j<n);
getch();
2 2 is even
number3 is odd
number 4 is
even number5
is odd number
6 is even
number
Test cases:
Objective
To understand the working of while with different range of values and test cases
#include<stdio.h>
#include <conio.h>
void main (){
int i, n=5,j=1;
clrscr();
printf(“enter a no”);
scanf(“%d”,&i);
while (i>0 && j<n)
{ if(i%2==0)
{ printf(“%d”,i);
printf(“is a even number”);
i++;
j++;
}
else{
printf(“%d”,i);
printf(“is a odd number”);
i++;
j++; }
}
2 2 is even number
3 is odd number
4 is even number
5 is odd number
6 is even number
Test cases:
Objective:
To understand the working of if else with different range of values and test cases
#include <conio.h>
void main()
{
int i;
for(i=1 ;i<=5;i++)
{
if( i%2==0)
{
printf("number is even no:%d\n",i);
i++;
}
printf("number is odd no:%d\n",i);
}
getch();
}
Test case no: 3 Test case name: Out of range values testing
Objective
To understand the working of switch with different range of values and test cases
void main() {
int a,b,c;
clrscr();
printf(“1.Add/n 2.Sub /n 3.Mul /n 4.Div /n Enter Your choice”);
scanf(“%d”, &i);
printf(“Enter a,b values”);
scanf(“%d%d”,&a,&b);
switch(i) {
case 1: c=a+b;
printf(“ The sum of a & b is: %d” ,c);
break;
case 2: c=a-b;
printf(“ The Diff of a & b is: %d” ,c);
break;
case 3: c=a*b;
printf(“ The Mul of a & b is: %d” ,c);
break;
case 4: c=a/b;
printf(“ The Div of a & b is: %d” ,c);
break;
default:
printf(“ Enter your choice”);
break;
Output:
Input Output
Enter Ur choice: 1
Enter a, b Values: 3, 2 The sum of a & b is:5
Enter Ur choice: 2
Enter a, b Values: 3, 2 The diff of a & b is: 1
Enter Ur choice: 3
Enter a, b Values: 3, 2 The Mul of a & b is: 6
Enter Ur choice: 4
Enter a, b Values: 3, 2 The Div of a & b is: 1
Test cases:
Input
Expected output Actual output Remarks
Enter Ur choice: 1 Enter
a, b Values: 3, 2
5
Enter Ur choice: 2 Enter
The sum of a & b is:5
a, b Values: 3, 2 Success
Enter Ur choice: 3 Enter
a, b Values: 3, 2 The diff of a & b is: 1
Option: 1
a= 22222222222222
Option: 4
a= 10 & b=0 error fail
Objective:
To understand the working of for with different range of values and test cases
#include <stdio.h>
#include <conio.h>
void main (){
int i;
clrscr();
printf(“enter a no”);
scanf(“%d”,&i);
for(i=1 ;i<=5;i++) {
if(i%2==0) {
printf(“%d”, i);
printf(“ is a even no”);
i++;
}
printf(“%d”, i);
printf(“ is a odd no”); i++;
}
getch();
Output: Enter
no:5
0 is a even no
1 is a odd no
2 is a even no
3 is a odd no
4 is a even no
5 is a odd no
Test cases:
Viva questions:
1. Write a function to swap any two numbers?
2. How can we find out prime numbers from 1 to 50?
10
EXPERIMENT: 2
NAME OF THE EXPERIMENT:Write a C program that uses functions to perform the following:
ii) Multiplication of Two Matrices
#include<stdio.h>
#include<stdlib.h>
int main(){
int a[10][10],b[10][10],mul[10][10],r,c,i,j,k;
system("cls");
printf("enter the number of row=");
scanf("%d",&r);
printf("enter the number of column=");
scanf("%d",&c);
printf("enter the first matrix element=\n");
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("enter the second matrix element=\n");
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
scanf("%d",&b[i][j]);
}
}
printf("multiply of the matrix=\n");
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
mul[i][j]=0;
for(k=0;k<c;k++)
{
mul[i][j]+=a[i][k]*b[k][j];
} }
11
}
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
printf("%d\t",mul[i][j]);
}
printf("\n");
}
return 0;
}
output:
enter the number of row=2
enter the number of
column=2enter the first
matrix element=1 2 3 4
enter the second matrix
element=1 2 3 4
multiply of the
matrix=7 10
15 22
FAILURE CASES:
output:
Enter the size of a: 2 3 Enter the
size of b: 2 3
Matrix multiplication is not possible.
Reason to fail: to do multiplication of matrices the number of columns in matrix ―a[] should
be equalto number of rows in matrix ―b‖.
Enter the size of a: p qEnter
the size of b: q s
Matrix multiplication is not possible.
Reason to fail: to do multiplication of matrices the number of columns in matrix ―a‖ should
be equalto number of rows in matrix ―b‖, and rows & columns should be integer values.
1. Enter the size of a:
Matrix1:1 1 1
1 11 3 3 3 3 3 3
1 11 3 3 3 3 3 3 Success
3 3 3 3 3 3
Matrix2:1 1 1
1 11
1 11
viva questions:
1. syntax for multiplication
2. syntax for matrix multiplication
3. what the logic for matrix multiplication?
EXPERIMENT: 3
NAME OF THE EXPERIMENT: Write a C program that uses functions to perform the following:
ii) Addition of Two Matrices
#include <stdio.h>
int main()
{
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
for (c = 0; c < m;
c++) for (d = 0; d <
n; d++)
scanf("%d", &first[c][d]);
printf("Enter the elements of second
matrix\n");for (c = 0; c < m; c++)
for (d = 0 ; d < n; d++)
scanf("%d",
&second[c][d]);
printf("Sum of entered matrices:-
\n");for (c = 0; c < m; c++) {
for (d = 0 ; d < n; d++) {
sum[c][d] = first[c][d] + second[c][d];
printf("%d\t", sum[c][d]);
}
printf("\n");
}
return 0;
}
output:
enter the number of row=2
enter the number of column=2
enter the first matrix element=
1234
enter the second matrix element=
1234
multiply of the matrix=2
4
6 8
FAILURE CASES:
output:
Enter the size of a: 2 3
Enter the size of b: 2 3
Matrix addition is not possible.
Reason to fail: to do addition of matrices the number of columns in matrix ―a[] should be equal t
number of rows in matrix ―b‖.
Enter the size of a: p q
Enter the size of b: q s
Matrix multiplication is not possible.
Reason to fail: to do addition of matrices the number of columns in matrix ―a‖ should be equal t
number of rows in matrix ―b‖, and rows & columns should be integer values.
Enter the size of a:
Enter the size of b:
Matrix multiplication is not possible.
Reason to fail: to do addition of matrices the number of columns in matrix ―a‖ should be equal tonumb r
of rows in matrix ―b‖, and rows & columns should be integer values.
Enter the size of a:
Enter the size of b:
Matrix multiplication is not possible.
Reason to fail: size of buffer will be not be sufficient to handle this addition.Enter the size of a: -1 -2
Enter the size of b: -2 3
Reason to fail: to do addition of matrices the number ofcolumns in matrix ―a‖ should be equal to
number of rows in matrix ―b‖, and rows& columns should be positive integer values.
EXPERIMENT: 4
NAME OF THE EXPERIMENT: Take any system (e.g. ATM system) and study its systemspecifications
and report the various bugs.
Program:
#include<stdio.h>
#include<conio.h>
unsigned long amount=25000, deposit, withdraw;
int choice, pin, i;
char transaction ='y';
void main()
{
clrscr();
while (pin != 1097)
{
printf("ENTER YOUR PIN NUMBER: ");
scanf("%d", &pin);
if (pin != 1097)
printf("PLEASE ENTER VALID PASSWORD\n");
}
do
{
printf(" Welcome to ATM Service \n");
printf("1. Check Balance\n");
printf("2. Withdraw Cash\n");
printf("3. Deposit Cash\n");
printf("4. Quit\n");
printf("\n\n");
break;
case 2:
printf("\n ENTER THE AMOUNT: ");
scanf("%lu", &withdraw);
if (withdraw % 100 != 0)
{
printf("\n PLEASE ENTER THE AMOUNT IN MULTIPLES OF 100");
}
else if (withdraw >(amount - 1000))
{
printf("\n INSUFFICENT BALANCE");
}
else
{
amount = amount - withdraw;
printf("\n\n PLEASE COLLECT YOUR CASH");
printf("\n YOUR CURRENT BALANCE =RS.%lu", amount);
}
break;
case 3:
printf("\n ENTER THE AMOUNT: ");
scanf("%lu", &deposit);
amount = amount + deposit;
printf(" YOUR BALANCE =RS.%lu", amount);
break;
case 4:
i = 1;
} while (!i);
printf("\n\n THANKS FOR USING OUR ATM SERVICE");
getch();
}
output:
BUG REPORT:
4. Enter sufficient amount to withdraw fromthe account Transaction within the limit.
Expected Result: Cash is dispensed and collect the receipt Actual Result:
Transaction limit exceeded screen is displayed Status : Pass/Fail
5. Amount enter is over the day limit and display screen is displayed.
EXPERIMENT: 5
Write the test cases for any known application (e.g. Banking application)
Banking application
#include <stdio.h>
//#include <conio.h>
#include <string.h>
#include <stdlib.h>
// Structure declaration
struct acc_type
{
char bank_name[20];
char bank_branch[20];
char acc_holder_name[30];
int acc_number;
char acc_holder_address[100];
float available_balance;
};
struct acc_type account[20];
/*
printf("The above structure can be declared using
typedef like below");
}Acc_detail;
Acc_detail account[20];
*/
int num_acc;
void Create_new_account();
void Cash_Deposit();
void Cash_withdrawl();
void Account_information();
void Log_out();
void display_options();
/* main program */
int main()
{
char option;
char f2f[50] = "http://fresh2refresh.com/";
num_acc=0;
while(1)
{
printf("\n***** Welcome to Bank Application *****\n");
printf("\nThis demo program is brought you by %s",f2f);
display_options();
printf("Please enter any options (1/2/3/4/5/6) ");
printf("to continue : ");
option = getch();
printf("%c \n", option);
switch(option)
{
case '1': Create_new_account();
break;
case '2': Cash_Deposit();
break;
case '3': Cash_withdrawl();
break;
case '4': Account_information();
break;
case '5': return 0;
case '6': system("cls");
break;
default : system("cls");
printf("Please enter one of the options");
printf("(1/2/3/4/5/6) to continue \n ");
break;
}
}
return 0;
}
void display_options()
{
printf("\n1. Create new account \n");
printf("2. Cash Deposit \n");
printf("3. Cash withdrawl \n");
printf("4. Account information \n");
printf("5. Log out \n");
printf("6. Clear the screen and display available ");
printf("options \n\n");
}
void Create_new_account()
{
char bank_name[20];
char bank_branch[20];
char acc_holder_name[30];
int acc_number;
char acc_holder_address[100];
float available_balance = 0;
fflush(stdin);
printf("\nEnter the bank name : ");
scanf("%s", &bank_name);
printf("\nEnter the bank branch : ");
scanf("%s", &bank_branch);
printf("\nEnter the account holder name : ");
scanf("%s", &acc_holder_name);
printf("\nEnter the account number(1 to 10): ");
scanf("%d", &acc_number);
printf("\nEnter the account holder address : ");
scanf("%s", &acc_holder_address);
strcpy(account[acc_number-1].bank_name,bank_name);
strcpy(account[acc_number-1].bank_branch,bank_branch);
strcpy(account[acc_number-1].acc_holder_name,
acc_holder_name);
account[acc_number-1].acc_number=acc_number;
strcpy(account[acc_number-1].acc_holder_address,
acc_holder_address);
account[acc_number-1].available_balance=available_balance;
void Account_information()
{
register int num_acc = 0;
//if (!strcmp(customer,account[count].name))
while(strlen(account[num_acc].bank_name)>0)
{
printf("\nBank name : %s \n" ,
account[num_acc].bank_name);
printf("Bank branch : %s \n" ,
account[num_acc].bank_branch);
printf("Account holder name : %s \n" ,
account[num_acc].acc_holder_name);
printf("Account number : %d \n" ,
account[num_acc].acc_number);
printf("Account holder address : %s \n" ,
account[num_acc].acc_holder_address);
printf("Available balance : %f \n\n" ,
account[num_acc].available_balance);
num_acc++;
}
}
void Cash_Deposit()
{
auto int acc_no;
float add_money;
while (acc_no=account[acc_no-1].acc_number)
{
account[acc_no-1].available_balance=
account[acc_no-1].available_balance+add_money;
printf("\nThe New balance for account %d is %f \n",
acc_no, account[acc_no-1].available_balance);
break;
}acc_no++;
}
void Cash_withdrawl()
{
while (acc_no=account[acc_no-1].acc_number)
{
account[acc_no-1].available_balance=
account[acc_no-1].available_balance-withdraw_money;
printf("\nThe New balance for account %d is %f \n",
acc_no, account[acc_no-1].available_balance);
break;
}acc_no++;
}
OUTPUT:
2. Middle Tier to validate the input and output for web server
3. Data Base to store data and procedures
4. Transaction Processor which could be a large capacity Mainframe or any other
Legacysystem to carry out Trillions of transactions per second.
If we talk about testing banking applications it requires an end to end testing methodology
involvingmultiple software testing techniques to ensure:
Total coverage of all banking workflows and Business
RequirementsFunctional aspect of the application
Security aspect of the
applicationData Integrity
Concurrency
User
Experience
Typical stages involved in testing Banking Applications are shown in below workflow
which wewill be discussing individually.
1) Requirement Gathering:
Requirement gathering phase involves documentation of requirements either as Functional
Specifications or Use Cases. Requirements are gathered as per customer needs and
documented by Banking Experts or Business Analyst. To write requirements on more than
one subject experts are involved as banking itself has multiple sub domains and one full
fledge banking application will be the integration of all. For Example: A banking application
may have separate modules for Transfers, Credit Cards, Reports, Loan Accounts, Bill
Payments, Trading Etc.
2) Requirement Review:
The deliverable of Requirement Gathering is reviewed by all the stakeholders such as QA
Engineers, Development leads and Peer Business Analysts. They cross check that neither
existing business workflows nor new workflows are violated.
3) Business Scenario Preparations:
In this stage QA Engineers derive Business Scenarios from the requirement documents
(Functions Specs or Use Cases); Business Scenarios are derived in such a way that all
Business Requirements are covered. Business Scenarios are high level scenarios without any
detailed steps, further these BusinessScenarios are reviewed by Business Analyst to ensure all
of Business Requirements are met and its easier for BAs to review high level scenarios than
reviewing low level detailed Test Cases.
1) Functional Testing:
In this stage functional testing is performed and the usual software testing activities are
performedsuch as:
Test Case Preparation:
In this stage Test Cases are derived from Business Scenarios, one Business Scenario leads
to severalpositive test cases and negative test cases. Generally tools used during this stage
are Microsoft Excel,Test Director or Quality Center.
Test Case Review:
Reviews by peer QA Engineers
Test Case Execution:
Test Case Execution could be either manual or automatic involving tools like QC, QTP
or anyother.
2) Database Testing:
Banking Application involves complex transaction which are performed both at UI level and
Database level, Therefore Database testing is as important as functional testing. Database in
itself is an entirely separate layer hence it is carried out by database specialists and it uses
techniques like
Data loading
Database Migration
Testing DB Schema and Data
typesRules Testing
Testing Stored Procedures and
FunctionsTesting Triggers
Data Integrity
3) Security Testing:
Security Testing is usually the last stage in the testing cycle as completing functional and non
functional are entry criteria to commence Security testing. Security testing is one of the major
stages in the entire Application testing cycle as this stage ensures that application complies
with Federal and Industry standards. Security testing cycle makes sure the application does
not have any web vulnerability which may expose sensitive data to an intruder or an attacker
and complies withstandards like OWASP.
In this stage the major task involves in the whole application scan which is carried out using
tools likeIBM Appscan or HP WebInspect (2 Most popular tools).
Once the Scan is complete the Scan Report is published out of which False Positives are
filtered outand rest of the vulnerability are reported to Development team for fixing depending
on the Severity.
Other Manual tools for Security Testing used are: Paros Proxy, Http Watch, Burp Suite,
Fortifytools Etc.
Apart from the above stages there might be different stages involved like Integration Testing
andPerformance Testing.
In today„s scenario majority of Banking Projects are using: Agile/Scrum, RUP and
Continuous Integration methodologies, and Tools packages like Microsoft„s VSTS and
Rational Tools.
As we mentioned RUP above, RUP stands for Rational Unified Process, which is an iterative
software development methodology introduced by IBM which comprises of four phases in
which development and testing activities are carried out.
updating thebalance)
-Check whether you are able to withdraw an amount in the newly created account (after
deposit) (andthus updating the balance)
-Check whether company name and its pan number and other details are provided in case
of salaryaccount
-Check whether primary account number is provided in case of secondary account
-Check whether company details are provided in cases of company's current account
-Check whether proofs for joint account is provided in case of joint account
-Check whether you are able deposit an account in the name of either of the person in an joint
account.
-Check whether you are able withdraw an account in the name of either of the person in an joint
account.
-Check whether you are able to maintain zero balance in salary account
-Check whether you are not able to maintain zero balance (or mini balance) in non-salary account.
viva questions
1. Can you explain boundary value analysis?
2. Can you explain equivalence partitioning?
3. Can you explain random/monkey testing?
4. What are semi-random test cases?
5. What is negative and positive testing?
6. How did you define severity ratings in your project?
EXPERIMENT: 6
suggestionswhile typing the emailds based on the existing emailIds in user’s email list.
3. Verify that the user can enter multiple comma-separated emailIds in ‘To’, ‘cc’ and ‘bcc’
sections.
4. Verify that the user can type Subject line in the ‘Subject’ textbox.
5. Verify that the user can type the email in the email-bodysection.
6. Verify that users can format mail using editor-options provided like choosing font-family,
font-size,bold-italic-underline, etc.
7. Verify that the user can attach file as an attachement to the email.
8. Verify that the user can add images in the email and select the size for the same.
9. Verify that after entering emailIds in either of the ‘To’, ‘cc’ and ‘bcc’ sections, entering
Subjectline and mail body and clicking ‘Send’ button, mail gets delivered to intended
receivers.
10. Verify that sent mails can be found in ‘Sent Mail’ sections of the sender.
11. Verify that mail can be sent to non-gmail emailIds also.
12. Verify that all sent emails get piled up in the ‘Sent Mail’ section and get deleted in cyclic
fashionbased on the size availability.
13. Verify that the emails composed but not sent remain in the draft section.
14. Verify the maximum number of email recipients that can be entered in ‘To’, ‘cc’ and ‘bcc’
sections.
15. Verify the maximum length of text that can be entered in the ‘Subject’ textbox.
16. Verify the content limit of text/images that can be entered and successfully delivered as mail
body.
17. Verify the maximum size and number of attachment that can be attached with an email.
18. Verify that only the allowed specifications of the attachment can be attached with an email/
19. Verify that if the email is sent without Subject, a pop-up is generated warning user about
no subject line. Also, verify that on accepting the pop-up message, the user is able to send
the email.
EXPERIMENT: 7
Showentries
Search:
Type-
Sr. Security test cases Negative/
No. Positive
TestCase
1 Verify if a user cannot enter the characters more than the specified range in Negative
eachfield (Username and Password).
2 Verify if a user cannot enter the characters more than the specified range in Positive
eachfield (Username and Password).
Type-
Sr. Security test cases Negative/
No. Positive
TestCase
3 Verify the login page by pressing ‘Back button’ of the browser. It should Negative
notallow you to enter into the system once you log out.
4 Verify the timeout functionality of the login session. Positive
5 Verify if a user should not be allowed to log in with different credentials Negative
from thesame browser at the same time.
6 Verify if a user should be able to login with the same credentials in different Positive
browsers at the same time.
7 Verify the Login page against SQL injection attack. Negative
8 Verify the implementation of SSL certificate. Positive
2 Don’t enter an email address or phone number & just click the Next button. Verify if the user will
get the correct message or if the blank field will get highlighted.
3 Enter the invalid email address & click the Next button. Verify if the user will get the correct
message.
4 Enter an invalid phone number & click the Next button. Verify if the user will get the correct
message.
5 Verify if a user can log in with a valid email address and password.
6 Verify if a user can log in with a valid phone number and password.
7 Verify if a user cannot log in with a valid phone number and an invalid password.
8 Verify if a user cannot log in with a valid email address and a wrong password.
EXPERIMENT: 8
Result: Partially pass. When no books issued by user, he can be deleted. But when
there arebooks Issued by this user, he was also deleted. It is wrong.
The updated values would be reflected if the same customer's ID/SSN is
calledfor.Result: pass
If customer were deleted, it would not appear in further search
queries.Result: pass
Add a book
Pass criteria:
Each book shall have following attributes: Call Number, ISBN, Title, Author
name.Result: pass
The retrieved book information should contain the four
attributes.Result: pass
Update/delete book
Pass criteria:
The book item can be retrieved using the call number Result:
did notpass. Can not retrive using the call number
The data items which can be updated are: ISBN, Title, Author name Result: pass
The book can be deleted only if no user has issued it.Result: partially pass. When no user has
issued it, pass. When there are user having issued it, did not pass.
The updated values would be reflected if the same call number is called for Result: passIf book
were deleted, it would not appear in further search queries. Result: pass
Search for book
Pass criteria:
The product shall let Librarian query books„ detail information by their ISBN number or Author or
Title.
Result: pass
The search results would produce a list of books, which match the search parameters with following
Details: Call number, ISBN number, Title, Author Result: pass
The display would also provide the number of copies which is available for issue Result: pass The
display shall provide a means to select one or more rows to a user-list Result: pass
A detailed view of each book should provide information about check-in/check out status, with the
borrower„s information.
Result: pass
The search display will be restricted to 20 results per page and there would be means to navigatefrom
sets of search results.
Result: pass
The user can perform multiple searches before finally selecting a set of books for check in or
checkout. These should be stored across searches.
Result: pass
A book may have more than one copy. But every copy with the same ISBN number should
havesame detail information.
Result: pass
The borrower„s list should agree with the data in students„
accountResult: pass
Check-in book
Pass criteria:
Librarians can check in a book using its call number
Result: pass
The check-in can be initiated from a previous search operation where user has selected
a set ofbooks.
Result: pass
The return date would automatically reflect the current system date.
Result: did notpass.
Any late fees would be computed as difference between due date and return date at rate
of 10cents a day.
Result: did not pass
A book, which has been checked in once, should not be checked in again
Result: passCheck-out book
Pass criteria:
Librarians can check out a book using its call number Result: pass
The checkout can be initiated from a previous search operation where user has
selected a set ofbooks.
Result: pass
The student ID who is issuing the book would be
enteredResult: pass
The issue date would automatically reflect the current system date.
The due date would automatically be stamped as 5 days from current date.
Result:did notpass
A book, which has been checked out once, should not be checked out again Result: pass A
student who has books due should not be allowed to check out any books Result:
did not pass
The max. No of books that can be issued to a customer would be 10. The system should
notallow checkout of books beyond this limit.
Result: pass
View book
detail pass
crirteria:
This view would display details about a selected book from search operation Result:
pass The details to be displayed are: Call number, IBN, Title, Author, Issue status
(In library or checked out), If book is checked out it would display, User ID & Name,
Checkout date, Duedate Result: for checkout date and due date, did not pass
Books checked in should not display user
summary Result: pass
Books checked out should display correct user
details.Result: pass
View student detail
Pass criteria:
Librarians can select a user record for detailed
viewResult: pass
The detail view should show:
EXPERIMENT: 9
NAME OF THE EXPERIMENT: Study of any web testing tool (e.g. Selenium)
What is Selenium?
JavaScript framework that runs in your web browser Works anywhere JavaScript is
supported Hooks for many other languages Java, Ruby, Python Can simulate a user
navigating through pages and then assert for specific marks on the pages All you need to
really know is HTML to start using it right away
Selenium IDE
Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers to
recordtheir actions as they follow the workflow that they need to test.
It provides a Graphical User Interface for recording user actions using Firefox which is used to learn
and use Selenium, but it can only be used with Firefox browser as other browsers are not supported.
However, the recorded scripts can be converted into various programming languages
supported bySelenium and the scripts can be executed on other browsers as well.
Selenium - IDE
Download
Step 1 − Launch Firefox and navigate to the following URL - http://seleniumhq.org/download/.
Under the Selenium IDE section, click on the link that shows the current version number as shown
below.
Step 2 − Firefox add-ons notifier pops up with allow and disallow options. User has to allow the
installation.
Step 3 − The add-ons installer warns the user about untrusted add-ons. Click 'InstallNow'.
Step 4 − The Selenium IDE can now be accessed by navigating to Tools >>SeleniumIDE.
Step 5 − The Selenium IDE can also be accessed directly from the quick access menu bar as shown
below.
The following image shows the features of Selenium IDE with the help of a simple tool-tip.
The following steps are involved in creating Selenium tests using IDE −
Step 1 − Launch the Firefox browser and navigate to the website - https://www.ncalculators.com/
Step 2 − Open Selenium IDE from the Tools menu and press the record button that is on the top-
right corner.
Step 3 − Navigate to "Math Calculator" >> "Percent Calculator >> enter "10" as number1 and 50 as
number2 and click "calculate".
Step 4 − User can then insert a checkpoint by right clicking on the webelement and select "Show all
available commands" >> select "assert text css=b 5"
Step 5 − The recorded script is generated and the script is displayed as shown below.
The test can also be saved with an extension htm, shtml, and xhtml.
Step 1 − Create a test suite by navigating to "File" >> "New Test Suite" as shown below.
Step 2 − The tests can be recorded one by one by choosing the option "New Test Case" from the
"File" Menu.
Step 3 − The individual tests are saved with a name along with saving a "Test
Suite".
Step 1 − The Run status can be seen in the status pane that displays the number of tests passed and
failed.
Step 2 − Once a step is executed, the user can see the result in the "Log" Pane.
Step 3 − After executing each step, the background of the test step turns "Green" if passed and "Red"
if failed as shown below.
Debugging is the process of finding and fixing errors in the test script. It is a common step in any
script development. To make the process more robust, we can make use a plugin "Power Debugger"
.
for Selenium IDE.
Step 2 − Now launch 'Selenium IDE' and you will notice a new icon, "Pause on Fail" on recording
toolbar as shown below. Click it to turn it ON. Upon clicking again, it would be turned "OFF".
Step 3 − Users can turn "pause on fail" on or off any time even when the test is running.
Step 4 − Once the test case pauses due to a failed step, you can use the resume/step buttons to
continue the test execution. The execution will NOT be paused if the failure is on the last command
of any test case.
Step 5 − We can also use breakpoints to understand what exactly happens during the step. To insert a
breakpoint on a particular step, "Right Click" and select "Toggle Breakpoint" from the context-
sensitive menu.
Step 6 − Upon inserting the breakpoint, the particular step is displayed with a pause icon as shown
below.
Step 7 − When we execute the script, the script execution is paused where the breakpoint is inserted.
This will help the user to evaluate the value/presence of an element when the execution is in
progress.
The test cases that we develop also need to check the properties of a web page. It requires assert and
verify commands. There are two ways to insert verification points into the script.
To insert a verification point in recording mode, "Right click" on the element and choose "Show all
Available Commands" as shown below.
We can also insert a command by performing a "Right-Click" and choosing "Insert New Command".
After inserting a new command, click 'Command' dropdown and select appropriate verification point
from the available list of commands as shown below.
Given below are the mostly used verification commands that help us check if a particular step has
passed or failed.
verifyElementPresent
assertElementPresent
verifyElementNotPresent
assertElementNotPresent
verifyText
assertText
verifyAttribute
assertAttribute
verifyChecked
assertChecked
verifyAlert
assertAlert
verifyTitle
assertTitle
SynchronizationPoints
During script execution, the application might respond based on server load, hence it is required for
the application and script to be in sync. Given below are few a commands that we can use to ensure
that the script and application are in sync.
waitForAlertNotPresent
waitForAlertPresent
waitForElementPresent
waitForElementNotPresent
waitForTextPresent
waitForTextNotPresent
waitForPageToLoad
waitForFrameToLoad
Like locators, patterns are a type of parameter frequently used by Selenium. It allows users to
describe patterns with the help of special characters. Many a time, the text that we would like to
verify are dynamic; in that case, pattern matching is very useful.
Pattern matching is used with all the verification point commands - verifyTextPresent, verifyTitle,
verifyAlert, assertConfirmation, verifyText, and verifyPrompt.
globbing
regular expressions, and
exact patterns.
Globbing
Most techies who have used file matching patterns in Linux or Windows while searching for a
certain file type like *.doc or *.jpg. would be familiar with term "globbing"
To specify a glob in a Selenium command, prefix the pattern with the keyword 'glob:'. For example,
if you would like to search for the texts "tax year 2013" or "tax year 2014", then you can use the golb
"tax year *" as shown below.
However the usage of "glob:" is optional while specifying a text pattern because globbing patterns
are the default in Selenium.
Exact Patterns
Patterns with the prefix 'exact:' will match the given text as it is. Let us say, the user wants an exact
match with the value string, i.e., without the glob operator doing its work, one can use the 'exact'
pattern as shown below. In this example the operator '*' will work as a normal character rather than a
pattern-matching wildcard character.
Regular Expressions
Regular expressions are the most useful among the pattern matching techniques available. Selenium
supports the complete set of regular expression patterns that Javascript supports. Hence the users are
no longer limited by *, ? and [] globbing patterns.
To use RegEx patterns, we need to prefix with either "regexp:" or "regexpi:". The prefix "regexpi" is
case-insensitive. The glob: and the exact: patterns are the subsets of the Regular Expression patterns.
Everything that is done with glob: or exact: can be accomplished with the help of RegExp.
Example
For example, the following will test if an input field with the id 'name' contains the string 'tax year',
'Tax Year', or 'tax Year'.
It is easy to extend Selenium IDE by adding customized actions, assertions, and locator-strategies. It is done
with the help of JavaScript by adding methods to the Selenium object prototype. On startup, Selenium will
automatically look through the methods on these prototypes, using name patterns to recognize which ones are
actions, assertions, and locators.
Let us add a 'while' Loop in Selenium IDE with the help of JavaScript.
Step 2 − Now launch 'Selenium IDE' and navigate to "Options" >> "Options" as shown below.
Step 3 − Click the 'Browse' button under 'Selenium Core Extensions' area and point to the js file thatwe have
saved in Step 1.
Step 5 − Now you will have access to a few more commands such as "Label", "While" etc.
Step 6 − Now we will be able to create a While loop within Selenium IDE and it will execute asshown
below.
Viva questions:
1. What is Selenium?
2. What are the different Selenium components?
3. What are the testing types that can be supported by Selenium?
4. What are the limitations of Selenium?
5. What is Selenese?
EXPERIMENT: 10
I am taking WINDOWS calculator as an example for my test case. You can use the belowcalculator or use the
one that comes with your operating system.
Write the test cases based on the following functions and scenarios.
Check the calculator if it starts by on button. If it is software based calculator then check ifit
starts viaspecific means like from searching for calculator in search bar and then executing
application. Or by accessing menu item in the Windows.
Check if the calculator window maximizes to certain window size.
Check the if the calculator closes when the close button is pressed or if the exit menu isclicked from
file
> exit option.
Check if the help document is accessed from Help > Documentation.
Check if the calculator allows copy and paste functionality.
Check if the calculator has any specific preferences.
Check if all the numbers are working ( 0 to 9)
Check if the arithmetic keys ( +, -, *, %, /) are working.
Check if the sin, cos, tan and cos is operational using the keys.
Check if the x-1, x!,|x|,x^y and f(x) is operational and works as expected.
Check if the log key is operational and works as expected.
Check if the natural logarithm key i operational and works as expected.
Check if the factorial key is working as expected.
Check if the real and imaginary component keys are working as expected.
Check if the complex conjugate keys are working as expected.
Some of the advanced scientific calculator has the converter option. It does the conversion of angle, length,
weight,area, volume, duration, currency, temperature. Make sure you write the testcases for the same.
The additional keys for the financial calculator will be as shown in the image. Some calculator hasthe
mode forenabling these keys.
EXPERIMENT: 11
Bugzilla is a Bug Tracking System that can efficiently keep track of outstanding bugs in a product.
Multiple userscan access this database and query, add and manage these bugs. Bugzilla essentially
comes to the rescue of a group of people working together on a product as it enables them to view
current bugs and make contributions to resolve issues. Its basic repository nature works out better
than the mailing list concept and an organized database is always easier to work with.
Advantage of Using Bugzilla:
1. Product–>Component
2. Assigned to
3. Status (New, Assigned, Fixed etc)
4. Summary
5. Bug priority
6. Bug severity (blocker, trivial etc)
7. Bug reporter
Using Bugzilla:
Bugzilla usage involves the following activities Setting Parameters and Default Preferences
7. Select On for comment on create, which will force anyone who enters a new bug to enter
acomment, to describe the bug. Click Save Changes.
Before entering bugs, make sure we add some new users. We can enter users very easily, with a minimum of
information. Bugzilla uses the email address as the user ID, because users are frequentlynotified whenabugis
entered,either because they entered the bug, because the bug is assigned to them, or because they‗ve chosen to track
bugs in a certainproject.To create a new user:
1. Click users.
2. Click adds a new user.
3. Enter the login name, in the form of an email address.
4. Enter the real name, a password, and then click add.
5. Select the group access options. We‗ll probably want to enable the following
options inthe rowtitled user is a member of these groups:
6. Can confirm
7. Edit bugs
8. Edit components
9. Click update when done with setting options.
Impersonating a User:
Impersonating a user is possible, though rare, that we may need to file or manage a bug in
an area that is the responsibility of another user when that user is not available. Perhaps the user is
on vacation, or is temporarily assigned to another project. We can impersonate the user to create or
manage bugs that belong to that user.
Adding Products
We‗ll add a product in Bugzilla for every product we are developing. To start with, when we
first login to Bugzilla, we‗ll find a test product called TestProduct. We should delete this and
create a new product.
To add a product:
Products are comprised of components. Software products, in particular, are typically made
up of many functional components, which in turn are made up of program elements, like classes and
functions. It‗s not unusual in a software development team environment for different individuals to
be responsible for the bugs that are reported against a given component. Even if there are other
programmers working on that component, it‗s not uncommon for one person, either a project lead
or manager, to be the gatekeeper for bugs. Often, they will review the bugs as they are reported, in
order to redirect them to the appropriate developer or even another team, to review the priority and
severity supplied by the reporter, and sometimes to reject bugs as duplicates or enhancement
requests, for example.To add a component:
1. Click the link add at least one component in the message that appears after creating a
produc new
t.
2. Enter the Component name.
3. Enter a Description.
4. Enter a default assignee. Use one of the users we‗ve created. Remember to enter
Once we begin to enter new bugs, we‗ll see a number of drop down lists containing
default values. Some of these may work just fine for our product. Others may not. We can
modify the valuesof these fields,adding new values and deleting old ones. Let‗s take a look at
the OS category.
To modify default field values:
1. At the bottom of the page, in the Edit section, click Field Values.
2. Click the link, in this case OS, for the field we want to edit. The OS field
contains a list of operatingsystem names. We are going to add browsers to this list. In reality,
we might create a custom field instead, but for the sake of this example, just add them to the OS
list.
3. Click Add a value. In the Value field, enter IE7.Click Add.
4. Click Add a value again.
5. In the Value field, enter Firefox 3.
6. Click Add.
7. Where it reads add other values for the op_sys field, click op_sys.
8. This redisplays the table. We should now see the two new entries at the
top ofthe table. Thesevalues will also appear in the OS drop down list when we create a
new bug.
bug, a showstopper.
4. Click the OS dropdown list to see the options, including the new browser names we entered.
5. Select one of the options.Enter a summary and a description. We can add any other information
of choice, but it is not requiredby the system, although we may determine that our bug reporting
policy requires certain information.
i. Click Commit. Bugzilla adds our bug report to the database and displays the detail page
for that bug.
1. Click Reports.
2. Click the Search link on the page, not the one in the top menu. This opens a
page titledFind aSpecific Bug.
3. Select the Status.
4. Select the Product.
5. Enter a word that might be in the title of the bug.
6. Click Search. If any bugs meet the criteria that we have entered, Bugzilla
displays themin a listsummary.
7. Click the ID number link to view the full bug report.
VIVA QUESTIONS:
1. Define bug tracking system?
EXPERIMENT: 12
NAME OF THE EXPERIMENT: Study of any open source testing tool (TestLink)
Testlink is an open source test management tool. It enables creation and organization of test cases and
helpsmanage into test plan.
Login to TestLink
Step 1 : Open the Testlink home-page and enter the login details
1. Enter the userID – admin
2. Enter the password
3. Click on the login tab
Creating a Test Project
Step 1: In the main window click on Test Project Management, it will open another window
Step 3: Enter all the required fields in the window like category for test project, name of the project, prefix,
description, etc. After filling all necessary details, click on tab "Create" at the end of the window.
59
Step 1: From the home-page, click on Test Plan Management from home-page
Step 2: It will open another page, at the bottom of the page click on a tab "Create"
Step 3: Fill out all the necessary information like name, description, create from existing test plan, etc. in the open
window, and click on "create tab"
Build Creation
Build is a specific release of software
Step 1: Click on Builds/Releases under Test Plan from the home page
60
Step 2: In the next window, fill all necessary details for software release and click on create to save your
release
Once you have a release the software it, will appear like this
61
Step 2: On the right-hand side of the panel, click on thesetting icon . It will display a series of test
operation.
Step 4: Fill-up all the details for test-suite and click on save it tab.
62
Your test suite appears on the left side of the panel under folder structure tree
Creating a Testcase
Testcase holds a sequence of test steps to test a specific scenario with expected result. Below steps will explain how
to create a test-case along with test steps.
Step 1: Click on the test suite folder on the left side of the panel under folder tree structure
Step 2: Click on the setting icon in the right side panel. List of test case operations will be displayed on the right
side panel
Step 3: New window will open, to create test cases click on create button in test-case operations
63
Step 5: After entering the details, click on "create" button to save the details. The test-case for Guru99 is created
successfully
Step 6: Click on test-case from the folder as shown above, it will open a window. Click on "create steps" button in
test case. It will open a test case step editor
Step 7) It will open another window on the same page, in that window you have to enter the following details
64
Step 8) Once you save and exit the test step, it will appear like this
Step 1) Click on the setting icon on the test panel. It will show the list of operations.
65
Step 1: From the Testlinks home-page, click on users/roles icon from the navigation bar
Step 3: Fill out all the users details and click the "Save" button
66
Here in the list we can see the users have been created
Writing Requirements:
Step 1: From the navigation bar select the "Requirements Link", it opens the Requirement page.
Step 2: From the requirement page, on the right side of the panel click on "create" button
Step 3: A new window will open, enter all the details like
1. Document ID
2. Title name
3. Requirement description
4. And Click "Save" button
For the type, you can choose the option from the drop-down- here we chose "User Requirement Specification"
Step 4: It should create Requirement specification and displayed on the left side panel under project "Guru99".
Step 5: Select the setting button from requirements specification home-page. It will open another window.
Step 6: Fill out all the specified details and click the "Save" button
Note: To add more requirements you can mark the check-box and click save button
On the left side of the panel, we can see that requirement is added.
Step 1: From test specification section open any single test case and click on requirement icon
Step 2: To assign requirements specification to test case you have to follow the following steps
After clicking on "assign" tab, a window will appear stating "Assigned Requirement."
Step 1: From the navigation bar click on the "Test Execution" link. It will direct you to the Test Execution Panel.
Step 2: Pick the Test case you want to run from the left side panel
Step 3: Once you have selected the test cases, it will open a window.
72
Step 5: On the same page, you have to fill similar detail about the execution of test-case. Fill the details, select the
status and then click on "save execution".
HTML
MS Word
MS excel
OpenOffice Writer
OpenOffice calc
73
Step 2: From the left side panel, select "Test Report" link
1. Mark and unmark the option you want to highlight in your test report
2. click on your project folder
Step 2: Now on the right-hand side of the panel clickon the setting icon, it will display all the operations that
can be performed on the test case.
Step 4: It will open another window, mark the option as per requirement and click on the export tab
Step 2: Click on thesetting icon on the right hand-side of the panel, it will display all
the operations thatcanbe executed on the test suite/test case
Step 3: Click on the import button in the test case operations list as
Step 4: Browse and attach the xml test case file that you have exported from test link and click on
uploadbutton.
1. Use the browse option to attach the XML test case file that you have exported from
testlink
2. Click on upload file
When you upload a file, it will open window stating import test cases
Step 5: Test case will be uploaded and displayed on the right-hand side of the panel