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

Software Testing

Software testing

Uploaded by

Tripti Thakur
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 views24 pages

Software Testing

Software testing

Uploaded by

Tripti Thakur
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

Software testing is the process of evaluating and verifying that a software product or

application functions correctly, securely and efficiently according to its specific


requirements.

The primary benefits of robust testing include delivering high-quality software by


identifying bugs and improving performance. Testing is no longer a final step before
release—it begins at the design planning phase and continues after deployment.

History of software testing:

Software testing began alongside the development of software engineering, which


emerged just after World War II. Computer scientist Tom Kilburn is credited with writing
the first piece of software, which debuted on 21 June 1948, at the University of
Manchester in England. It performed mathematical calculations through basic machine
code instructions.

Roles And Responsibilities of a Software Tester:

1. Study and analyze the software application - Go through product


documentation, requirements specifications and design documents to gain in-
depth understanding of the system and testing scope.

2. Develop test plans - Outline the schedule of tasks, resources, test items, risks,
approaches and exit criteria for the testing effort based on priorities and
objectives.

3. Design test cases - Prepare detailed test scenarios to evaluate various


functions and performance of the system.

4. Set up test environments and data - Get the required software, hardware, tools
and datasets ready for test execution.

5. Run tests - Execute the test cases while closely observing system behavior.
Perform additional exploratory tests when needed.

6. Log and report defects - Document in detail any defects, crashes or deviations
found. Categorize, isolate test data and steps to reproduce. Assign to
appropriate teams for analysis and remediation.

7. Retest bug fixes - Confirm resolved bugs no longer occur. Also ensure other
areas have not been impacted negatively.

8. Regression test entire system - Whenever new code changes or features are
introduced, conduct selective testing across the software to catch any fresh
quality issues or errors.
9. Provide testing status updates - Keep relevant teams and stakeholders
informed on progress, test coverage, defect metrics and overall quality through
reports.

10. Recommend improvements - Continuously analyze processes and suggest


ways to increase efficiency, coverage and defect detection rates.

11. Maintain documentation - Record all testing details including plans, cases,
results, defects, data, scripts, reports etc. for traceability, analysis and retesting.

The Core Concepts:

Error: A human mistake made during the software development process. This could
be a misunderstanding of a requirement by a business analyst, a design flaw by an
architect, or a typo in the code by a developer.

An error is a human mistake made during any phase (design, coding, requirement,
etc.).

Fault: A manifestation of an error in the software code or design. It is the specific


piece of incorrect code or logic that, when executed under certain conditions, can
cause a problem.

A fault (or defect) is the incorrect part inside the system caused by an error.

Defect: A deviation from the specified requirements or expected results. When a


tester finds that the software does not behave as documented, it is officially
recorded as a defect.

A defect is a problem or flaw in a software system where it does not meet the
expected requirements or behavior.

Bug: An informal or colloquial term used by developers and testers to refer to a


defect or fault in the system. Some organizations formally define a "bug" as a defect
that has been accepted by the development team for fixing.

A bug is a fault that is discovered and reported during testing.

Failure: The visible, observable result of a defect or fault during software execution.
A failure occurs at runtime when the software fails to perform its intended function,
often encountered by end-users in production.

A failure happens when the system does not give the expected result.

Objectives of Software Testing:


1. Identify Defects Early – Detect bugs before they impact later stages of
development, saving time and reducing costly fixes.

2. Verify Requirements Are Met – Ensure the software meets all documented
requirements and user stories as part of the overall goals of software testing.

3. Ensure Quality & Reliability – Confirm the product performs consistently and
reliably under expected operating conditions.

4. Improve User Experience – Identify and resolve usability issues that could
hinder adoption or customer satisfaction.

5. Reduce Risks – Uncover security, compliance, or performance vulnerabilities


before release to minimize potential failures.

6. Validate Performance Standards – Check that the system meets speed,


scalability, and stability benchmarks.

7. Support Continuous Improvement – Provide actionable insights that improve


development processes over time, aligning with long-term objectives of testing.

