[go: up one dir, main page]

0% found this document useful (0 votes)
299 views52 pages

Software Quality Engineering Lab Manual

Uploaded by

Aaiza Nadeem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
299 views52 pages

Software Quality Engineering Lab Manual

Uploaded by

Aaiza Nadeem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Lab manual

Submitted to:
ENGR.shahzad ahmed

Submitted by:
Hajra Nawaz
Date
14 dec 2019
2016-BSE-007

Contents
Lab 1............................................................................................................................................................................................... 5

Verification and Validation.......................................................................................................................................................... 5

LAB Experiment:......................................................................................................................................................................... 6

Do while loop:........................................................................................................................................................................ 6

WHILE LOOP:....................................................................................................................................................................... 7

IF ELSE……........................................................................................................................................................................... 8

SWITCH:................................................................................................................................................................................ 9

FOR LOOP:..........................................................................................................................................................................11

Lab 2............................................................................................................................................................................................. 12

Test case.................................................................................................................................................................................... 13

POSITIVE VALUES WITHIN RANGE..................................................................................................................................13

NEGATIVE VALUES WITHIN RANGE.................................................................................................................................13

VALUES OUT OF RANGE...................................................................................................................................................13

Lab 3:............................................................................................................................................................................................ 14

Bugs identified.......................................................................................................................................................................... 14

Bug report 1:............................................................................................................................................................................. 15

Bug report 2:............................................................................................................................................................................. 15

Bug report 3:............................................................................................................................................................................. 15

Bug report 4:............................................................................................................................................................................. 16

Bug report 5:............................................................................................................................................................................. 16

Bug report 6:............................................................................................................................................................................. 16

Bug report 7:............................................................................................................................................................................. 16

Bug report 8:............................................................................................................................................................................. 17

Bug report 9:............................................................................................................................................................................. 17

Lab 4............................................................................................................................................................................................. 18

AIM:.......................................................................................................................................................................................... 18

Introduction -:....................................................................................................................................................................... 19

Test Scope -:..........................................................................................................................................................................19

References:........................................................................................................................................................................... 19

Entry criteria:.......................................................................................................................................................................20

Integration testing:....................................................................................................................................................................20

System testing:.......................................................................................................................................................................... 20

User Acceptance Testing -:........................................................................................................................................................20

Testing Strategies -:..............................................................................................................................................................20

System and Integration Testing -:..............................................................................................................................................20


Performance and Stress Testing -:.............................................................................................................................................20

User Acceptance Testing -:........................................................................................................................................................21

Automated Regression Testing -:...............................................................................................................................................21

Exit criteria:.........................................................................................................................................................................21

Unit Testing:.............................................................................................................................................................................. 21

Integration Testing:................................................................................................................................................................... 21

System Testing:.......................................................................................................................................................................... 21

Acceptance Testing:................................................................................................................................................................... 21

Test environment:..................................................................................................................................................................22

Hardware -:............................................................................................................................................................................... 22

Software -:................................................................................................................................................................................. 22

Testing tool:..........................................................................................................................................................................22

Test Scheduling & Resource Planning...........................................................................................................................................22

Metrics plan................................................................................................................................................................................... 23

White Box Testing and Black Box Testing..................................................................................................................................23

Lab 5............................................................................................................................................................................................. 24

Selenium IDE:...........................................................................................................................................................................24

Selenium Components:..........................................................................................................................................................24

Selenium IDE:.......................................................................................................................................................................25

Lab 6............................................................................................................................................................................................. 26

Implementation.......................................................................................................................................................................... 26

LAB 6............................................................................................................................................................................................. 28

LAB#06.......................................................................................................................................................................................... 28

Example#01:............................................................................................................................................................................. 30

Example#02:............................................................................................................................................................................. 30

Code:.................................................................................................................................................................................... 30

Pycharm:................................................................................................................................................................................... 31

On Google:............................................................................................................................................................................... 31

Lab 8............................................................................................................................................................................................. 32

UFT:.......................................................................................................................................................................................... 32

IMPLEMENTATION:............................................................................................................................................................ 32

Lab 9............................................................................................................................................................................................. 33

Creating UFT test:.................................................................................................................................................................... 33

Now recording website:........................................................................................................................................................ 34

Now testing Flight (Application):.........................................................................................................................................35


LAB#10.......................................................................................................................................................................................... 39

Launcher of Test link:................................................................................................................................................................ 39

Advantages of Test Link........................................................................................................................................................ 39

Test Plan:.............................................................................................................................................................................. 39

Test Case:............................................................................................................................................................................. 40

User...................................................................................................................................................................................... 40

Test Projects.......................................................................................................................................................................... 40

Test Specifications................................................................................................................................................................. 40

Steps of Installation.............................................................................................................................................................. 41

Install and Launch TestLink..................................................................................................................................................44

Lab 11............................................................................................................................................................................................ 47

Test Specification:..................................................................................................................................................................... 48

Test Suite:............................................................................................................................................................................. 48

Test Cases:............................................................................................................................................................................ 49

Lab 12:.......................................................................................................................................................................................... 50

Import:...................................................................................................................................................................................... 50

Export:...................................................................................................................................................................................... 51

Test Specification Document:................................................................................................................................................52

Report and metrics:.............................................................................................................................................................. 53

