0% found this document useful (0 votes)
4 views10 pages

Software Testing Debugging Information

The document provides an overview of software testing and debugging, detailing the processes, objectives, and techniques involved in ensuring software quality. It covers various testing types such as unit testing, integration testing, system testing, acceptance testing, regression testing, and security testing, along with their purposes and methodologies. Additionally, it discusses manual versus automated testing approaches and highlights the importance of debugging in identifying and fixing errors in software code.

Uploaded by

pruthvimane9699
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)
4 views10 pages

Software Testing Debugging Information

The document provides an overview of software testing and debugging, detailing the processes, objectives, and techniques involved in ensuring software quality. It covers various testing types such as unit testing, integration testing, system testing, acceptance testing, regression testing, and security testing, along with their purposes and methodologies. Additionally, it discusses manual versus automated testing approaches and highlights the importance of debugging in identifying and fixing errors in software code.

Uploaded by

pruthvimane9699
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 and Debugging

Software Testing:
 Software testing is a process of executing a program with objective of finding an error.
 Software quality should be a primary concern in Software development efforts.
 Software testing and evaluation are traditional methods of checking software quality.
 Software testing is successful only if all errors from the Software are removed.
 A technique that finds maximum uncovered errors in a good testing technique.
 But no technique is available which eill find all errors so we have to use a set of testing
technique to find errors.

Objectives of Software Testing:


 To verify that the software functions correctly.
 To validate that it meets user requirements.
 To detect and fix bugs early.
 To ensure quality, reliability, and performance.
 To improve user satisfaction.

Debugging
Debugging is the process of identifying, analyzing, and fixing errors or bugs in software
code. It is done after testing finds a problem, and helps ensure that the software behaves as
expected.
In simple terms: Testing finds the bugs, and Debugging removes them.

Objectives of Debugging:

 Locate the source of an error or bug


 Understand why and how it occurred
 Correct the issue in the code or logic
 Ensure that fixing one bug doesn’t create new errors

Common Types of Bugs:


Bug Type Description
Syntax Error Violates programming language rules (e.g., missing semicolon)
Runtime Error Occurs during program execution (e.g., divide by zero)
Logical Error Incorrect logic that causes wrong output
Semantic Error Misuse of language constructs or data types

Steps in Debugging Process:


1. Identify the bug (usually through testing)
2. Reproduce the bug (confirm it happens consistently)
3. Analyze the code to find the cause
4. Fix the bug by correcting the code
5. Retest the software to ensure it works and no new bugs are introduced

21
Debugging Techniques:

Technique Description
Print/Log Debugging Using print() or log statements to trace values
Backtracking Going back through the code from the point of failure
Breakpoints Pausing program execution to examine variables
Step-by-step Execution Running code line-by-line to see what happens
Rubber Duck Debugging Explaining the code to someone (or even an object) to find the error

Common Debugging Tools:


 GDB – GNU Debugger (C/C++)
 Visual Studio Debugger – for .NET
 Chrome DevTools – for web apps
 Eclipse/IntelliJ – for Java
 Python Debugger (pdb) – for Python

Example:
Suppose a student writes a program to calculate the average of marks but always gets 0.
After debugging, they realize the total was declared as an integer but not initialized before
adding values — a logical error.

Testing Levels
Unit Testing
Unit Testing is the process of testing individual components, functions, or modules of a
software application in isolation to ensure they work correctly.
A "unit" is the smallest testable part of a program — like a function, method, or class.

Purpose of Unit Testing:


 To verify that each module performs as expected
 To detect errors early in the development process
 To ensure that small pieces of code work independently

Characteristics of Unit Testing:


Feature Description
Scope Smallest parts like functions or methods
Performed By Developers during development
Test Type White-box testing
Speed Fast and automated
Tools Used JUnit (Java), PyTest (Python), NUnit (.NET), etc.

Benefits of Unit Testing:


 Makes debugging easier
 Supports code reusability and modularity
 Improves code quality
 Reduces overall cost by catching bugs early

22
Integration Testing
Integration Testing is a type of software testing where individual modules or components
are combined and tested together to verify that they interact correctly.
It checks the interfaces, data flow, and communication between modules after unit testing
is complete.

Purpose:
 To detect errors when modules are integrated
 To ensure that data is correctly passed between modules
 To find problems like incompatible data types, incorrect logic, or communication
issues

When It Is Done:
Integration Testing is performed after Unit Testing and before System Testing.

Approaches to Integration Testing:

Approach Description
Testing starts from top-level modules and moves down. Uses
Top-Down
stubs for lower modules.
Testing begins with lower modules and moves upward. Uses
Bottom-Up
drivers for higher modules.
Big Bang All modules are integrated at once and tested together.
Hybrid (Sandwich) A mix of both top-down and bottom-up approaches.

Example:
Imagine a Library Management System with the following modules:
1. Login Module – allows users to log in
2. Search Module – lets users search for books
3. Issue Book Module – issues a book to a user
Even if each module works correctly on its own, integration testing ensures they work
properly together.