8. Enable Confident Releases – Give stakeholders the assurance that the product
is ready for launch with verified quality standards.

Types of Testing Objectives:

The main objectives of software testing are to ensure that the software is reliable,
efficient, and meets the user's requirements. The following are the typical objectives of
software testing:

• To identify defects in the software and prevent them from becoming errors or
bugs in the final product.

• To validate that the software meets the specified requirements and functionality.

• To improve the quality of the software by identifying and removing defects.

• To ensure that the software is user-friendly and meets the user's needs.

• To ensure that the software is secure and protects sensitive data.

Examples of Testing Objectives in Real Projects


Web Application – For an e-commerce site, testing objectives might include verifying
secure payment processing, ensuring fast page load times, and confirming cross-
browser compatibility for major browsers like Chrome, Safari, and Edge.

Mobile Application – In a healthcare app, objectives of testing could involve validating


HIPAA compliance, confirming accurate data synchronization between devices, and
testing push notifications across iOS and Android platforms.

Enterprise System – For a financial ERP platform, key goals of software testing may
include validating complex transaction workflows, ensuring system scalability for
thousands of concurrent users, and confirming integration accuracy with third-party
accounting software.

Goals of Software Testing:

1. Defect Detection

Find bugs, errors, and inconsistencies before the software reaches end users. The
earlier a defect is caught, the cheaper and easier it is to fix.

2. Quality Assurance

Verify that the software meets defined quality standards — functionality, performance,
security, and usability all align with expectations.

3. Validation & Verification

• Verification — Are we building the product right? (Does it match the spec?)

• Validation — Are we building the right product? (Does it solve the user's actual
problem?)

4. Reliability & Stability

Ensure the software behaves consistently under normal and abnormal conditions,
including edge cases and unexpected inputs.

5. Security Assurance

Identify vulnerabilities that could be exploited — protecting user data, preventing


breaches, and ensuring compliance with regulations.

6. Performance Evaluation

Check that the system responds within acceptable time limits under various loads (load
testing, stress testing, etc.).
7. Confidence & Risk Reduction

Give stakeholders and developers confidence that the system is ready for release by
systematically reducing the risk of failures in production.

8. Regression Prevention

Ensure that new changes don't break existing, working functionality — especially critical
in agile/continuous delivery environments.

9. Compliance Verification

Confirm the software meets industry standards, legal requirements, or contractual


obligations (e.g., GDPR, HIPAA, ISO standards).

10. User Satisfaction

Ultimately, testing ensures the end product is usable, intuitive, and meets user
expectations — reducing churn and support costs.

D/w verification and validation:

Verification is the process of checking whether the software is being built correctly
according to the requirements and design documents. It is a static process involving
reviews, walkthroughs, and inspections, and asks the question: "Are we building the
product right.

Validation is the process of checking whether the correct software has been built and
whether it meets the actual needs of the user. It is a dynamic process involving actual
execution of the software through testing, and asks the question: "Are we building the
right product.

Software testing life cycle:


Requirement Analysis:

At this stage, software testers collaborate with key stakeholders to gather and
understand testing requirements. The insights gained are documented in
the Requirement Traceability Matrix (RTM), forming the backbone of the testing
strategy.
Product Owner: Represents business goals and defines the problem that needs
solving.
Developer: Builds the solution based on the product owner’s specifications.
Tester: Validates that the solution works correctly and identifies issues.

Test Planning:

Once the requirements are understood, the Test Planning phase begins. This is
the stage in the Software Testing Life Cycle where the test strategy is formalized.
• Test Objectives: Identify what aspects (functionality, usability, performance, or
security) need to be tested.
• Test Deliverables: Define the test cases, scenarios, and data that will be
produced and monitored.
• Scope: Clarify which features will be tested and which will not (in-scope vs. out-
of-scope).
• Resources: Estimate the costs, tools, and personnel required for the testing
process.
• Timeline: Set milestones for test phases alongside the software development
cycle.
• Test Approach: Choose appropriate testing techniques (e.g., black box or white
box testing), levels (unit, integration, system), and types (regression, smoke,
performance).

Test Case Development:

In this stage of the Software Testing Life Cycle, testers start developing test cases
based on the requirements and planning outcomes. A test case outlines how a
particular feature or functionality will be tested.
A strong test case should clearly outline what’s being tested, expected
outcomes, and pass/fail criteria.

Test Environment Setup:


This phase of the Software Testing Life Cycle involves configuring the test
environment: the hardware, software, and network conditions under which
testing will take place.
• Development Environment: Tools like Android Studio or Xcode, simulators for
virtual device testing, and local databases for early integration tests.
• Physical Devices: A variety of physical devices (iPhone, Android models) to
uncover issues that simulators might miss.

• Emulators/Simulators: Use Android Studio emulators or Xcode simulators


for iOS to quickly test different devices and configurations.

Test Execution:

Now that the test cases are written and the environment is set up, the Test
Execution phase begins. During this step in the Software Testing Life Cycle, test
cases are executed, and the outcomes are compared to the expected results.

The typical test case statuses during execution are:


• Untested: Test case hasn’t been executed yet.
• Blocked: Test case cannot be executed due to dependencies (e.g., unresolved
defects, missing data).
• Failed: The actual result didn’t meet the expected result.
• Passed: Test case executed successfully, and the expected outcome was
achieved.
• Skipped: Test case was not relevant to the current testing cycle.

Test Cycle Closure:

The final phase in the Software Testing Life Cycle is Test Cycle Closure. After all
test cases have been executed, the focus shifts to analyzing the outcomes and
creating the Test Report.

• Execution Environment: Details like operating systems, devices, and browsers


used during testing.
• Test Log: A chronological record of test execution and outcomes.
• Test Results: Charts and graphs showing pass/fail ratios, performance trends,
and execution times.
• Comparative Analysis: Data comparing results from different software versions,
identifying improvements or regressions.
• Recommendations: Actionable insights for debugging and future
improvements.

White box Testing:

White box testing is a software testing technique that focuses on examining

the internal structure and working of an application. It ensures that the code

logic, flow, and implementation behave correctly as per requirements.

• Provides complete access to source code, design, and architecture, allowing

testing from an inside-out perspective.

• Validates internal logic such as conditions, loops, branches, and execution

paths to ensure correct behavior.

• Ensures thorough code coverage by creating test cases for different paths,

including techniques like statement coverage.

Architecture for White Box Testing

White box testing, also known as structural or glass box testing, focuses on

examining the internal structure and code of an application. It ensures that the

logic, control flow, and data handling work correctly at the code level.

• Code Analysis: Involves examining the source code to understand logic,

detect dead or unreachable code, and measure coverage using techniques

like statement, branch, and condition coverage.

• Control Flow & Path Identification: Includes creating control flow graphs

(CFG) and using cyclomatic complexity and path testing to identify all

important execution paths.

• Test Case Design: Test cases are designed based on internal code structure

to achieve maximum path coverage, with well-defined inputs and expected

outputs.
• Execution & Reporting: Tests are executed at unit and integration levels,

and detailed reports are generated highlighting coverage metrics, defects, and

overall code quality.

Workflow for White Box Testing:

Step 1: Code Understanding & Analysis


Review the source code, design, and requirements. Identify key components
such as functions, decision points, loops, and data flow, and assess
complexity.

Step 2: Path Identification


Create control flow graphs (CFG) to map execution paths. Identify
independent paths and conditions using techniques like basis path testing
and coverage methods.

Step 3: Test Case Design


Develop detailed test cases with appropriate inputs to cover maximum code
paths. Ensure different conditions, loops, and edge cases are included, and
clearly define expected outputs based on the program logic.

Step 4: Test Execution & Coverage Measurement


Execute the test cases at unit and integration levels. Use testing tools to
measure code coverage (such as statement and branch coverage) and
identify any untested or weak areas in the code.

Step 5: Result Analysis & Reporting


Compare actual results with expected outcomes to identify defects. Log and
track issues, perform re-testing after fixes, and generate a comprehensive
report including coverage metrics, defects found, and suggestions for code
improvement.
Type of white box testing technique:

1. Path Testing
Path Testing focuses on testing all possible execution paths in the program
to ensure each path behaves as expected.
• Verifies logical conditions, branches, and decision points.
• Ensures all code paths are executed at least once.
• Helps improve efficiency by identifying redundant or unused paths.

2. Loop Testing
Loop Testing ensures that loops in the program execute correctly under
different conditions.
• Validates loop initialization, execution, and termination.
• Detects issues like infinite loops or incorrect iteration counts.
• Checks loop behavior with minimum, maximum, and boundary values.

3. Unit Testing
Unit Testing tests individual components or functions of the application in
isolation.
• Ensures each unit performs its intended functionality correctly.
• Validates logic against design requirements during development.
• Helps detect defects early at the smallest level of code.

4. Mutation Testing
Mutation Testing evaluates the quality of test cases by making small
changes (mutations) in the code.
• Introduces minor code modifications to check test effectiveness.
• Ensures existing test cases can detect errors.
• Helps improve overall test coverage and robustness.

5. Integration Testing
Integration Testing checks how different modules or components work
together as a system.
• Verifies interaction between integrated units after unit testing.
• Ensures smooth data flow across modules.
• Identifies interface and communication issues.

6. Penetration Testing
Penetration Testing simulates cyber-attacks to identify vulnerabilities in the
system.
• Detects security weaknesses in the application.
• Ensures protection against unauthorized access.
• Helps strengthen system security before deployment.

Advantages of White Box Testing:


White box testing provides deep insight into the internal structure of an
application, improving code quality, reliability, and performance.
• Thorough Code Coverage: Ensures detailed testing of internal logic, control
structures, and execution paths, reducing the chances of untested or hidden
code.
• Code Optimization: Helps identify redundant, unused, or inefficient code,
leading to better performance and improved code maintainability.
• Early Defect Detection: Allows testing to start early in the development
phase, enabling quick identification and fixing of defects before they become
complex.
• Easy SDLC Integration: Can be seamlessly integrated into different phases
of the Software Development Life Cycle, supporting continuous testing and
improvement.
• Detection of Complex Defects: Helps uncover critical and hidden issues
within the code that may not be detected through other testing techniques.

Disadvantages of White Box Testing:


White Box Testing focuses on internal code structure and logic, but it has
several limitations related to complexity, cost, and maintenance.
• Requires Programming Knowledge: Testers must have strong coding and
technical skills to understand and test internal logic effectively.
• Time-Consuming Process: Writing, executing, and maintaining detailed test
cases takes significant time, especially for complex systems.
• High Cost: Requires skilled professionals and specialized tools, increasing
overall testing expenses.
• Limited to Code-Level Testing: Focuses only on internal logic and may miss
missing requirements, UI issues, or usability problems.
• Not Scalable for Large Systems: Testing all paths and conditions becomes
difficult as application size and complexity increase.
• High Maintenance Effort: Test cases need frequent updates whenever there
are changes in the code, increasing maintenance workload.

Black Box Testing:

Black Box Testing is a software testing technique where the tester evaluates

the functionality of an application without knowing its internal code structure. It

focuses on inputs and expected outputs based on requirements.

• Tests system behavior without looking at internal logic

• Based on requirements and specifications

• Can be performed at all testing levels (functional, system, acceptance)

Architecture for Black Box Testing:

1 . Input Layer: This layer includes all types of inputs provided to the system,
such as user inputs, test data, or external requests.

2. System Under Test (SUT): The actual application where the business

logic is executed. In Black Box Testing, the tester does not have knowledge

of the internal implementation.


3. Output Layer: This layer represents the system’s response, such as

results, messages, or UI changes, which are validated during testing.

4. Expected Result (Test Oracle): The predefined correct output based on

requirements. It is used to compare and validate the actual system output.

5. Test Case Repository: A centralized collection of test cases, test

scenarios, and test data used for execution and future reference.

Workflow of black box testing:

Step 1: Test Input

• Tester provides input data such as username, password, or form values

• Inputs include valid, invalid, and boundary cases

Step 2: System Under Test (Black Box)

