0% found this document useful (0 votes)
3 views16 pages

Software Testing - Unit 5

The document discusses the differences between manual and automation testing, highlighting their definitions, advantages, and disadvantages. It introduces Selenium as a key automation tool, detailing its components like Selenium IDE and WebDriver, along with their features and limitations. Additionally, it covers metrics and measurements in software testing, explaining product and process metrics and their importance in evaluating software quality and testing efficiency.

Uploaded by

sachin gade
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)
3 views16 pages

Software Testing - Unit 5

The document discusses the differences between manual and automation testing, highlighting their definitions, advantages, and disadvantages. It introduces Selenium as a key automation tool, detailing its components like Selenium IDE and WebDriver, along with their features and limitations. Additionally, it covers metrics and measurements in software testing, explaining product and process metrics and their importance in evaluating software quality and testing efficiency.

Uploaded by

sachin gade
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

Unit – V: Testing Tools and Measurements

5.1 Manual Testing vs Automation Testing

Manual Testing

Definition

Manual Testing is the process of testing software manually by executing test cases
without using automation tools.

Explanation

In manual testing, testers check the functionality of the software by performing test steps
manually. The tester interacts with the application just like an end user.

Testers provide different inputs and verify whether the system produces the expected
outputs.

Manual testing is commonly used for:

• Exploratory testing
• Usability testing
• Ad-hoc testing
• Small projects

Manual testing does not require programming knowledge but requires careful
observation and understanding of system behavior.

Real-Time Example

Testing a website login page:

1. Open the website.


2. Enter username and password.
3. Click the login button.
4. Check whether login is successful.

This process is performed manually by the tester.


Automation Testing

Definition

Automation Testing is the process of using software tools or scripts to execute test cases
automatically and verify the results.

Explanation

In automation testing, testers use automation tools and scripts to run test cases
automatically. These tools simulate user actions and verify system behavior.

Automation testing is especially useful for:

• Regression testing
• Performance testing
• Repetitive testing tasks
• Large software systems

Automation testing improves speed, accuracy, and efficiency of testing.

Common automation tools include:

• Selenium
• QTP / UFT
• TestComplete
• Appium

Real-Time Example

Using Selenium to automatically test a web application login process for multiple
users.

The automation script automatically enters usernames and passwords and checks
whether login succeeds.

Difference Between Manual Testing and Automation Testing

Aspect Manual Testing Automation Testing


Performed manually by Performed using automated
Execution
testers tools
Speed Slower Faster
Accuracy More chances of human error More accurate
Cost Lower initial cost Higher initial cost
Best Used Small projects, exploratory Large projects, repetitive
For testing tests
Advantages of Software Testing

1. Improves software quality


Testing helps detect defects and improves system reliability.
2. Detects defects early
Early detection reduces development and maintenance cost.
3. Ensures customer satisfaction
Reliable software increases user trust.
4. Improves system security
Testing helps identify vulnerabilities in the system.
5. Reduces risk of software failure
Thorough testing prevents system crashes.

Disadvantages of Software Testing

1. Time consuming
Testing requires significant time and effort.
2. Costly process
Large testing projects require tools and skilled testers.
3. Cannot guarantee error-free software
Testing reduces defects but cannot guarantee completely bug-free software.
4. Requires skilled testers
Effective testing requires trained professionals.

5.2 Selecting a Test Tool

Selecting an appropriate testing tool is an important activity in software testing. The


correct tool helps improve the efficiency, speed, and accuracy of testing.

The selection of a testing tool depends on several factors such as project requirements,
budget, compatibility, and technical support.

Criteria for Selecting a Test Tool

Definition

Criteria for selecting a test tool are the factors that must be considered while choosing a
suitable software testing tool for a project.

Explanation

Before selecting a testing tool, the testing team evaluates different aspects of the tool to
ensure that it meets the project requirements.

Important criteria include:


1. Project Requirements

The testing tool should support the type of application being tested, such as web
applications, mobile applications, or desktop applications.