Example scenario:
 After logging in, the user searches for a book.
 The system should correctly transfer the user’s session from Login to Search and
then to Issue Book.
 If the user ID is not passed correctly, the system may issue the book to the wrong
person — which integration testing helps identify.

System Testing
System Testing is a type of software testing where the entire integrated software system is
tested as a whole to ensure it meets the specified requirements.
It validates the complete and fully developed system, including all modules, functions, and
interfaces.
Purpose of System Testing:
 To verify that the entire system works as intended
 To check whether the software meets functional and non-functional requirements
 To identify defects in the overall behavior of the application

23
Types of System Testing:
Type Description
Functional Testing Checks features against requirements (e.g., login, search)
Performance Testing Checks how fast or responsive the system is
Security Testing Verifies protection of data and unauthorized access
Usability Testing Ensures user-friendliness and interface quality
Compatibility Testing Ensures the system runs on different devices/browsers

Example:
System: Online Food Delivery App
Modules involved:
 User Registration
 Menu Browsing
 Cart Management
 Payment Gateway
 Order Tracking

In System Testing, testers will check:

 Can a new user register and log in?


 Can users select items, add to cart, and make payment?
 Does the order tracking feature update in real time?
 Is the app responsive and fast?
 Is user data secure?

All these components are tested together as a whole system.

Acceptance Testing
Acceptance Testing is the final level of software testing where the system is tested from the
user's point of view to ensure it meets the business requirements and is ready for delivery.
It is done to validate that the software meets the needs of the customer and is acceptable
for release.

Purpose:
 To confirm that the software works as expected in real-world scenarios
 To ensure the client/user requirements are fulfilled
 To decide whether the software is ready for deployment

Performed By:
 End Users or Clients
 Sometimes by the testing team on behalf of the client

Types of Acceptance Testing:

Type Description
Alpha Testing Done at the developer's site by internal staff or clients
Beta Testing Done at the end-user's environment with real users
User Acceptance Testing (UAT) Ensures the system works according to business needs

24
Example:
System: Online Examination System
During Acceptance Testing, the client (college administrator) checks:
 Can teachers log in and create question papers?
 Can students take the test within a specific time window?
 Are results generated correctly?
 Is the UI easy for both teachers and students to use?
If everything works according to the agreed requirements, the system is accepted.

Key Features:
 Tests the entire system functionality
 Verifies business logic and workflows
 Conducted just before release
 Final approval step before deployment

Testing Types
White Box Testing (WBT):
White Box Testing (WBT) is related with the Structure (internal logic) of the [Link] test
the logic of program various test cases are designed which takes care of the following
-Every statement in a program must be executed at least once.
-Every path in a program must be executed at least once which is called ‘path analyses.
-Every logical decision must be executed on their true or false sides, this is called ‘conditional
coverage’
-Executes all their loops on their boundaries and within operational boundaries.
-Execute internal data structures and formula to ensure their validity.
path1: 1-2-3-4-7-8

Path2:1-2-5-6-7-8 1

3 5

4 6
7

Fig.: paths in a program

-In WBT, code auditing is done to determine whether or not specified programming practice
and rules have been followed.

25
-Static analyzer is one of the tools used for WBT which is used to check function calls
uninitialized variables, variables defined but not used, misuse of global variable etc.

Advantages of WBT: -
- As all statements and logic is verified it is possible to give guarantee of error free software.
-WBT is helpful for improving quality of system in terms of increasing execution speed by
selecting proper logic, minimizing memory space by removing unnecessary statements etc.

Disadvantages of WBT: -
-Only expert person are able to do WBT because understanding of code is necessary. The
expert has to check each and every statement and logic of programs which are written in
specific language.
-Each and every statement, path is checked. This requires to of time for testing.
-Cost of testing is high because we have to pay for the expert person.

Black Box Testing:-(BBT)


-Black Box Testing (BBT) is related with input and output only and not related with internal
structure of the program.
-In BBT, it is checked if some input is given the whether specific output is produced by the
program or not various sets of input test cases are prepared and applied on a program and
corresponding output is verified.

Inputs Outputs

Fig.: Black Box Testing Concept


- Black Box Testing is used to find the errors like
-Incorrect and missing functions.
-Interfacing errors.
-Initialization and termination errors
-Errors in date structures
-Errors in external database access
-performance errors
-There are some four methods used in BBT are input partitioning error guessing boundary value
analysis and random testing.

Advantages of BBT:
-Expert persons are not required for testing because internal logic or statements are not verified.
-Cost of BBT may be less, as expert persons are not required.

26
Disadvantages of BBT:
-It is not possible to give guarantee of error free software because probability of error still
remains as internal logic is not checked.
- Requires large test data even after we have applied large test data, we can’t say that this is
sufficient.

Regression Testing
Regression Testing is a type of software testing that ensures recent changes (like bug fixes,
updates, or new features) have not introduced new defects or broken the existing
functionality of the software.
The word "regression" means “to go back.” So, regression testing is about retesting existing
features to confirm they still work after changes.

