0% found this document useful (0 votes)
8 views

Unit-4

The document provides an overview of software testing and maintenance, detailing its importance in ensuring software quality and reliability. It covers various testing types, including unit, integration, system, acceptance, performance, and security testing, along with techniques like black box and white box testing. Additionally, it discusses debugging techniques, validation, and model checking to ensure software correctness.

Uploaded by

Kezial Elizabeth
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Unit-4

The document provides an overview of software testing and maintenance, detailing its importance in ensuring software quality and reliability. It covers various testing types, including unit, integration, system, acceptance, performance, and security testing, along with techniques like black box and white box testing. Additionally, it discusses debugging techniques, validation, and model checking to ensure software correctness.

Uploaded by

Kezial Elizabeth
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Unit-4

Software Testing and


Maintenance
Software Testing
 Software testing is the process of assessing the functionality and
quality of a software product to ensure that it meets the
requirements and specifications outlined by the stakeholders. The
main goal of software testing is to identify any defects or bugs in
the software that could affect its performance, security, or usability.
Importance of Testing
 The importance of software testing lies in its ability to
improve the quality and reliability of a software product. By
conducting thorough testing, developers can identify and fix
bugs before the software is released to the market, thereby
reducing the risk of costly errors and potential damage to
the reputation of the organization. Software testing also
helps to ensure that the software meets the needs and
expectations of users, leading to higher levels of customer
satisfaction.
Types of Testing

 Unit testing: This type of testing focuses on verifying the functionality of individual
components or modules of the software to ensure that they work correctly in
isolation.
 Integration testing: Integration testing is used to test how different components of
the software interact with each other and function as a whole system.
 System testing: System testing evaluates the entire software product to ensure
that it meets all specified requirements and functions as expected in real-world
scenarios.
 Acceptance testing: Acceptance testing involves testing the software with end-
users to determine if it meets their needs and performs as desired.
 Performance testing: Performance testing assesses the speed, responsiveness, and
stability of the software under different conditions to ensure optimal performance.
 Security testing: Security testing evaluates the software for vulnerabilities and
weaknesses that could be exploited by hackers or malicious users.
Internal and External Views of
Testing
Internal view of software testing:
 Involves analyzing the code and functionality of the software to
ensure it meets the specified requirements and standards.
 Focuses on identifying errors, bugs, and defects within the
software through various testing techniques such as unit testing,
integration testing, and system testing.
 Requires deep knowledge of the software’s architecture, design,
and code base to effectively test its functionality and performance.
External view of software testing:
 Involves testing the software from a user’s perspective to ensure
it meets their requirements and expectations.
 Focuses on validating the software’s functionality, usability, and
performance through techniques such as acceptance testing,
usability testing, and regression testing.
 Requires understanding of user behavior, preferences, and
expectations to effectively test the software’s usability and user
experience.
Purpose of Testing:

 To ensure that the software meets the specified requirements and


functions as expected.
 To identify and fix defects or errors in the software that could impact
its performance or usability.
 To validate that the software performs as intended under different
conditions and scenarios.
 To ensure that the software is reliable and stable for users.
 To build confidence in the software and provide assurance to
stakeholders that it is of high quality.
Black Box Testing
 Black Box Testing is a software testing method that focuses on the
functionality of the software without knowledge of its internal code or
structure.
Techniques for Black Box Testing:
 Equivalence Partitioning: Dividing input data into groups that are treated
the same by the software.
 Boundary Value Analysis: Testing the boundaries of acceptable input
values to uncover potential errors.
 State Transition Testing: Testing the software's response to different
states or transitions between states.
 Error Guessing: Intuition-based testing where testers predict potential
errors based on experience and domain knowledge.
 Decision Table Testing: Creating decision tables to determine different
combinations of inputs and expected outputs to test the software's
decision-making process.
Equivalence Partitioning
Equivalence Partitioning is a software testing technique that involves dividing input
data into different partitions or groups that are expected to produce the same output
when tested.
 Inputs are divided into different equivalence classes based on their properties or
characteristics.
 Test cases are then created for each equivalence class to ensure that all possible
scenarios are covered.
 The idea is to focus on testing a representative sample of input data rather than
testing every possible input combination.
 This helps to reduce the number of test cases needed while still ensuring thorough
test coverage.
 By testing each equivalence class, testers can verify that the software behaves
consistently within each class.
 Equivalence Partitioning is particularly useful for testing complex or large datasets