Charts:.................................................................................................................................................................................. 53

LAB 13........................................................................................................................................................................................... 55

QTP........................................................................................................................................................................................... 55

Testing Tools......................................................................................................................................................................... 55

Classification of Tools........................................................................................................................................................... 55

Types of Tools........................................................................................................................................................................ 55

Where QTP Fits in?..............................................................................................................................................................56

QTP – History and Evolution....................................................................................................................................................56

Version History.....................................................................................................................................................................57

Advantages................................................................................................................................................................................ 57

Disadvantages........................................................................................................................................................................... 57
Lab 1

Verification and Validation

Criteria Verification Validation

Definition The process of evaluating work-products (not the actual The process of evaluating software during or at the end of
final product) of a development phase to determine the development process to determine whether it satisfies
whether they meet the specified requirements for that specified business requirements.
phase.

Objective To ensure that the product is being built according to the To ensure that the product actually meets the user’s needs
requirements and design specifications. In other words, to and that the specifications were correct in the first place.
ensure that work products meet their specified In other words, to demonstrate that the product fulfills its
requirements. intended use when placed in its intended environment.

Question Are we building the product right? Are we building the right product?

Evaluation Plans, Requirement Specs, Design Specs, Code, Test The actual product/software.
Items Cases

Activities
 Reviews  Testing
 Walkthroughs
 Inspections
 Code
 Requirement and specification

It is entirely possible that a product passes when verified but fails when validated. This can happen when, say, a
product is built as per the specifications but the specifications themselves fail to address the user’s needs.

 Trust but Verify.


 Verify but also validate.

LAB Experiment:
Write a program to demonstrate the working of the fallowing constructs:

i) do…while ii) while iii) if …else iv) switch v) for Loops in C++ language.

Objective:

To understand the working of do while with different range of values and test cases.
Input Actual Output

Then Make Test Cases like below

Do while loop:
#include "stdafx.h"

#include <iostream>
using namespace std;
int main()
{
int a;
cout << "Enter a number= ";
cin >> a;

do
{
cout << a << endl;
a--;
} while (a != 0);

system("pause");
return 0;
}

Test cases:

Test case no: 01

Test case name: Positive values within range

Input Expected Output Actual Output Remarks


4 4 4 PASS
3 3 PASS
2 2 PASS
1 1 PASS

Test case no: 02

Test case name: Negative values within range.

Input Expected Output Actual Output Remarks


-4 Values less than -4 -4,-5 ,………… FAIL
Values less than -4 -4,-5 ,………… FAIL
Values less than -4 -4,-5 , ………… FAIL
Values less than -4 -4,-5 , ………… FAIL

Test case no: 03

Test case name: Out of range values testing

Input Expected Output Actual Output Remarks


4.26 4.26 4 FAIL
3.26 3 FAIL
2.26 2 FAIL
1.16 1 FAIL

WHILE LOOP:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int a;
cout << "Enter a number= ";

cin >> a;

while (a != 0)
{
cout << a << endl;
a--;

system("pause");
return 0;
}

Test cases:

Test case no: 01

Test case name: Positive values within range

Input Expected Output Actual Output Remarks


4 4 4 PASS
3 3 PASS
2 2 PASS
1 1 PASS

Test case no: 02

Test case name: Negative values within range.

Input Expected Output Actual Output Remarks


-4 Values less than -4 -4,-5 ,………… PASS
Values less than -4 -4,-5 ,………… PASS
Values less than -4 -4,-5 , ………… PASS
Values less than -4 -4,-5 , ………… PASS

Test case no: 03

Test case name: Out of range values testing

Input Expected Output Actual Output Remarks


4.26 4.26 4 FAIL
3.26 3 FAIL
2.26 2 FAIL
1.16 1 FAIL

IF ELSE……
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int a;
cout << "Enter a number= ";

cin >> a;

if (a % 2 == 0)
{
cout << "even" << endl;

}
else
cout << "odd" << endl;
system("pause");
return 0;
Test cases:

Test case no: 01

Test case name: Positive values within range

Input Expected Output Actual Output Remarks


6 even even PASS
7 odd odd PASS
8 even even PASS
9 odd odd PASS

Test case no: 02

Test case name: Negative values within range.

Input Expected Output Actual Output Remarks


-6 even even PASS
-7 odd odd PASS
-8 even even PASS
-9 odd odd PASS

Test case no: 03

Input Expected Output Actual Output Remarks


6.25 even even PASS
-7.25 odd odd PASS
-8.00000 even even PASS
-09 odd odd PASS
Test case name: Out of range values testing

SWITCH:
#include "stdafx.h"
#include "iostream"
using namespace std;

int main()
{
int a, num;
cout << "Enter a number= ";
cin >> a;

cout << "Enter 1 for Even Number" << endl;


cout << "Enter 2 for Odd Number" << endl;
cin >> num;

switch (num)
{
case 1:
if (a % 2 == 0)
cout << a << " is even number" << endl;
else
cout << a << " is not even number" << endl;
break;

case 2:
if (a % 2 != 0)
cout << a << " is odd number" << endl;
else
cout << a << " is not odd number" << endl;
break;

default:
cout << "Number Error";
break;
}
system("pause");
return 0;
}

Test cases:

Test case no: 01

Test case name: Positive values within range