• The application processes the input.

• Internal logic is hidden from the tester.

Step 3: Actual Output

• System generates a response (e.g., success or error message)

• Output is recorded for validation

Step 4: Compare with Expected Output

• Actual result is compared with expected result

• Validation is based on requirements/specifications

Step 5: Pass / Fail Result


• Pass : If actual output = expected output

• Fail : If actual output ≠ expected output

Advantages Of Black Box Testing:

• Does not require knowledge of internal code or programming skills, making

it accessible to testers with diverse backgrounds

• Effective for testing large and complex systems at the functional level

• Executes tests from the end user’s or client’s perspective, ensuring better

usability validation

• Test cases are easy to design, understand, and reuse

• Helps identify ambiguities, missing requirements, and inconsistencies in

functional specifications.

D\w Black Box Testing White Box Testing

Internal None; the internal structure is Full access to source code and

Knowledge hidden. architecture.

Functionality and user Code logic, flow, and structural


Primary Focus
requirements. integrity.

Programming Mandatory; requires technical


Not required.
Skills expertise.

Specialized testers or end- Developers or engineers with


Typical Tester
users. code access.

Best for high levels (System, Best for low levels (Unit,
Testing Levels
Acceptance). Integration).

Generally less time- Exhaustive and more time-


Time Taken
consuming. consuming.
High (detailed code-level
Granularity Low (high-level behavior).
analysis).

Alternative Closed-box, data-driven, or Glass-box, clear-box, or

Names behavioral. structural.

Software Testing Techniques:

Software testing techniques are methods used to design and execute tests to

evaluate software applications. The following are common testing techniques:

1. Manual testing - Involves manual inspection and testing of the software by

a human tester.

2. Automated testing - Involves using software tools to automate the testing

process.

3. Functional testing - Tests the functional requirements of the software to

ensure they are met.

4. Non-functional testing - Tests non-functional requirements such as

performance, security, and usability.

5. Unit testing - Tests individual units or components of the software to

ensure they are functioning as intended.

6. Integration testing - Tests the integration of different components of the

software to ensure they work together as a system.

7. System testing - Tests the complete software system to ensure it meets the

specified requirements.

8. Acceptance testing - Tests the software to ensure it meets the customer's

or end-user's expectations.

9. Regression testing - Tests the software after changes or modifications have

been made to ensure the changes have not introduced new defects.
10. Performance testing - Tests the software to determine its performance

characteristics such as speed, scalability, and stability.

11. Security testing - Tests the software to identify vulnerabilities and ensure it

meets security requirements.

12. Exploratory testing - A type of testing where the tester actively explores

the software to find defects, without following a specific test plan.

13. Boundary value testing - Tests the software at the boundaries of input

values to identify any defects.

14. Usability testing - Tests the software to evaluate its user-friendliness and

ease of use.

15. User acceptance testing (UAT) - Tests the software to determine if it meets

the end-user's needs and expectations.

Levels of Software Testing:

Software testing ensures that an application functions correctly by validating it at

different stages of development, from individual components to the complete

system.

• Testing begins with small units or components.

• It progresses step by step to verify the entire system.

The Levels of Software Testing are mainly divided into four categories, which are

as follows:

1. Unit Testing
Unit Testing is the first level of software testing and focuses on verifying

individual units or components of the application in isolation. The main goal is to

identify and fix defects early before integrating these components with other parts

of the system.

Unit tests help developers spot bugs early in the development process, making it

easier and quicker to fix them. It's the first layer of defense to verify that each part

of the application performs as expected.

• Testing individual functions or components.

• Ensuring correct behavior at the smallest level.

• Catching errors early.

2. Integration Testing

After Unit Testing, Integration Testing is performed to verify how different

modules or components work together. This level checks how different modules

or components of the software work together. It's important because even if

individual parts work perfectly, they might face issues when interacting with one

another.

Integration testing ensures that data flows correctly between modules and that

they communicate seamlessly. It helps catch problems that might arise when

different parts of the system interact.

3. System testing

System Testing is performed to evaluate the complete and fully integrated