where it is not feasible to test every individual input value.
Boundary Value Analysis
Boundary value analysis is a software testing technique that involves
evaluating the behavior of a system at both the boundaries and at values
that are just beyond those boundaries. It helps identify errors that occur at
the edges of input ranges, as these are often where bugs are most likely to
appear. The key points of Boundary value analysis are as follows:
 The testing process involves selecting inputs that are on the edge of
valid and invalid ranges.
 Test cases are created using the smallest and largest possible values for
input variables.
 Tests are also conducted with values just above and just below the
boundaries.
 This technique helps ensure that the system can handle extreme values
and that errors are caught before they impact users.
 Boundary value analysis is particularly useful for detecting off-by-one
errors or other issues related to the handling of boundaries.
White Box Testing
 White box testing is a testing technique where the tester has
knowledge of the internal workings of the software being tested.
 This technique is also known as clear box testing, glass box testing,
transparent box testing, or structural testing.
 White box testing focuses on analyzing the internal code structure,
flow, and functionality of the software to identify any potential issues.
Loop Testing
Basis Path Testing
Basis path testing is a white-box testing technique that aims to test every linearly independent path
through a program or module at least once. This technique focuses on testing the control flow of the
program by identifying and testing independent paths through the program's control structure.
The basis path testing technique typically involves the following steps:
 Identify the control flow structure of the program: The first step in basis path testing is to identify
the control flow structure of the program. This can be done by constructing a control flow graph
(CFG) that represents the various paths through the program. The CFG shows the sequence of
statements, loops, and conditionals in the program.
 Determine the cyclomatic complexity: The cyclomatic complexity is a measure of the complexity of
a program and is calculated based on the number of decisions (if statements, loops, etc.) in the
control flow graph. The cyclomatic complexity provides an upper bound for the number of
independent paths through the program.
 Identify linearly independent paths: Once the control flow structure and cyclomatic complexity are
known, the next step is to identify all linearly independent paths through the program. These paths
should cover all the decision points in the program and often require a combination of paths to
achieve full coverage.
 Create test cases for each path: Once the linearly independent paths have been identified, test
cases can be created to exercise each path. Each test case should be designed to follow a specific
path through the program and produce different outcomes based on the input provided.
 Execute the test cases: The final step in basis path testing is to execute the test cases on the
program and analyze the results. The goal is to determine if each path through the program is
executed correctly and if the program behaves as expected under different conditions.
Testing Strategies
Various Testing Strategies for Conventional Software are
 Unit Testing
 Integration testing
 Validation Testing
 System Testing
Unit Testing
 Identify the specific function or feature that you want to test in your code.
 Write a small test case that exercises that function or feature with known
inputs and expected outputs.
 Set up your testing framework or tool (such as Jest, JUnit, or NUnit) to run
the test case automatically.
 Run the test case and observe the results to see if the actual output
matches the expected output.
 If the test case fails, debug the code to find and fix the issue causing the
failure.
 Repeat steps 2-5 for each function or feature in your code base to ensure
comprehensive test coverage.
 Consider edge cases and boundary conditions to ensure your tests are
robust and cover all possible scenarios.
 Document your test cases and results to track progress and ensure
consistency in future testing efforts.
Integration Testing
Integration testing is a software testing methodology that involves testing the
interactions between different components or modules of a system to ensure they
work together correctly.
Types of Integration Testing:
 Big Bang Integration Testing: In this approach, all the modules are integrated
together at once and tested as a whole.
 Incremental Integration Testing: Modules are integrated and tested in small
increments, starting with individual modules and gradually combining them into
groups.
 Top-down Integration Testing: Testing starts at the highest level of the system
and progresses downwards, with each higher level module being tested first.
 Bottom-up Integration Testing: Testing starts at the lowest level of the system
and progresses upwards, with each lower level module being tested first.
 Regression testing: It is the process of retesting the modified parts of the
software to ensure that the recent changes have not affected the existing
functionalities.
 Smoke testing:It is the preliminary testing done on a software build to ensure
that the basic functionalities are working as expected.
Top Down Integration Testing

 Top down integration testing is a software testing approach where software


modules are tested together from highest level to lowest level.
 The testing starts from the top layer of the software architecture and moves
downwards towards the lower layers.
 In this approach, high-level modules are tested first, followed by testing their
interactions with lower-level modules.
 Top down integration testing helps in identifying issues at higher levels of the
software architecture early in the testing process.
 This approach allows for testing the most critical and complex parts of the
software system first, ensuring that important functionalities are working
correctly.
 Top down integration testing can help in improving overall software quality by