Input Expected Output Actual Output Remarks


5 5 is odd 5 is odd PASS
6 is odd is odd PASS
7 is odd is odd PASS
8 is odd is odd PASS

Test case no: 02

Test case name: Negative values within range.

Input Expected Output Actual Output Remarks


-5 5 is odd 5 is odd PASS
-6 is odd is odd PASS
-7 is odd is odd PASS
-8 is odd is odd PASS

Test case no: 03

Test case name: Out of range values testing

Input Expected Output Actual Output Remarks


-5.0256 error error PASS
6.00000001 error error PASS
-7.355552 error error PASS
-8.256655 error error PASS

FOR LOOP:
#include "stdafx.h"
#include "iostream"
using namespace std;

int main()
{
int a;
cout << "Enter a number= ";
cin >> a;

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


{
cout << i << endl;
}

system("pause");
return 0;
}

Test cases:

Test case no: 01

Test case name: Positive values within range

Input Expected Output Actual Output Remarks


3 0 0 PASS
1 1 PASS
2 2 PASS
3 3 PASS

Test case no: 02

Test case name: Negative values within range.

Input Expected Output Actual Output Remarks


-4 Values less than -4 Nothing FAIL
Values less than -4 Nothing FAIL
Values less than -4 Nothing FAIL
Values less than -4 Nothing FAIL

Test case no: 03

Test case name: Out of range values testing

Input Expected Output Actual Output Remarks


3.25 3.25 3 FAIL
2.25 2 FAIL
1.25 1 FAIL
0.25 0 FAIL

Lab 2
Write a program in C++ for matrix multiplication . inspect the causes of failure . Make the test case.

Program (for 2D matrix)

#include "stdafx.h"
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])


{
int a[10][10];int b[10][10];int c[10][10];
int i,j,k,l;

cout<<"Enter the value of the matrix a:";


for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
cin>>a[i][j];
}
}
cout<<"\n Enter the value of the matrix b:";
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
cin>>b[i][j];
}
}

cout<<"\n The multiplied value is:";


cout<<endl ;
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c[i][j]=0;
for(k=0;k<2;k++)
{
c[i][j]=c[i][j]+(a[i][k]*b[k][j]);
}
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
cout<<c[i][j];
cout<<" ";

}
cout<<endl ;
}

system("pause");
return 0;
}

CAUSES OF FAILURE

 To multiply two matrices, the number of columns of first matrix should be equal to the number of rows to
second matrix.
 Thus the program will fail if the number of number of column of first first matrix is not equal to number of
rows of second matrix.

Test case

POSITIVE VALUES WITHIN RANGE


INPUT EXPECTED OUTPUT ACTUAL OUTPUT REMARKS
A[2][2]={2, 2, 2,2} C[2][2]={8,8,8,8} C[2][2]={8,8,8,8} Test pass
B[2][2]={2, 2, 2,2}

NEGATIVE VALUES WITHIN RANGE


INPUT EXPECTED OUTPUT ACTUAL OUTPUT REMARKS
A[2][2]={-5, -6, -3,-2} C[2][2]={29,27,11,13} C[2][2]={29,27,11,13} Test pass
B[2][2]={-1, -3, -4,-2}
VALUES OUT OF RANGE
INPUT EXPECTED OUTPUT ACTUAL OUTPUT REMARKS
A[2][2]={2,3,4,5,6} error error Test pass
B[2][2]={-1, -3, -4,-2}

Lab 3:
Aim:

Take any system (e.g. ATM system), study its system specifications, and report the various bugs.

Program:

Features to be tested:

1. Pin not taken

2. Machine can’t take atm card

3. Payment denied by bank

4. Card stuck

5. No sms alert

6. Can’t get slip

7. Money transfer problem

8. Screen not working

9. Incorrect balance

Bugs identified
Bug Id Bug Name

B001 Pin input error

B002 Card not taken

B003 Payment dinied

B004 Card stuck

B005 No sms alert

B006 Can’t get slip

B007 Money transfer problem

B008 Screen not working

B009 Incorrect balance


Bug report 1:
Bug Id: B001

Bug description: PIN INPUT ERROR:


Atm machine is not taking the pin from user.
Steps to reproduce: pin is entered by user

Expected Result: login

Actual Result: error in login

Status: fail

Bug report 2:
Bug Id: B002

Bug description: Card not taken

Steps to reproduce: user entered the card

Expected Result: card is taken by machiene

Actual Result: card not taken

Status: Fail

Bug report 3:
Bug Id:B003

Bug description: payment denied

Steps to reproduce: user input the amount

Expected Result: money received

Actual Result: amount is detected from balance but not received by user

Status: Fail

Bug report 4:
Bug Id:B004
Bug description: card stuck

Steps to reproduce: logout

Expected Result: card back to user

Actual Result: card stuck in machine

Status: Fail

Bug report 5:
Bug Id:B005

Bug description: no sms alert

Steps to reproduce: card and pin inserted and money received

Expected Result: sms received

Actual Result: sms not received

Status: Fail

Bug report 6:
Bug Id:B006

Bug description: can’t get slip

Steps to reproduce: amount received by user

Expected Result: slip with amount received

Actual Result: atm can’t produce slip

Status: Fail

Bug report 7:
Bug Id:B007

Bug description: Money transfer problem