software system to ensure it meets the specified requirements. This stage checks

whether the entire system functions as expected in a real-world environment. It


includes both functional and non-functional tests to ensure that the software

meets customer needs.

• Full end-to-end testing of the software.

• Verifying both functional and non-functional requirements.

• Testing the software's behavior in real-world conditions.

4. Acceptance Testing

Acceptance Testing, also known as User Acceptance Testing (UAT), is the final

test before releasing the software to the end-users. In this phase, the customer or

end-users verify if the software meets their needs and expectations.

UAT is crucial because it verifies whether the software is ready for production and

meets business requirements. It’s the last chance to catch any overlooked issues

before deployment. If the software passes this stage, the customer gives the

green light for release.

• Validating the software against business requirements.

• Ensuring the software meets customer expectations.

• Getting final approval from the customer.

Testing task:

Testing tasks in software testing refer to the specific activities performed

throughout the Software Testing Life Cycle (STLC) to ensure an application's

quality and reliability. These tasks range from initial planning and requirement

analysis to the final evaluation and reporting of results.

Testing Activities:
Test Planning: Defining the project's testing scope, objectives, and strategy while

identifying required resources and risks.

Test Analysis & Design: Analyzing the "test basis" (requirements) to determine

what to test and designing specific test cases.

Test Implementation: Preparing the test environment, gathering test data, and

creating automated test scripts.

Test Execution: Running the designed tests (manually or via tools), comparing

actual vs. expected results, and logging any defects found.

Test Completion: Checking if all defect reports are closed and creating a final

summary report for stakeholders

Software Testing Tools:

Software testing tools are used to make the testing process faster, more accurate,

and more efficient. They are categorized based on the type of testing they support.

1. Functional Testing Tools These tools test whether the software works as

expected. Popular tools include Selenium, which is used for automating web

browser testing, and QTP/UFT (Quick Test Professional), which is used for

functional and regression testing. Katalon Studio is another widely used tool that

supports both web and mobile testing.

2. Performance Testing Tools These tools check the speed, stability, and

scalability of software. JMeter is the most popular open-source tool used for load

and performance testing. LoadRunner is another tool used for measuring system

performance under heavy load.


3. Unit Testing Tools These tools test individual components or units of code.

JUnit is used for Java applications, NUnit is used for .NET applications, and PyTest

is used for Python-based applications.

4. Bug Tracking Tools These tools help in recording, tracking, and managing

defects. JIRA is the most widely used bug tracking and project management tool.

Bugzilla and Mantis are also popular open-source bug tracking tools.

5. Test Management Tools These tools help in planning, organizing, and

managing test cases. TestRail and Zephyr are commonly used test management

tools that integrate with JIRA.

6. Mobile Testing Tools These tools are used to test mobile applications. Appium

is the most popular open-source tool for automating mobile app testing on both

Android and iOS platforms.

7. Security Testing Tools These tools identify vulnerabilities in software. OWASP

ZAP and Burp Suite are widely used tools for finding security flaws in web

applications.

8. API Testing Tools These tools test the functionality and performance of APIs.

Postman and SoapUI are the most commonly used tools for API testing.

Purpose of a Scope Management Plan in software testing:

• Clarifies Project Goals: The plan defines how project objectives will be

identified, documented, and communicated so all stakeholders share a

common understanding of the intended outcomes.


• Defines Work and Boundaries: It establishes what work is included and

excluded, preventing confusion and protecting the project from

uncontrolled expansion.

• Reduces Scope-Related Risks: Clear scope processes reduce ambiguity,

requirement gaps, and disputes that often lead to delays and rework.

• Optimizes Resource Utilization: With well-defined boundaries, resources

are allocated efficiently to approved work only.

• Aligns Clients and Stakeholders: A shared scope reference ensures

expectations are realistic and mutually agreed upon.

• Enables Adaptability with Control: The plan provides a structured way to

evaluate and approve necessary changes without disrupting project

stability.

• Provides a Management Foundation: It serves as a governing document for

project managers to plan, execute, and control scope throughout the

project.

You might also like