Example: Selenium is suitable for web application testing.

2. Tool Compatibility

The tool should be compatible with the operating system, programming languages, and
technologies used in the project.

Example: The tool should support browsers like Chrome, Firefox, and Edge.

3. Ease of Use

The testing tool should be easy to learn and use so that testers can quickly perform
testing tasks.

4. Cost

The cost of the tool should fit within the project budget.

Some tools are open-source (free), while others are commercial tools that require a
license.

5. Technical Support

The tool should provide proper technical support and documentation.

6. Integration Capability

The testing tool should integrate with other tools such as CI/CD tools, defect tracking
tools, and test management tools.

Steps for Tool Selection and Deployment

Definition

These are the steps followed by an organization to choose and implement an appropriate
testing tool.

Explanation

The process of selecting and deploying a testing tool usually involves several steps.
1. Identify Testing Requirements

The testing team analyzes project requirements and identifies the type of testing
required, such as functional testing, performance testing, or automation testing.

2. Evaluate Available Tools

Different testing tools are compared based on their features, compatibility, and cost.

3. Proof of Concept

A small experiment is performed to verify whether the tool works effectively for the
project.

4. Tool Selection

After evaluation, the most suitable tool is selected.

5. Tool Deployment

The selected tool is installed and configured in the testing environment.

6. Training and Implementation

Testers are trained to use the tool effectively, and the tool is integrated into the testing
process.

Real-Time Example

A software company wants to automate testing for a web-based application.

1. The testing team identifies the need for automation testing.


2. They evaluate tools such as Selenium, TestComplete, and UFT.
3. They perform a proof-of-concept using Selenium.
4. Selenium is selected because it is open-source and supports multiple browsers.
5. The tool is installed and integrated with the testing environment.
6. Testers are trained to create automation scripts.

Advantages of Proper Tool Selection

• Improves testing efficiency


• Reduces manual effort
• Increases test coverage
• Speeds up testing process
• Improves software quality
5.3 Selenium: Introduction and Components, Automation Testing Tools

Selenium Introduction

Definition

Selenium is an open-source automation testing tool used for testing web applications
automatically across different browsers and platforms.

Explanation

Selenium is one of the most widely used automation testing frameworks for web
applications. It allows testers to create scripts that automatically interact with web
browsers and verify whether the application behaves as expected.

Selenium supports multiple programming languages such as:

• Java
• Python
• C#
• Ruby
• JavaScript

It also supports multiple web browsers including:

• Google Chrome
• Mozilla Firefox
• Microsoft Edge
• Safari

Selenium helps testers perform repetitive testing tasks quickly and accurately. It is
commonly used for regression testing and functional testing.

Real-Time Example

Testing a login page of an online shopping website using Selenium:

1. Selenium opens the browser automatically.


2. It enters username and password.
3. It clicks the login button.
4. It verifies whether login is successful.

This process runs automatically without manual intervention.


Components of Selenium

Selenium consists of several components that help perform automation testing.

1. Selenium IDE

Explanation

Selenium IDE is a browser extension used to record and playback test cases.

It allows testers to create automation scripts without programming knowledge.

Features:

• Record user actions in the browser


• Play back recorded tests
• Simple and easy to use

Example

A tester records the steps of filling a registration form and Selenium IDE automatically
creates the test script.

2. Selenium WebDriver

Explanation

Selenium WebDriver is the most powerful component of Selenium used to write


automation scripts in different programming languages.

It directly communicates with the browser and executes test commands.

Features:

• Supports multiple programming languages


• Supports multiple browsers
• Provides high performance automation

Example

A tester writes a Java program using Selenium WebDriver to test the login
functionality of a web application.
3. Selenium Grid

Explanation

Selenium Grid is used to run test cases on multiple machines and browsers
simultaneously.

It enables parallel testing, which reduces testing time.

Features:

• Executes tests on multiple browsers


• Supports distributed testing
• Improves testing efficiency

Example