Steps to reproduce: transfer money


Expected Result: money is transferred

Actual Result: money can’t transferred

Status: Fail

Bug report 8:
Bug Id:B008

Bug description: Screen not working

Steps to reproduce: use screen to enter pin or amount

Expected Result: user see the screen

Actual Result: user can’t see the screen

Status: Fail

Bug report 9:
Bug Id:B009

Bug description: Incorrect balance

Steps to reproduce: user enter balance

Expected Result: correct balance

Actual Result: incorrect balance recieved

Status: Fail

Lab 4

AIM:
Create a Test Plan document for any application (e.g. Library Management System)
Program:

Document Control

Prepared By Hajra Nawaz Designation Tester


date 24 sep 2019 Sig

Reviewed by: Huma rizwan


date 24 dec 2019 Sig

Approved by: Mr. jack


date 24 jan 2020 Sig

Change history

Date Version Section Description of Author


change
24 sep 2019 3.0 Testing Test the working Hajra nawaz
of system on
addition of new
feature
Change history

Date Version Section Description of Author


change

24 sep 2019 3.0 Testing Test the working of Hajra nawaz


system on addition
of new feature

Table of Contents.

1. Purpose………………………………………………………………………………………………………2
1.1. Test Scope………………………………………………………………………………………………2
1.2. Test Milestones………………………………………………………………………………………2
2. Project Document Reference………………………………………………………………………2
3. Entry criteria……………………………………………………………………………………………….2
3.1. Integration Testing………………………………………………………………………………….2
3.2. System Testing………………………………………………………………………………………..2
3.3. Pre -acceptance testing
4. Test Strategy
4.1. Integration Testing
4.2. <Type of testing>
4.3. System Testing
4.4. <Type of testing>
5. Exit Criteria
5.1. Integration Testing
5.2. System Testing
5.3. Pre-Acceptance testing
6. Defect fixing Threshold Time
7. Test Coverage Criteria
8. Suspension and resumption criteria
9. Test Environments
9.1. Hardware Environments:
9.2. Software Environments:
10. Testing Tools:
11. Test Reports
12. Test Scheduling & Resource Planning
12.1. Scheduling
12.2. Training Needs
13. Inter Group Coordination
14. Metrics Plan

Introduction -:
The Library Management System application for assisting a librarian in managing library books. The system would
provide basic set of features to add/update clients, add/update books, search for books, dues if any and manage
check-in / checkout processes. This test plan is a basic guideline for future testing in the LMS.

Test Scope -:
The system would provide basic set of features to add/update members, add/update books, dues if any and manage
check in specifications for the systems based on the client’s statement of need.

References:

http://www.learnerswindow.com/library-management-sample-test-plan/

https://www.academia.edu/31493403/Library_Management_System_Test_Management_Concept_Group_work_

https://www.guru99.com/what-everybody-ought-to-know-about-test-planing.html

https://www.google.com/search?
q=test+plan+examples&oq=test+plan+examples&aqs=chrome..69i57j0l4j69i60.4032j0j7&sourceid=chrome&ie=U
TF-8
https://www.google.com/search?
q=test+plan+examples&oq=test+plan+examples&aqs=chrome..69i57j0l4j69i60.4032j0j7&sourceid=chrome&ie=U
TF-8

https://www.studentprojectguide.com/project-report/test-cases-library-management-system/

Entry criteria:

Integration testing:

In this type of testing we test various integration of the project module by providing the input .The primary objective
is to test the module interfaces in order to ensure that no errors are occurring when one module invokes the other
module.

System testing:

System integration testing (SIT) is a high-level software testing process in which testers verify that all related
systems maintain data integrity and can operate in coordination with other systems in the same environment.

User Acceptance Testing -:


Definition : Formal testing with respect to user needs, requirements, and business processes conducted to determine
whether or not a system satisfies

Testing Strategies -:
Unit Testing :
Definition : Test smallest testable parts of an application, called units, are individually and independently scrutinized
for proper operation.
Participants/ Tested by : Developers
Methodology : Used for the Database test, records in each table, Basic function test, add a student, add a book,
Network test

System and Integration Testing -:


Definition : Integration testing is the phase in software testing in which individual software modules are combined
and tested as a group.
System integration testing (SIT) is a high-level software testing process in which testers verify that all related
systems maintain data integrity and can operate in coordination with other systems in the same environment.
Participants/ Tested by : System Tester
Methodology : It is used for the Database test, Queries for insert, update, delete the records

Performance and Stress Testing -:


Definition : Determine how a system performs in terms of responsiveness and stability under a particular workload.
Stress testing tries to break the system under test by overwhelming its resources or by taking resources away from it
Participants/ Tested by : Tester
Methodology : It is used for the Database test, records in each table, Basic function test, Network test

User Acceptance Testing -:


Definition : Formal testing with respect to user needs, requirements, and business processes conducted to determine
whether or not a system satisfies

Participants/ Tested by : Users / End Users


Methodology : It is used for Whole System Test
Automated Regression Testing -:
Definition : Uncover new errors, or regressions, in existing functionality after changes have been made to a system,
such as functional enhancements, patches or configuration changes.
Participants/ Tested by : Tester
Methodology : It is used for Whole System Test

Exit criteria:

Unit Testing:

 Planning phase has been completed.


 System design, technical design and other relevant documents are properly reviewed, analyzed and