Objectives of Regression Testing:


 To detect side effects caused by code changes
 To ensure software stability and reliability
 To verify that previous functionalities still perform correctly

When Is Regression Testing Performed?


 After fixing a bug
 After adding a new feature
 After performance improvements
 During software updates or maintenance
 Before major releases

Why It’s Important:


Even a small change in one part of the code can impact other modules. Regression testing
helps:
 Reduce the risk of new bugs
 Save time and cost in the long run
 Maintain user trust by ensuring consistent performance

Example
Let’s say you're working on a Hospital Management System with the following modules:
1. Patient Registration
2. Appointment Booking
3. Billing
4. Medical Reports
Suppose the developer fixes a bug in the Billing module. Even though the fix is successful, it
might unintentionally affect the Appointment or Reports modules.
In regression testing, testers will:
 Re-run test cases for Appointment Booking, Reports, and Patient Registration
 Ensure they still behave as expected
 Confirm that the bug fix did not break any existing feature

27
Types of Regression Testing:

Type Description
Unit Regression Testing Testing a single component/module in isolation
Partial Regression Testing Testing affected modules along with related modules
Complete Regression Testing Re-testing the entire system after major changes

Manual vs Automated Regression Testing:


 Manual Testing: Suitable for small projects or when automation is not feasible
 Automated Testing: Useful when test cases are large and repetitive

Automation is preferred for regression testing because:


 Tests are repeated often
 It saves time and effort
 Tools like Selenium, JUnit, TestNG help run tests automatically

Common Regression Testing Tools:


 Selenium – Web application automation
 JUnit / TestNG – Java testing frameworks
 QTP/UFT – Functional test automation
 PyTest – Python test automation
 Appium – For mobile app regression testing

Security Testing
Security Testing is a type of software testing that ensures the system or application is secure
from external and internal threats. It checks for vulnerabilities, protects data, and prevents
unauthorized access.
The goal is to find and fix security weaknesses before hackers can exploit them.

Main Objectives:
 To ensure confidentiality, integrity, and availability of data
 To identify unauthorized access, data leaks, and insecure features
 To check if the system can defend against attacks

Key Features Tested:


1. Authentication – Is the login system secure?
2. Authorization – Can users access only what they’re allowed to?
3. Encryption – Is sensitive data protected in storage and during transfer?
4. Input Validation – Is the system protected from attacks like SQL Injection or XSS?
5. Error Handling – Are error messages hiding sensitive details?

Example:
For a college student portal, security testing will:
 Check if only registered students can log in
 Ensure passwords are encrypted
 Prevent unauthorized users from seeing grades or fee info

28
Manual vs. Automated Testing

Feature Manual Testing Automated Testing


Testing done by human Testing done using automation
Definition
testers, step by step tools/scripts
Execution Speed Slow and time-consuming Fast and efficient
Accuracy Prone to human errors Highly accurate and consistent
Reusability Test cases are not reusable Scripts can be reused multiple times
Initial Cost Low cost initially High setup cost
High due to repeated manual
Long-Term Cost Low due to time saved on repeat tests
work
Exploratory, Usability, Ad-hoc
Best For Regression, Load, and Repeated testing
testing
Test Coverage Limited High test coverage possible
Can detect look and feel, user
Human Observation Cannot evaluate UI aesthetics
experience
None or Excel/Test Case
Tools Used Selenium, JUnit, PyTest, TestNG, etc.
documents

Manual Testing
The process of manually checking software for defects by a human tester without using
automated tools.
When to Use?
 User Interface (UI) testing
 Exploratory or ad-hoc testing
 One-time test cases

Automated Testing
Using software tools to run pre-scripted tests on an application automatically.
When to Use?
 Regression Testing
 Load/Performance Testing
 Testing large and repetitive tasks

Popular Automated Testing Tools:

Tool Description & Use Case


Selenium Web application testing across browsers. Can automate UI actions (clicks, forms).
JUnit Java-based unit testing framework. Ideal for test-driven development (TDD).
PyTest Python-based testing framework. Great for writing scalable test scripts.

29
Alpha and Beta Testing:
-After Software development is completed, during implementation of the system a proper
training is given to the customer, users of the system. Some customers get early training that is
before implementation at the developer site.
-Though proper training is given to the customer there is no guarantee that they will handle
system properly.
-Due to misinterpretation also, there are chances of errors is handling the system.
-For multi customer software like accounting packages/system software, it is not possible to
perform formal acceptance testing with everyone. So, the method of alpha and beta testing is
applied.
Alpha Testing:
-A Customer conducts this test at the developer’s site. Alpha tests are conducted in a controlled
environment. Customer operates the software and developer watches it for recording errors and
usage problems.
Beta Testing:
-This test is conducted at one or more customer sites by the end users of the software.
-During this generally developer is not present and not controls the environment is not
controlled. So, user feels free in handling the system and records all problem that are found
during beta testing.
-These problems are then reported to the developer so bets test is a “live” application of the
software at the customer’s site.
-Developers solve the problems and make necessary changes in the software and then modified
software is given to all customers.

30

You might also like