A tester runs the same test case on Chrome, Firefox, and Edge browsers at the same
time.

Automation Testing Tools

Definition

Automation Testing Tools are software tools used to automatically execute test cases
and verify the results.

Explanation

Automation tools help testers perform repetitive testing tasks efficiently. These tools
improve testing speed, accuracy, and coverage.

Automation tools are commonly used for:

• Regression testing
• Performance testing
• Load testing
• Functional testing

Examples of Automation Testing Tools

1. Selenium

Open-source tool for web application testing.

2. QTP / UFT

Commercial automation tool developed by Micro Focus.


3. TestComplete

Automation testing tool used for desktop, web, and mobile applications.

4. Appium

Open-source tool used for mobile application testing.

5. LoadRunner

Tool used for performance and load testing.

Advantages of Selenium

• Open-source and free tool


• Supports multiple programming languages
• Works with multiple browsers
• Large community support
• Easy integration with other testing tools

Limitations of Selenium

• Only supports web application testing


• Requires programming knowledge
• No built-in reporting system
• Requires additional tools for test management

5.4 Selenium IDE: Introduction, Features, Limitations

Selenium IDE Introduction

Definition

Selenium IDE (Integrated Development Environment) is a browser-based tool used to


record, edit, and replay automation test cases for web applications.

Explanation

Selenium IDE is the simplest component of the Selenium framework. It is mainly


used for creating automation tests by recording user actions in a web browser.

It works as a browser extension, commonly available for browsers such as:

• Google Chrome
• Mozilla Firefox
With Selenium IDE, testers can record actions performed on a website (such as
clicking buttons or entering text), and the tool automatically converts these actions into
test scripts.

It is very useful for beginners in automation testing because it does not require
advanced programming knowledge.

The Selenium IDE provides an interface where users can:

• Record test cases


• Edit test steps
• Replay test cases
• Debug automation scripts

Real-Time Example

Testing a website registration form using Selenium IDE:

1. Start recording in Selenium IDE.


2. Open the website.
3. Enter name, email, and password.
4. Click the submit button.

Selenium IDE records all these steps and stores them as a test script, which can later be
replayed automatically.

Features of Selenium IDE

1. Record and Playback

Selenium IDE allows testers to record user actions and replay them automatically.

2. Easy to Use

It provides a simple graphical interface, making it suitable for beginners.

3. Test Case Creation

Users can easily create and manage multiple test cases.

4. Debugging Support

It allows testers to debug test scripts step by step.

5. Supports Multiple Browsers

Selenium IDE works with browsers like Chrome and Firefox.


6. Export Test Scripts

Recorded test cases can be exported to programming languages such as Java, Python,
or C# for advanced automation.

Limitations of Selenium IDE

1. Limited to Web Applications

Selenium IDE can only test web applications, not desktop or mobile applications.

2. Limited Programming Capability

It is not suitable for complex automation scripts.

3. Limited Browser Support

Although it supports major browsers, it has fewer features compared to WebDriver.

4. Not Suitable for Large Projects

For large and complex applications, Selenium WebDriver is preferred.

5. Limited Reporting Features

Selenium IDE does not provide advanced test reporting features.

Advantages of Selenium IDE

• Simple and easy to learn


• No programming knowledge required
• Quick test case creation
• Useful for beginners in automation testing
• Supports record-and-playback testing
5.5 Selenium WebDriver: Introduction, Advantages and Disadvantages

Selenium WebDriver Introduction

Definition

Selenium WebDriver is a powerful automation testing framework used to control web


browsers and execute automated test scripts for web applications.

Explanation

Selenium WebDriver is one of the main components of the Selenium automation


framework. It allows testers to write scripts in different programming languages to
automate web browser actions.

Unlike Selenium IDE, WebDriver interacts directly with the browser and executes
commands through browser drivers.

WebDriver supports multiple programming languages such as:

• Java
• Python
• C#
• Ruby
• JavaScript

It also supports multiple browsers including:

• Google Chrome
• Mozilla Firefox
• Microsoft Edge
• Safari

WebDriver works by sending commands to the browser driver, which then executes the
actions on the web browser.

Because of its flexibility and powerful features, Selenium WebDriver is widely used in
automation testing and regression testing.

Real-Time Example

Testing the login functionality of an e-commerce website using Selenium WebDriver:

1. The WebDriver opens the web browser.


2. It navigates to the website login page.
3. It enters the username and password automatically.
4. It clicks the login button.
5. It verifies whether the login was successful.

This testing process runs automatically through WebDriver scripts.


Advantages of Selenium WebDriver

1. Open-Source Tool

Selenium WebDriver is free to use and available as open-source software.

2. Supports Multiple Programming Languages

Test scripts can be written in languages like Java, Python, C#, and JavaScript.

3. Supports Multiple Browsers

It can run tests on browsers such as Chrome, Firefox, Edge, and Safari.

4. Faster Execution

WebDriver interacts directly with the browser, which improves test execution speed.

5. Integration with Other Tools

It can be integrated with tools like:

• TestNG
• JUnit
• Maven
• Jenkins

6. Supports Parallel Testing

Using Selenium Grid, tests can run simultaneously on multiple browsers and systems.

Disadvantages of Selenium WebDriver

1. Requires Programming Knowledge

Testers need knowledge of programming languages to create automation scripts.

2. Only Supports Web Applications

WebDriver cannot directly test desktop applications.

3. No Built-in Reporting

External tools are required for generating test reports.

4. Complex Setup

Initial setup and configuration may be difficult for beginners.


5. Limited Support for Image-Based Testing

WebDriver mainly works with web elements and may not handle image-based
automation easily.

5.6 Metrics and Measurements: Types of Metrics, Product Metrics and Process
Metrics

Metrics and Measurements

Definition

Metrics are quantitative measures used to evaluate the quality, performance, and
progress of software development and testing processes.

Measurement is the process of collecting data related to software products or processes.

Explanation

In software testing, metrics help teams understand the efficiency and effectiveness of
the testing process. Metrics provide numerical values that help measure various aspects
such as defect rate, test coverage, and development productivity.

Measurements help organizations:

• Monitor software quality


• Evaluate testing performance
• Identify problems in development and testing
• Improve software processes

Metrics are widely used in project management and quality assurance.

Types of Metrics

Software testing metrics are mainly classified into two types:

1. Product Metrics
2. Process Metrics
Product Metrics

Definition

Product Metrics measure the characteristics and quality of the software product itself.

Explanation

Product metrics focus on the size, complexity, design, performance, and quality of
the software system.

These metrics help determine whether the final software product meets quality
standards.

Common examples of product metrics include:

• Defect Density – Number of defects per unit of code.


• Code Complexity – Complexity level of program logic.
• Lines of Code (LOC) – Total number of lines in the program.
• Performance Metrics – System response time and throughput.

Real-Time Example

If a software system contains 20 defects in 1000 lines of code, the defect density helps
determine the quality of the product.

Process Metrics

Definition

Process Metrics measure the efficiency and effectiveness of the software development
and testing processes.

Explanation

Process metrics focus on how well the development and testing activities are
performed.

They help organizations improve the software development process by identifying


areas that need improvement.

Common examples of process metrics include:

• Test Case Execution Rate


• Defect Detection Rate
• Defect Removal Efficiency
• Test Coverage
Real-Time Example

If a testing team executes 200 test cases in a week and identifies 15 defects, these values
can be used to measure the efficiency of the testing process.

Difference Between Product Metrics and Process Metrics

Aspect Product Metrics Process Metrics


Software development and testing
Focus Software product quality
process
Measure characteristics of Measure efficiency of
Purpose
the product development/testing process
Defect density, code
Examples Defect detection rate, test coverage
complexity

Advantages of Using Metrics

• Helps measure software quality


• Improves project management
• Identifies weaknesses in development process
• Helps in decision making
• Improves software reliability

You might also like