approved.
 Business and functional requirements are defined and approved.
 Testable codes or units are available.
 Availability of test environment.

Integration Testing:

 Completion of unit testing phase.


 Priority bugs found during unit testing has been fixed and closed.
 Integration plan and test environment to carry out integration testing is ready.
 Each module has gone through unit testing before the integration process.

System Testing:

 Successful completion of integration testing process.


 Priority bugs found during previous testing activities has been fixed and closed.
 System testing environment is available.
 Test cases are available to execute.

Acceptance Testing:

 Successful completion of system testing phase.


 Priority bugs found during previous testing activities has been fixed and closed.
 Functional and Business requirement has been met.
 Acceptance testing environment is ready.
 Test cases are available.

Test environment:

Hardware -:
Three Dual Core or above machines needed

Software -:
Microsoft Windows XP installed

Testing tool:
 Zephyr
 Hip test
 Practi test
 Testrail
 Reqtest
 Testpal
 Test collab

Test Scheduling & Resource Planning

WBS and work breakdown structure:

Metrics plan

I have checked this project myself.the project is successfully completed.


White Box Testing and Black Box Testing

Differences between Black Box Testing vs White Box Testing:


BLACK BOX TESTING WHITE BOX TESTING

It is a way of software testing in which the It is a way of testing the software in which the
internal structure or the program or the code is tester has knowledge about the internal structure r
hidden and nothing is known about it. the code or the program of the software.

It is mostly done by software testers. It is mostly done by software developers.

No knowledge of implementation is needed. Knowledge of implementation is required.

It can be referred as outer or external software


testing. It is the inner or the internal software testing.

It is functional test of the software. It is structural test of the software.

This testing can be initiated on the basis of This type of testing of software is started after
requirement specifications document. detail design document.

It is mandatory to have knowledge of


No knowledge of programming is required. programming.

It is the behavior testing of the software. It is the logic testing of the software.

It is applicable to the higher levels of testing of It is generally applicable to the lower levels of
software. software testing.

It is also called closed testing. It is also called as clear box testing.

It is least time consuming. It is most time consuming.

It is not suitable or preferred for algorithm


testing. It is suitable for algorithm testing.

Can be done by trial and error ways and Data domains along with inner or internal
BLACK BOX TESTING WHITE BOX TESTING

methods. boundaries can be better tested.

Example: search something on google by using Example: by input to check and verify loops
keywords

Types of Black Box Testing:

Tyeps of White Box Testing:


 A. Functional Testing  A. Path Testing
 B. Non-functional testing  B. Loop Testing
 C. Regression Testing  C. Condition testing

Lab 5
1:Test Selenium with Firefox and google chrome using any web site like espn cric info.

Selenium IDE:
The Selenium-IDE (Integrated Development Environment) is the tool you use to develop your Selenium test cases. It’s
an easy-to-use Chrome and Firefox extension and is generally the most efficient way to develop test cases. It records the
users actions in the browser for you, using existing Selenium commands, with parameters defined by the context of that
element. This is not only a time-saver, but also an excellent way of learning Selenium script syntax

Selenium Components:
1. Selenium IDE (Integrated Development Environment).

2. Selenium RC(Remote Control)

3. Selenium WebDriver

4. Selenium Grid

Selenium IDE:

Selenium IDE is a simple record and playback kind of tool which comes as an add-on for Mozilla Firefox only. It is
used for prototype testing. Test cases written in IDE can be exported in many programming languages like Ruby,
Java, C#, etc. Edit and Debug options along with record are also available. It is an excellent tool for beginners to
understand the syntax of Selenium WebDriver.

Selenium RC:
Selenium RC (Remote Control) was the first tool of Selenium Suite. Earlier it was known as JavaScript Executor.
RC was the tool which made Selenium famous in the market.It was the first tool which provided the support for
multiple programming languages (JAVA, Ruby, Perl, PHP, Python, and C#).It also supported almost all the major
vendors of Browsers like Mozilla Firefox, Google Chrome, Internet Explorer. All the browsers which support
JavaScript can be automated using this tool.Selenium RC is also known as Selenium 1.
Selenium WebDriver:
Selenium WebDriver is the most important tool of the Selenium suite. Because of many limitations with RC,
WebDriver was developed. It does not require any manual process like Selenium Server. There is a direct
communication between code and browser.

Features of Selenium WebDriver:


 Open source

 Support Multiple languages like C#, JAVA, Ruby, Perl, Python, and PHP.

 Easy to integrate with Testing frameworks.

 Framework Development.

 Parallel Testing capabilities.

Selenium Grid:
It is the last component of the selenium suite and is used for parallel testing or distributive testing. It allows us to
execute test scripts on different machines at same time.There is a Hub which controls the execution on various
machines, and there are multiple nodes on which actual implementation is done.

Features of the Grid:

 Parallel Execution on multiple nodes

 Platform Independent, support almost all Operating System

 Language Independent.

Lab 6

Implementation
STEP 1:

STEP 2:
STEP 3:

STEP 4:

STEP 5:

FIREFOX:
LAB 6
LAB#06

1. How to download python in windows.


2. Download from https://www.python.org/downloads/
3. Install it
4. Path: C:\Users\fjwu\AppData\Local\Programs\Python\Python38-32
5. Check version using command
“C:\Users\fjwu\AppData\Local\Programs\Python\Python38-32/python --version”

pip --version

6. Set environmental variable so that access from cmd easily from advanced system setting by adding path of
installed python and python scripts.
Answer:

a) Go to Control Panel\System and Security\System