uncovering integration issues and dependencies between modules.
Bottom Up Integration Testing
 Bottom-up integration testing is an approach to testing where individual
modules or components of a software system are tested first, before testing
higher-level modules that depend on them.
 This approach starts with testing the smallest units of code, and gradually
progresses to testing larger units until the entire system is tested.
 Bottom-up integration testing is used to identify and fix any defects or issues
in individual modules before testing how they interact with each other.
 By testing from the bottom up, developers can ensure that each individual
component works as intended before moving on to testing how they work
together in combination.
 This method can help to simplify the process of detecting and resolving
integration issues, as any issues found at the lower levels can be isolated
and addressed before testing higher-level interactions.
 Bottom-up integration testing is often used in conjunction with top-down
integration testing, where higher-level modules are tested first, to ensure
that the entire system is thoroughly tested from multiple perspectives.
Regression and Smoke testing

Regression testing:
 It is the process of retesting the modified parts of the software to ensure that the recent
changes have not affected the existing functionalities.
 It helps in identifying any new bugs or issues introduced due to changes in the code.
 Regression testing is performed after each code change, bug fix, or feature enhancement.
 It ensures that the overall quality and stability of the software are maintained throughout
the development process.
Smoke testing:
 It is the preliminary testing done on a software build to ensure that the basic functionalities
are working as expected.
 Smoke testing is performed before in-depth testing to check if the build is stable enough for
further testing.
 It focuses on major functionalities and critical areas of the software to ensure that the build
is ready for more comprehensive testing.
 Smoke testing helps in catching major issues early in the development cycle, reducing the
overall testing time and effort.
System Testing

System testing is a type of software testing that evaluates the overall


functionality and performance of a complete software product.
 Types of system testing include:
 Functional Testing - This type of testing focuses on verifying that the system
functions according to the specified requirements.
 Performance Testing - This type of testing evaluates the system's
responsiveness, stability, and scalability under various conditions.
 Usability Testing - This type of testing assesses how user-friendly the system
is and how easy it is to navigate and use.
 Security Testing - This type of testing checks for vulnerabilities and ensures
that the system is secure from potential threats.
 Compatibility Testing - This type of testing evaluates the system's
compatibility with different devices, operating systems, and browsers.
Validation Testing

Validation testing is the process of evaluating software or a system to make sure it meets
the specified requirements. Here are some simple points to explain validation testing:
 Validation testing is performed to ensure that the software or system meets the
requirements outlined in the specifications or user stories.
 It involves running tests to confirm that the software functions as intended and produces
the expected outcomes.
 Validation testing checks that the software meets the needs of the end users and that it
is user-friendly and easy to use.
 It helps to identify any defects or issues that may prevent the software from working
correctly or meeting the user's needs.
 Validation testing is typically performed towards the end of the software development
lifecycle, after unit testing and integration testing have been completed.
 The goal of validation testing is to ensure that the software is ready for release to the
end users and that it will perform as expected in a production environment.
 Validation testing helps to build confidence in the software and ensures that it meets the
quality standards set for the project.
Acceptance Testing

Acceptance testing is a type of testing where a system is tested for its


compliance with business requirements and its capability to meet user
needs.
Types of acceptance testing include:
 Alpha testing: This type of testing is typically performed by the
development team to identify and fix any issues before the product is
released to end users.
 Beta testing: This type of testing involves releasing the product to a
selected group of external users to gather feedback and identify any
issues before the product is released to the general public.
Debugging Techniques

Debugging is the process of identifying and fixing errors or bugs in


software code.
 Brute Force method: In this method, all possible solutions are
generated and checked to find the correct one. It involves
systematically trying all possible combinations until the solution is
found.
 Backtracking method: This method involves systematically trying
different options until the correct solution is found. If a dead end is
reached, the algorithm backtracks and tries a different option.
 Cause Elimination method: This method involves eliminating potential
causes one by one until the correct one is identified. It involves
analyzing and eliminating possible causes of a problem until the root
cause is identified.
Model Checking

 Software model checking is a formal verification technique used to


ensure the correctness of software systems.
 It involves creating a formal model of the software system and analyzing
the model for potential errors or bugs.
 Model checking checks all possible states and transitions in the software
model to identify any potential issues.
 It can be used to verify properties such as safety, liveness, and security
of the software system.
 Model checking is an automated process that can help uncover bugs and
vulnerabilities in the software system early in the development process.
 By using model checking, developers can ensure that their software
systems meet the required specifications and are free from errors.

You might also like