b) Click on advanced System settings.
c) Click on environment variables.
d) Click on path and Edit it and add the path.

7. Check python –version


8. Check selenium package by using “pip install –U selenium”.

9. Download python IDE “pycharm” community open source.


10.
Example#01:

Example#02:

Code:
import time
from selenium import webdriver
driver = webdriver.Chrome(r'C:\Users\fjwu\PycharmProjects\labtask1\driver\chromedriver.exe')
driver.set_page_load_timeout(10)
driver.get("https://www.google.com/.")
driver.find_element_by_name("q").send_keys("automation step by step")
driver.find_element_by_name("btnk").click()
time.sleep(4)
driver.quit()

Output:
Pycharm:

On Google:
Lab 8
Suppose you are end user tester, you have to test an application e.g. calculator and send

reports towards developer. Using UFT, perform test on calculator desktop application, record

the steps. Save the result, iterate it for three iterations, and run it. Test results should in HTML

format.

UFT:
Micro Focus Unified Functional Testing (UFT) software, formerly known as QuickTest
Professional (QTP), provides functional and regression test automation for software applications and environments.

UFT supports keyword and scripting interfaces and features a graphical user interface. It uses the Visual Basic
Scripting Edition (VBScript) scripting language to specify a test procedure, and to manipulate the objects and
controls of the application under test. UFT allows developers to test all three layers of a program's operations from a
single console: the interface, the service layer and the database layer.

UFT was originally written by Mercury Interactive and called QuickTest ProfessionalMercury Interactive was
subsequently acquired by Hewlett-Packard (HP) in 2006. UFT 11.5 combined HP QuickTest Professional and HP
Service Test into a single software package, which was available from the HP Software Division until 2016, when
the division was ultimately sold to Micro Focus.

IMPLEMENTATION:
Lab 9
Using UFT to automatically test different websites and applications.

Creating UFT test:


Now recording website:

Recording starts:

Now run:
Result:

Now testing Flight (Application):

GUI Testing:

Create it:
Run it:
Recording start:

Recording:

Result:
API Testing:

Setting API Testing:

Result:

LAB#10
Launcher of Test link:

Test-link is most widely used web based open source test management tool. It synchronizes both requirements
specification and test specification together. User can create test project and document test cases using this tool.
With Test-Link you can create an account for multiple users and assign different user roles. Admin user can manage
test cases assignment task.

It supports both automated and manual execution of Test cases. The testers can generate Test Plan and Test Report in
a fraction of the time with this tool. It supports test reports in various formats like Excel, MS word, and HTML
formats. Apart from these, it also supports integration with many popular Defect tracking system like JIRA,
MANTIS, BUGZILLA, TRAC, etc. Since it is a web based tool, multiple users can access its functionality at the
same time with their credentials and assigned roles

Advantages of Test Link

 It supports multiple projects


 Easy export and import of test cases
 Easy to integrate with many defect management tools
 Automated test cases execution through XML-RPC
 Easy filtration of test cases with version, keywords, test case ID and version
 Easy to assign test cases to multiple users
 Easy to generate test plan and test reports in various formats
 Provide credentials to multiple users and assign roles to them

Test Plan:
Test Plans are the basic unit for executing a set of tests on an application. Test Plans include Builds, Milestones,
User assignment and Test Results.
A Test Plan contains name, description, and collection of chosen Test Cases, Builds, Test Results, milestones, tester
assignment and priority definition. Each Test Plan is related to the current Test Project.
Test Plans may be created from the "Test Plan management" page by users with lead privileges for the current Test
Project. Press "Create" button and enter data.
Test Plan definition consists of title, description (html format) and status "Active" check-box. Description should
include the next information with respect to company processes:

 Summary/Scope
 Features to be tested
 Features to not be tested
 Test criteria (to pass tested product)
 Test environment, Infrastructure
 Test tools
 Risks
 References (Product plan or Change request, Quality document(s), etc.)
Test Plans are made up of Test Cases imported from a Test Specification at a specific point of time. Test Plans may
be created from other Test Plans. This allows users to create Test Plans from Test Cases that exist at a desired point
in time. This may be necessary when creating a Test Plan for a patch. In order for a user to see a Test Plan they must
have the proper rights. Rights may be assigned (by leads) in the define User/Project Rights section. This is an
important thing to remember when users tell you they can't see the project they are working on.
Test Plans may be deleted by users with lead privileges.
Test Case:
A Test Case describes a simple task in the workflow of an application. A test case is a fundamental part of Test Link.
After a tester runs a test case it can either pass, fail or block it. Test cases are organized in test suites. Test Cases
have the following parts:

 Identifier of a Test Case is assigned automatically by Test Link, and cannot be changed by users. This ID
composes from Test Project prefix and a counter related to the Test Project in which the Test Case is created.
 Title: could include either short description or abbreviation (e.g. TL-USER-LOGIN)
 Summary: should be really short; just for overview, introduction and references.
 Steps: describe test scenario (input actions); can also include precondition and clean-up information here.
 Expected results: describe checkpoints and expected behavior of a tested product or system.
 Attachments: could be added if configuration allows it.
 Importance: Test designer could set importance of the test [HIGH, MEDIUM and LOW].
 Execution type: Test designer could set automation support of the test [MANUAL/AUTOMATED]
 Custom fields: Administrator could define own parameters to enhance Test Case description or
categorization. Large custom fields (more than 250 characters) are not possible. But information could be added
into parent Test Suite and referred via custom fields. For example, you can describe Configuration 'standard',
'performance', 'standard_2' and refer via CF to this labels.

User
Each Test Link user has an assigned Role that defines the features available. The default types are: Guest, Test
Designer, senior tester, Tester, Leader and Administrator but custom roles can also be created.

Test Projects
Test Projects are the basic organizational unit of Test Link. Test Projects could be products or solutions of your
company that may change their features and functionality over time but for the most part remains the same. Test
Project includes requirements documentation, Test Specification, Test Plans and specific user rights. Test Projects
are independent and do not share data.
Test Specifications

Test Link breaks down the Test Specification structure into Test Suites and Test Cases. These levels are persisted
throughout the application. One Test Project has just one Test Specification.

Feature:

 User roles and management


 Grouping of test cases in test specifications
 Test plans
 Platforms
 Requirements with versioning and revisioning
 Support for testing different builds of the software
 Reports, charts and monitors
 Integration with other software using a provided API

Test Link is a web-based test management system that facilitates software quality assurance. It is developed and
maintained by Team test. The platform offers support for test cases, test suites, test plans, test projects and user
management, as well as various reports and statistics.

Steps of Installation
Step 1 − Go to https://www.apachefriends.org/index.html and click XAMPP for Windows as shown in the following
screenshot.

Step 2 − A pop-up will be displayed to save the file. Click Save File. It will start to download the file.

Step 3 − Run the .exe file to run the installation wizard. After clicking the .exe file, the XAMPP Setup wizard is
displayed as shown in the following screenshot. Click Next.

Step 4 − Next, the wizard displays all the component files (shown in the following screenshot) that will be
installed. Click Next after selecting the components.
Step 5 − Provide a folder name where XAMPP will be installed and click Next.

Step 6 − Ready to Install wizard is displayed. Click Next to start the installation.

Step 7 − After successful installation, it will prompt to start the control panel. Select the checkbox and click Finish.
It will open the XAMPP control panel as displayed in the following screenshot.
Step 8 − Click the Start button for Apache and MySQL required for TestLink as shown in the above screenshot.
Step 9 − To verify whether all the pre-requisites such as Apache, PHP and MySQL is installed properly, navigate
to any of the browser and type http://localhost. Then, press Enter.
Step 10 − It will display the dashboard of XAMPP. Click phpAdmin at the right top corner of the screenshot.

It will display General Settings, Application Settings, Details of Database, Web Server and phpMyAdmin as shown
in the following screenshot.

If the installation is not proper, this page won’t display. Till this point, all the pre-requisites are successfully
installed in the system.
Install and Launch TestLink
After successful installation of XAMPP, we need to work with TestLink.
Step 1 − Go to https://sourceforge.net/projects/testlink/ and click Download.

Step 2 − Now unzip the downloaded .tar file and rename the folder name as TestLink.
Step 3 − Go to XAMPP folder where it is installed and navigate to htdocs folder. Place the TestLink folder here as
shown in the following screenshot.

Step 4 − Go to TestLink package and open “config.inc.php” file, update path “$tlCfg→log_path” and
“$g_repositoryPath” as below −
$tlCfg→log_path = ‘D:/xampp/htdocs/testlink/logs/’;
$g_repositoryPath = ‘D:/xampp/htdocs/testlink/upload area/’;
Step 5 − Now open a browser and type http://localhost/Testlink in the navigation bar and press Enter. It will
display the installation page of TestLink.
Step 6 − Click New Installation.
Step 7 − Check the checkbox for Terms and Conditions and click the Continue button.

The system will check the pre-requisites to ensure everything is fine. A Continue button will appear at the bottom,
otherwise an error message will be displayed.
Step 8 − Click Continue as shown in the following screenshot.

Step 9 − In the next step, Database Admin and Admin password is required to define MySQL access. TestLink
admin username/password can be anything given by the user.
Database login/password: root/<empty> (Default login/password of MYSQL for xampp)
Step 10 − Click “Process TestLink Setup” button. You should see the TestLink “Installation was successful!”
message being displayed.
Step 11 − Now again navigate to http://localhost/testlink
You will see the login page as shown in the following screenshot.

Lab 11

Test Specification:
Test link:
Test-link is most widely used web based open source test management tool. It synchronizes both requirements
specification and test specification together. User can create test project and document test cases using this tool.
With Test-Link you can create an account for multiple users and assign different user roles. Admin user can manage
test cases assignment task.

Test specification:

Test Specification defines the structure of Test Design. Creation of Test Suits and Cases are done through test
specification. However, one project can have only one test specification.Test Specification can be accessed by
navigating to Test Specification → Test Specification from the dashboard.
It is divided into two panels − Settings and Filter (Left side) and Test Project (right side).

Test Suite:

Test suite :
Test suite is a container that has a set of tests which helps the testers in executing and reporting the test execution
status. It can take any of the three states namely Active, In progress, and Completed.
A test case can be added to multiple test suites and test plans. After creating a test plan, test suites are created,
which in turn can have any number of tests.
TestLink supports tree structure for test suites. There could be multiple sub-test suites under a test suite.
Test Cases:
A test case is a document, which has a set of test data, preconditions, expected results and post-conditions,
developed for a particular test scenario in order to verify compliance against a specific requirement.
Test case acts as the starting point for test execution, and after applying a set of input value the application has
a definitive outcome and leaves the system at some endpoint, also known as execution post-condition.

Lab 12:

Import:
 To import the test suite, go to Test Specifications → Test Specification from the dashboard.
 Click the Actions icon on the right pane
 TestLink supports XML and CVS file to import data. It supports importing the data for test suites, test
cases, requirements, test execution results, keywords, etc. However, for few cases it supports only XML
and in few cases both XML and CVS.

Export:
 Go to Requirement Specification
 TestLink supports XML and CSV file to export data. It supports exporting the data of test suites, test cases,
requirements, test execution results, keywords, etc. However, for a few cases it supports only XML and in
few cases both XML and CSV.
Test Specification Document:
o Go to Test Specification
o Select the folder to generate a test specification document.
o Click the Settings icon present on the right side panel.
o It opens the Test Suite Operations page.
Report and metrics:
o Select Test Execution → Test Reports and Metrics from the dashboard
o The right pane displays a summary of each report.

Charts:
This report requires graphic library installed on the web server. “Last Test Result” logic is used for all four charts.
To access the Charts, click the Charts on the left pane as shown below.

Report contains the following charts −


Pie chart of overall passed / failed / blocked / and not run Test Cases as shown above.
Bar chart of Results by Keyword as shown below.

Bar chart of Results by Top Level Suite as shown below.

The bars in the bar charts are colored such that the user can identify the approximate number of passed, failed,
blocked, and not run cases.

LAB 13

QTP
QTP stands for QuickTest Professional, a product of Hewlett Packard (HP). This tool helps testers to perform an
automated functional testing seamlessly, without monitoring, once script development is complete.
HP QTP uses Visual Basic Scripting (VBScript) for automating the applications. The Scripting Engine need not
be installed exclusively, as it is available as a part of the Windows OS. The Current version of VBScript is 5.8,
which is available as a part of Win 7. VBScript is NOT an object-oriented language but an object-based language.

Testing Tools
Tools from a software testing context, can be defined as a product that supports one or more test activities right
from planning, requirements, creating a build, test execution, defect logging and test analysis.

Classification of Tools
Tools can be classified based on several parameters. It includes −

 The purpose of the tool


 The activities that are supported within the tool
 The type/level of testing it supports.
 The kind of licensing (open source, freeware, commercial)
 The technology used

Types of Tools

Sr.No. Tool Type Used for Used by

1 Test Management Tool Test Managing, scheduling, defect logging,


Testers
tracking and analysis.

2 Configuration management For Implementation, execution, tracking changes All Team


tool members

3 Static Analysis Tools Static Testing Developers

4 Test data Preperation Tools Analysis and Design, Test data generation Testers

5 Test Execution Tools Implementation, Execution Testers

6 Test Comparators Comparing expected and actual results All Team


members

7 Coverage measurement tools Provides structural coverage Developers


8 Performance Testing tools Monitoring the performance, response time Testers

9 Project planning and Project


For Planning
Tracking Tools Managers

10 Incident Management Tools For managing the tests Testers

Where QTP Fits in?


QTP is a Functional testing tool, which is best suited for regression testing of the applications. QTP is a
licensed/commercial tool owned by HP, which is one of the most popular tools available in the market. It compares
the actual and the expected result and reports the results in the execution summary.

QTP – History and Evolution


HP Quick Test Professional was originally owned by Mercury Interactive and it was acquired by HP. Its original
name was Astra Quick Test and later named as Quick Test Professional but the latest version is known as Unified
Functional Tester (UFT).

Version History
Now let us take a look at the version history of QTP.

Versions Timelines

Astra Quick Test v1.0 to v5.5 - Mercury Interactive May 1998 to Aug 2001

QuickTest Professional v6.5 to v9.0 - Mercury Interactive Sep 2003 to Apr 2006

Hp-QuickTest Professional v9.1 to v11.0 - Acquired and Released by HP Feb 2007 to Sep 2010

Hp-Unified Functional Testing v11.5 to v11.53 2012 to Nov 2013

Advantages
 Developing automated tests using VBScript does not require a highly skilled coder and is relatively easy
when compared to other object oriented programming languages.
 Easy to use, ease of navigation, results validation, and Report generation.
 Readily Integrated with Test Management Tool (Hp-Quality Center) which enables easy scheduling and
monitoring.
 Can also be used for Mobile Application Testing.
 Since it is an HP product, full support is provided by HP and by its forums for addressing technical issues.
Disadvantages
 Unlike Selenium, QTP works in Windows operating system only.
 Not all versions of Browsers are supported and the testers need to wait for the patch to be released for each
one of the major versions.
 Having said, that it is a commercial tool, the licensing cost is very high.
 Even though scripting time is less, the execution time is relatively higher as it puts load on the CPU &
RAM.

You might also like