Uploaded by Freefire Konoha

Unit IV

advertisement
UNIT IV: Software Testing and Debugging
Testing Fundamentals and Strategies - White-box and Black-box testing - Basis Path Testing –
Data Flow Testing - Testing for Special Environments - Unit Testing, - Integration Testing –
Validation Testing - System Testing Debugging - Software Maintenance.
Software Testing
Software Testing is a type of investigation to find out if there is any default or error present in
the software so that the errors can be reduced or removed to increase the quality of the
software and to check whether it fulfills the specifies requirements or not.
The main objective of software testing is to design the tests in such a way that it
systematically finds different types of errors without taking much time and effort so that less
time is required for the development of the software. The overall strategy for testing software
includes:
1. Before testing starts, it’s necessary to identify and specify the requirements of the
product in a quantifiable manner. Different characteristics quality of the software is
there such as maintainability that means the ability to update and modify, the probability
that means to find and estimate any risk, and usability that means how it can easily be
used by the customers or end-users. All these characteristic qualities should be specified
in a particular order to obtain clear test results without any error.
2. Specifying the objectives of testing in a clear and detailed manner. Several objectives
of testing are there such as effectiveness that means how effectively the software can
achieve the target, any failure that means inability to fulfill the requirements and perform
functions, and the cost of defects or errors that mean the cost required to fix the error. All
these objectives should be clearly mentioned in the test plan.
3. For the software, identifying the user’s category and developing a profile for each
user. Use cases describe the interactions and communication among different classes of
users and the system to achieve the target. So as to identify the actual requirement of the
users and then testing the actual use of the product.
4. Developing a test plan to give value and focus on rapid-cycle testing. Rapid Cycle
Testing is a type of test that improves quality by identifying and measuring the any
changes that need to be required for improving the process of software. Therefore, a test
plan is an important and effective document that helps the tester to perform rapid cycle
testing.
5. Robust software is developed that is designed to test itself. The software should be
capable of detecting or identifying different classes of errors. Moreover, software design
should allow automated and regression testing which tests the software to find out if there
is any adverse or side effect on the features of software due to any change in code or
program.
6. Before testing, using effective formal reviews as a filter. Formal technical reviews is
technique to identify the errors that are not discovered yet. The effective technical
reviews conducted before testing reduces a significant amount of testing efforts and time
duration required for testing software so that the overall development time of software is
reduced.
7. Conduct formal technical reviews to evaluate the nature, quality or ability of the test
strategy and test cases. The formal technical review helps in detecting any unfilled gap
in the testing approach. Hence, it is necessary to evaluate the ability and quality of the
test strategy and test cases by technical reviewers to improve the quality of software.
8. For the testing process, developing a approach for the continuous development. As a
part of a statistical process control approach, a test strategy that is already measured
should be used for software testing to measure and control the quality during the
development of software.
Advantages of software testing:
1. Improves software quality and reliability – Testing helps to identify and fix defects early in
the development process, reducing the risk of failure or unexpected behavior in the final
product.
2. Enhances user experience – Testing helps to identify usability issues and improve the
overall user experience.
3. Increases confidence – By testing the software, developers and stakeholders can have
confidence that the software meets the requirements and works as intended.
4. Facilitates maintenance – By identifying and fixing defects early, testing makes it easier to
maintain and update the software.
5. Reduces costs – Finding and fixing defects early in the development process is less
expensive than fixing them later in the life cycle.
Disadvantages of software testing:
1. Time-consuming – Testing can take a significant amount of time, particularly if thorough
testing is performed.
2. Resource-intensive – Testing requires specialized skills and resources, which can be
expensive.
3. Limited coverage – Testing can only reveal defects that are present in the test cases, and it
is possible for defects to be missed.
4. Unpredictable results – The outcome of testing is not always predictable, and defects can
be hard to replicate and fix.
5. Delays in delivery – Testing can delay the delivery of the software if testing takes longer
than
expected
or
if
significant
defects
are
identified.
White box Testing
White box testing techniques analyze the internal structures the used data structures, internal
design, code structure, and the working of the software rather than just the functionality as in
black box testing. It is also called glass box testing or clear box testing or structural testing.
White Box Testing is also known as transparent testing or open box testing.
Working process of white box testing:

Input: Requirements, Functional specifications, design documents, source code.

Processing: Performing risk analysis to guide through the entire process.

Proper test planning: Designing test cases so as to cover the entire code. Execute rinserepeat until error-free software is reached. Also, the results are communicated.

Output: Preparing final report of the entire testing process.
Testing techniques:

Statement coverage: In this technique, the aim is to traverse all statements at least once.
Hence, each line of code is tested. In the case of a flowchart, every node must be traversed
at least once. Since all lines of code are covered, helps in pointing out faulty code.
Statement Coverage Example

Branch Coverage: In this technique, test cases are designed so that each branch from all
decision points is traversed at least once. In a flowchart, all edges must be traversed at least
once.
4 test cases are required such that all branches of all decisions are covered, i.e, all edges of
the flowchart are covered

Condition Coverage: In this technique, all individual conditions must be covered as
shown in the following example:
1. READ X, Y
2. IF(X == 0 || Y == 0)
3. PRINT ‘0’
4. #TC1 – X = 0, Y = 55
5. #TC2 – X = 5, Y = 0

Multiple Condition Coverage: In this technique, all the possible combinations of the
possible outcomes of conditions are tested at least once. Let’s consider the following
example:
1. READ X, Y
2. IF(X == 0 || Y == 0)
3. PRINT ‘0’
4. #TC1: X = 0, Y = 0
5. #TC2: X = 0, Y = 5
6. #TC3: X = 55, Y = 0
7. #TC4: X = 55, Y = 5

Basis Path Testing: In this technique, control flow graphs are made from code or
flowchart and then Cyclomatic complexity is calculated which defines the number of
independent paths so that the minimal number of test cases can be designed for each
independent path. Steps:
1. Make the corresponding control flow graph
2. Calculate the cyclomatic complexity
3. Find the independent paths
4. Design test cases corresponding to each independent path
5. V(G) = P + 1, where P is the number of predicate nodes in the flow graph
6. V(G) = E – N + 2, where E is the number of edges and N is the total number of nodes
7. V(G) = Number of non-overlapping regions in the graph
8. #P1: 1 – 2 – 4 – 7 – 8
9. #P2: 1 – 2 – 3 – 5 – 7 – 8
10. #P3: 1 – 2 – 3 – 6 – 7 – 8
11. #P4: 1 – 2 – 4 – 7 – 1 – . . . – 7 – 8

Loop Testing: Loops are widely used and these are fundamental to many algorithms
hence, their testing is very important. Errors often occur at the beginnings and ends of
loops.
1. Simple loops: For simple loops of size n, test cases are designed that:

Skip the loop entirely

Only one pass through the loop

2 passes

m passes, where m < n

n-1 and n+1 passes
2. Nested loops: For nested loops, all the loops are set to their minimum count and we
start from the innermost loop. Simple loop tests are conducted for the innermost loop
and this is worked outwards till all the loops have been tested.
3. Concatenated loops: Independent loops, one after another. Simple loop tests are
applied for each. If they’re not independent, treat them like nesting.
Tools required for White box Testing:

PyUnit

Sqlmap

Nmap

Parasoft Jtest

Nunit

VeraUnit

CppUnit

Bugzilla

Fiddler

JSUnit.net

OpenGrok

Wireshark

HP Fortify

CSUnit
Advantages:
1. White box testing is thorough as the entire code and structures are tested.
2. It results in the optimization of code removing errors and helps in removing extra lines of
code.
3. It can start at an earlier stage as it doesn’t require any interface as in the case of black box
testing.
4. Easy to automate.
5. White box testing can be easily started in Software Development Life Cycle.
6. Easy Code Optimization.
Black box testing
Black-box testing is a type of software testing in which the tester is not concerned with the
internal knowledge or implementation details of the software, but rather focuses on validating
the functionality based on the provided specifications or requirements.
Most common black box testing techniques:
Equivalence Partitioning: This technique involves dividing the input domain of the software
into equivalent classes based on similar characteristics. Test cases are then designed to test each
class, ensuring that the software behaves consistently for inputs in each class.
Boundary Value Analysis: This technique involves testing the boundary values of input
variables. Test cases are designed to test values at or near the minimum and maximum
boundaries of each input variable, since these values are more likely to cause errors or issues.
Decision Table Testing: This technique involves creating a decision table to represent different
combinations of input conditions and their corresponding output actions. Test cases are designed
to test each combination, ensuring that the software behaves as expected for each input
condition.
State Transition Testing: This technique is used for software that has a state-based behavior.
Test cases are designed to test the software as it transitions from one state to another, ensuring
that the software behaves consistently in each state.
Exploratory Testing: This technique involves testing the software without any predefined test
cases. Testers explore the software and test its functionality based on their own understanding
and intuition, identifying defects and issues as they go.
Random Testing: This technique involves randomly generating input values and testing the
software with those values. It is useful for identifying unexpected behaviors or errors in the
software.
Black Box Testing Type
The following are the several categories of black box testing:
1. Functional Testing
2. Regression Testing
3. Nonfunctional Testing (NFT)
Functional
Testing: It determines the system’s software functional requirements.
Regression Testing: It ensures that the newly added code is compatible with the existing
code. In other words, a new software update has no impact on the functionality of the
software. This is carried out after a system maintenance operation and upgrades.
Nonfunctional Testing: Nonfunctional testing is also known as NFT. This testing is not
functional testing of software. It focuses on the software’s performance, usability, and
scalability.
Tools Used for Black Box Testing:
1. Appium
2. Selenium
3. Microsoft Coded UI
4. Applitools
5. HP QTP.
Advantages of Black Box Testing:

The tester does not need to have more functional knowledge or programming skills to
implement the Black Box Testing.

It is efficient for implementing the tests in the larger system.

Tests are executed from the user’s or client’s point of view.

Test cases are easily reproducible.

It is used in finding the ambiguity and contradictions in the functional specifications.
Disadvantages of Black Box Testing:

There is a possibility of repeating the same tests while implementing the testing process.

Without clear functional specifications, test cases are difficult to implement.

It is difficult to execute the test cases because of complex inputs at different stages of
testing.

Sometimes, the reason for the test failure cannot be detected.

Some programs in the application are not tested.

It does not reveal the errors in the control structure.

Working with a large sample space of inputs can be exhaustive and consumes a lot of
time.
Basis Path Testing
It is a white-box testing technique based on the control structure of a program or a module.
Using this structure, a control flow graph is prepared and the various possible paths present in
the graph are executed as a part of testing. Therefore, by definition, Basis path testing is a
technique of selecting the paths in the control flow graph, that provide a basis set of execution
paths through the program or module. Since this testing is based on the control structure of the
program, it requires complete knowledge of the program’s structure. To design test cases
using this technique, four steps are followed :
1. Construct the Control Flow Graph
2. Compute the Cyclomatic Complexity of the Graph
3. Identify the Independent Paths
4. Design Test cases from Independent Paths
Cyclomatic complexity
Cyclomatic complexity is a software metric and another key process in implementing basis path
testing. A software metric is a quantitative measurement of time, quality, size, and cost of an
attribute of software.
In this case, cyclomatic complexity measures the complexity of a program by identifying all
independent paths through which the processes flow.
The metric is based on a control flow representation of a program and was developed in 1976 by
Thomas McCabe. His model uses a flow graph that consists of nodes and edges to present a
visualization of the control flow of a program. Nodes symbolize the processing tasks and edges
control flow between the nodes. Nodes are the entry and exit points of processes in the program
sequence while independent paths add a new process to the program flow. They have at least one
edge which has not been followed in any other paths.
A mathematical representation of the Cyclomatic complexity of program code can be calculated
as follows:
V(G) = E – N + 2
Where
E = number of edges
N = number of nodes
V(G) = P + 1
Where
P = number of predicate nodes (nodes that contain conditions)
Once the number of paths or conditions has been calculated, the number of tests to be written is
known. For example, 3 paths will mean that at least one test should be generated to cover each
path.
The properties of cyclomatic complexity are as follows:

V(G) is the highest number of independent paths shown in the graph

V(G) is always greater than or equal to 1

If V(G) is equal to 1 then G will have one path

Ideally, minimize the complexity score to 10 – the higher the score, the more complex the
code
Advantages

Reduces the number of redundant tests

As it is one of the core white box testing methods, it helps to validate other white-box
techniques

Focuses test cases on program logic

Facilitates analytical test case design over arbitrary test case design

Program statements will be executed at least once for test cases exercising basis set.
Data Flow Testing
Data flow testing is used to analyze the flow of data in the program. It is the process of collecting
information about how the variables flow the data in the program. It tries to obtain particular
information of each particular point in the process.
Data flow testing is a group of testing strategies to examine the control flow of programs in order
to explore the sequence of variables according to the sequence of events. It mainly focuses on the
points at which values assigned to the variables and the point at which these values are used by
concentrating on both points, data flow can be tested.
Data flow testing uses the control flow graph to detect illogical things that can interrupt the flow
of data. Anomalies in the flow of data are detected at the time of associations between values and
variables due to:
o
If the variables are used without initialization.
o
If the initialized variables are not used at least once.
Control flow graph of above example:
o
o
Define/use of variables of above example:
Variable
Defined at node
Used at node
x
1
2, 3
y
1
2, 4
a
3, 4
5
What is a Test Environment?
A testing environment is a setup of software and hardware for the testing teams to execute test
cases. In other words, it supports test execution with hardware, software and network configured.
Test bed or test environment is configured as per the need of the Application Under Test. On a
few occasion, test bed could be the combination of the test environment and the test data it
operates.
Types of Test Environment
Below are the different types of test environments:
1. Integration Test Environment: In this environment, software modules are integrated, and
integrated behavior is verified. In this environment, one, two, or many modules can be
integrated, and functional testing can be used to verify the behavior and correctness of the
application. It should imitate the production environment closely.
2. Performance Test Environment: The performance environment tells how well a system
will perform based on the goals like throughput, stability, response time, etc. The setup
here is quite complex as it requires very selective choice and infrastructure configuration.
Performance testing needs to be run in different environments with distinct configurations
by varying the size of RAM, the volume of data, etc. Performance testing is timeconsuming and expensive.
3. Security Test Environment: While using a security test environment, the testing team
tries to ensure that the software is free of security flaws in confidentiality, integrity, and
authenticity. Setting up a secure testing environment requires ensuring that the system is
not left unattended, there is an isolated test environment, not touching the production data.
4. Chaos Test Environment: Here the main aim is to find a specific area that can cause the
application failure before the application can lead to negative user feedback. After
identifying the area, the tester tries to fix it.
Process for Setup of Test Environment
System admins, developers, and testers are some of the people that are involved in the testing
of the application. The test environment involves setting up different areas like:
1. Test Server: Every application that is tested may not be tested on the local machine. It
may require setting up a test server. For example, Java-based applications, Fedora setup,
etc.
2. Network: A network setup like LAN, CAN, or any wireless medium to fulfill the
requirement of the internet. It ensures that the congestion during testing does not affect
other members of the team like developers, designers, etc.
3. PC setup: PC setup may include setting up different browsers for different testers or
different OS for different testers.
4. Bug Reporting: A bug reporting tool should be included in the test environment for bug
reporting.
5. Test Tool: A test tool setup to perform automation testing.
6. Test Data: The common approach is to copy the production data to test. This helps the
tester to detect the same issues without corrupting the production data. Privacy is the
main concern in using production data. To overcome it look into obfuscated and
anonymized test data.
Test Environment Management
Test Environment Management mainly deals with the maintenance and updating of test beds.
Some of the activity involved in the functioning of Test Environment Management includes:

Always maintain the test environment with its recent version.

Assigning the test environment to respective teams as per their requirement.

Continuous monitoring of test environments.

Removing the outdated test environments and their tools, techniques, and other details.

Identifying test environment issues and resolving those issues.

Frequent improvement to continuously and effectively evaluate the test environments.

Enable automation to reduce manual activities for improving efficacy.
UNIT TESTING
Unit Testing is a software testing technique by means of which individual units of
software i.e. group of computer program modules, usage procedures, and operating procedures
are tested to determine whether they are suitable for use or not. It is a testing method using which
every independent module is tested to determine if there is an issue by the developer himself. It
is correlated with the functional correctness of the independent modules. Unit Testing is defined
as a type of software testing where individual components of a software are tested. Unit Testing
of the software product is carried out during the development of an application. An individual
component may be either an individual function or a procedure. Unit Testing is typically
performed by the developer. In SDLC or V Model, Unit testing is the first level of testing done
before integration testing. Unit testing is such a type of testing technique that is usually
performed by developers. Although due to the reluctance of developers to test, quality assurance
engineers also do unit testing.
Objective of Unit Testing:
The objective of Unit Testing is:
To isolate a section of code.
To verify the correctness of the code.
To test every function and procedure.
To fix bugs early in the development cycle and to save costs.
To help the developers to understand the code base and enable them to make changes
quickly.
To help with code reuse.
Types of Unit Testing:
There are 2 types of Unit Testing: Manual, and Automated.
Workflow
of
Unit
Testing:
Unit Testing Techniques:
There are 3 types of Unit Testing Techniques. They are
1. Black Box Testing: This testing technique is used in covering the unit tests for input,
user interface, and output parts.
2. White Box Testing: This technique is used in testing the functional behavior of the
system by giving the input and checking the functionality output including the internal
design structure and code of the modules.
3. Gray Box Testing: This technique is used in executing the relevant test cases, test
methods, test functions, and analyzing the code performance for the modules.
Unit Testing Tools:
Here are some commonly used Unit Testing tools:
1. Jtest
2. Junit
3. NUnit
4. EMMA
5. PHPUnit
Advantages of Unit Testing:
1. Unit Testing allows developers to learn what functionality is provided by a unit and
how to use it to gain a basic understanding of the unit API.
2. Unit testing allows the programmer to refine code and make sure the module works
properly.
3. Unit testing enables testing parts of the project without waiting for others to be
completed.
4. Early Detection of Issues: Unit testing allows developers to detect and fix issues early
in the development process, before they become larger and more difficult to fix.
5. Improved Code Quality: Unit testing helps to ensure that each unit of code works as
intended and meets the requirements, improving the overall quality of the software.
6. Increased Confidence: Unit testing provides developers with confidence in their code,
as they can validate that each unit of the software is functioning as expected.
7. Faster Development: Unit testing enables developers to work faster and more
efficiently, as they can validate changes to the code without having to wait for the full
system to be tested.
8. Better Documentation: Unit testing provides clear and concise documentation of the
code and its behavior, making it easier for other developers to understand and
maintain the software.
9. Facilitation of Refactoring: Unit testing enables developers to safely make changes t o
the code, as they can validate that their changes do not break existing functionality.
10. Reduced Time and Cost: Unit testing can reduce the time and cost required for later
testing, as it helps to identify and fix issues early in the development process.
Disadvantages of Unit Testing:
1. The process is time-consuming for writing the unit test cases.
2. Unit Testing will not cover all the errors in the module because there is a chance of
having errors in the modules while doing integration testing.
3. Unit Testing is not efficient for checking the errors in the UI(User Interface) part of
the module.
4. It requires more time for maintenance when the source code is changed frequently.
5. It cannot cover the non-functional testing parameters such as scalability, the
performance of the system, etc.
6. Time and Effort: Unit testing requires a significant investment of time and effort to
create and maintain the test cases, especially for complex systems.
7. Dependence on Developers: The success of unit testing depends on the developers,
who must write clear, concise, and comprehensive test cases to validate the code.
8. Difficulty in Testing Complex Units: Unit testing can be challenging when dealing
with complex units, as it can be difficult to isolate and test individual units in
isolation from the rest of the system.
9. Difficulty in Testing Interactions: Unit testing may not be sufficient for testing
interactions between units, as it only focuses on individual units.
10. Difficulty in Testing User Interfaces: Unit testing may not be suitable for testing user
interfaces, as it typically focuses on the functionality of individual units.
11. Over-reliance on Automation: Over-reliance on automated unit tests can lead to a
false sense of security, as automated tests may not uncover all possible issues or bugs.
12. Maintenance Overhead: Unit testing requires ongoing maintenance and updates, as
the code and test cases must be kept up-to-date with changes to the software.
INTEGRATION TESTING
Integration testing is the process of testing the interface between two
software units or modules. It focuses on determining the correctness of the interface. The
purpose of integration testing is to expose faults in the interaction between integrated
units. Once all the modules have been unit tested, integration testing is performed.
Integration testing is a software testing technique that focuses on verifying the
interactions and data exchange between different components or modules of a software
application. The goal of integration testing is to identify any problems or bugs that arise
when different components are combined and interact with each other. Integration
testing is typically performed after unit testing and before system testing. It helps to
identify and resolve integration issues early in the development cycle, reducing the risk
of more severe and costly problems later on.
Integration testing can be done by picking module by module. This can be done so that
there should be a proper sequence to be followed. And also if you don’t want to miss out
on any integration scenarios then you have to follow the proper sequence. Exposing the
defects is the major focus of the integration testing and the time of interaction between
the integrated units.
Integration test approaches – There are four types of integration testing approaches.
Those approaches are the following:
1. Big-Bang Integration Testing – It is the simplest integration testing approach, where
all the modules are combined and the functionality is verified after the completion of
individual module testing. In simple words, all the modules of the system are simply put
together and tested. This approach is practicable only for very small systems. If an error
is found during the integration testing, it is very difficult to localize the error as the error
may potentially belong to any of the modules being integrated. So, debugging errors
reported during big bang integration testing is very expensive to fix.
Big-Bang integration testing is a software testing approach in which all components or
modules of a software application are combined and tested at once. This approach is
typically used when the software components have a low degree of interdependence or
when there are constraints in the development environment that prevent testing
individual components. The goal of big-bang integration testing is to verify the overall
functionality of the system and to identify any integration problems that arise when the
components are combined. While big-bang integration testing can be useful in some
situations, it can also be a high-risk approach, as the complexity of the system and the
number of interactions between components can make it difficult to identify and
diagnose problems.
Advantages:
1. It is convenient for small systems.
2. Simple and straightforward approach.
3. Can be completed quickly.
4. Does not require a lot of planning or coordination.
5. May be suitable for small systems or projects with a low degree of interdependence
between components.
Disadvantages:
1. There will be quite a lot of delay because you would have to wait for all the modules
to be integrated.
2. High-risk critical modules are not isolated and tested on priority since all modules are
tested at once.
3. Not Good for long projects.
4. High risk of integration problems that are difficult to identify and diagnose.
5. This can result in long and complex debugging and troubleshooting efforts.
6. This can lead to system downtime and increased development costs.
7. May not provide enough visibility into the interactions and data exchange between
components.
8. This can result in a lack of confidence in the system’s stability and reliability.
9. This can lead to decreased efficiency and productivity.
10. This may result in a lack of confidence in the development team.
11. This can lead to system failure and decreased user satisfaction.
2. Bottom-Up Integration Testing – In bottom-up testing, each module at lower levels
are tested with higher modules until all modules are tested. The primary purpose of this
integration testing is that each subsystem tests the interfaces among various mo dules
making up the subsystem. This integration testing uses test drivers to drive and pass
appropriate data to the lower-level modules.
Advantages:

In bottom-up testing, no stubs are required.

A principal advantage of this integration testing is that several disjoint subsystems
can be tested simultaneously.

It is easy to create the test conditions.

Best for applications that uses bottom up design approach.

It is Easy to observe the test results.
Disadvantages:

Driver modules must be produced.

In this testing, the complexity that occurs when the system is made up of a large
number of small subsystems.

As Far modules have been created, there is no working model can be represented.
3. Top-Down Integration Testing – Top-down integration testing technique is used in
order to simulate the behaviour of the lower-level modules that are not yet integrated. In
this integration testing, testing takes place from top to bottom. First, high-level modules
are tested and then low-level modules and finally integrating the low-level modules to a
high level to ensure the system is working as intended.
Advantages:

Separately debugged module.

Few or no drivers needed.

It is more stable and accurate at the aggregate level.

Easier isolation of interface errors.

In this, design defects can be found in the early stages.
Disadvantages:

Needs many Stubs.

Modules at lower level are tested inadequately.

It is difficult to observe the test output.

It is difficult to stub design.
4. Mixed Integration Testing – A mixed integration testing is also called sandwiched
integration testing. A mixed integration testing follows a combination of top down and
bottom-up testing approaches. In top-down approach, testing can start only after the toplevel module have been coded and unit tested. In bottom-up approach, testing can start
only after the bottom level modules are ready. This sandwich or mixed approach
overcomes this shortcoming of the top-down and bottom-up approaches. It is also called
the hybrid integration testing. also, stubs and drivers are used in mixed integration
testing.
Advantages:

Mixed approach is useful for very large projects having several sub projects.

This Sandwich approach overcomes this shortcoming of the top-down and bottom-up
approaches.

Parallel test can be performed in top and bottom layer tests.
Disadvantages:

For mixed integration testing, it requires very high cost because one part has a Topdown approach while another part has a bottom-up approach.

This integration testing cannot be used for smaller systems with huge interdependence
between different modules.
Applications:
1. Identify the components: Identify the individual components of your application that
need to be integrated. This could include the frontend, backend, database, and any
third-party services.
2. Create a test plan: Develop a test plan that outlines the scenarios and test cases that
need to be executed to validate the integration points between the different
components. This could include testing data flow, communication protocols, and error
handling.
3. Set up test environment: Set up a test environment that mirrors the production
environment as closely as possible. This will help ensure that the results of your
integration tests are accurate and reliable.
4. Execute the tests: Execute the tests outlined in your test plan, starting with the most
critical and complex scenarios. Be sure to log any defects or issues that you encounter
during testing.
5. Analyze the results: Analyze the results of your integration tests to identify any
defects or issues that need to be addressed. This may involve working with developers
to fix bugs or make changes to the application architecture.
6. Repeat testing: Once defects have been fixed, repeat the integration testing process
to ensure that the changes have been successful and that the application still works as
expected.
VALIDATION
Validation
Validation is the process of checking whether the software product is up to the
mark or in other words product has high-level requirements. It is the process of checking
the validation of the product i.e. it checks what we are developing is the right product. it
is a validation of actual and expected products. Validation is simply known as Dynamic
Testing.
Dynamic Testing
Validation Testing is known as Dynamic Testing in which we examine whether we have
developed the product right or not and also about the business needs of the client. Here
are some of the activities that are involved in Validation.
1. Black Box Testing
2. White Box Testing
3. Unit Testing
4. Integration Testing
DEBUGGING
Debugging is the process of identifying and resolving errors, or bugs, in a
software system. It is an important aspect of software engineering because bugs can
cause a software system to malfunction, and can lead to poor performance or incorrect
results. Debugging can be a time-consuming and complex task, but it is essential for
ensuring that a software system is functioning correctly.
There are several common methods and techniques used in debugging, including:
1. Code Inspection: This involves manually reviewing the source code of a software
system to identify potential bugs or errors.
2. Debugging Tools: There are various tools available for debugging such as debuggers,
trace tools, and profilers that can be used to identify and resolve bugs.
3. Unit Testing: This involves testing individual units or components of a software
system to identify bugs or errors.
4. Integration Testing: This involves testing the interactions between different
components of a software system to identify bugs or errors.
5. System Testing: This involves testing the entire software system to identify bugs or
errors.
6. Monitoring: This involves monitoring a software system for unusual behavior or
performance issues that can indicate the presence of bugs or errors.
7. Logging: This involves recording events and messages related to the software system,
which can be used to identify bugs or errors.
It is important to note that debugging is an iterative process, and it may take
multiple attempts to identify and resolve all bugs in a software system. Additionally, it is
important to have a well-defined process in place for reporting and tracking bugs, so that
they can be effectively managed and resolved.
In summary, debugging is an important aspect of software engineering, it’s the process
of identifying and resolving errors, or bugs, in a software system. There are several
common methods and techniques used in debugging, including code inspection,
debugging tools, unit testing, integration testing, system testing, monitoring, and
logging. It is an iterative process that may take multiple attempts to identify and resolve
all bugs in a software system.
In the context of software engineering, debugging is the process of fixing a
bug in the software. In other words, it refers to identifying, analyzing, and removing
errors. This activity begins after the software fails to execute properly and concludes by
solving the problem and successfully testing the software. It is considered to be an
extremely complex and tedious task because errors need to be resolved at all stages of
debugging.
A better approach is to run the program within a debugger, which is a
specialized environment for controlling and monitoring the execution of a program. The
basic functionality provided by a debugger is the insertion of breakpoints within the
code. When the program is executed within the debugger, it stops at each breakpoint.
Many IDEs, such as Visual C++ and C-Builder provide built-in debuggers.
Debugging Process: Steps involved in debugging are:

Problem identification and report preparation.

Assigning the report to the software engineer defect to verify that it is genuine.

Defect Analysis using modeling, documentation, finding and testing candidate flaws,
etc.

Defect Resolution by making required changes to the system.

Validation of corrections.
The debugging process will always have one of two outcomes :
1. The cause will be found and corrected.
2. The cause will not be found.
Later, the person performing debugging may suspect a cause, design a test
case to help validate that suspicion and work toward error correction in an iterative
fashion.During debugging, we encounter errors that range from mildly annoying to
catastrophic. As the consequences of an error increase, the amount of pressure to find
the cause also increases. Often, pressure sometimes forces a software developer to fix
one error and at the same time introduce two more.
Debugging Approaches/Strategies:
1. Brute Force: Study the system for a larger duration in order to understand the
system. It helps the debugger to construct different representations of systems to be
debugged depending on the need. A study of the system is also done actively to find
recent changes made to the software.
2. Backtracking: Backward analysis of the problem which involves tracing the program
backward from the location of the failure message in order to identify the region of
faulty code. A detailed study of the region is conducted to find the cause of defects.
3. Forward analysis of the program involves tracing the program forwards using
breakpoints or print statements at different points in the program and studying the
results. The region where the wrong outputs are obtained is the region that needs to be
focused on to find the defect.
4. Using past experience with the software debug the software with similar problems in
nature. The success of this approach depends on the expertise of the debugger.
5.
Cause elimination: it introduces the concept of binary partitioning. Data related to
the error occurrence are organized to isolate potential causes.
6. Static analysis: Analyzing the code without executing it to identify potential bugs or
errors. This approach involves analyzing code syntax, data flow, and control flow.
7. Dynamic analysis: Executing the code and analyzing its behavior at runtime to
identify errors or bugs. This approach involves techniques like runtime debugging and
profiling.
8. Collaborative debugging: Involves multiple developers working together to debug a
system. This approach is helpful in situations where multiple modules or components
are involved, and the root cause of the error is not clear.
9. Logging and Tracing: Using logging and tracing tools to identify the sequence of
events leading up to the error. This approach involves collecting and analyzing logs
and traces generated by the system during its execution.
10. Automated Debugging: The use of automated tools and techniques to assist in the
debugging process. These tools can include static and dynamic analysis tools, as well
as tools that use machine learning and artificial intelligence to identify errors and
suggest fixes.
Debugging Tools:
Debugging tool is a computer program that is used to test and debug other programs. A
lot of public domain software like gdb and dbx are available for debugging. They offer
console-based command-line interfaces. Examples of automated debugging tools include
code-based tracers, profilers, interpreters, etc. Some of the widely used debuggers are:

Radare2

WinDbg

Valgrind
Difference Between Debugging and Testing:
Debugging is different from testing. Testing focuses on finding bugs, errors, etc whereas
debugging starts after a bug has been identified in the software. Test ing is used to ensure
that the program is correct and it was supposed to do with a certain minimum success
rate. Testing can be manual or automated. There are several different types of testing
unit testing, integration testing, alpha, and beta testing, etc. Debugging requires a lot of
knowledge, skills, and expertise. It can be supported by some automated tools available
but is more of a manual process as every bug is different and requires a different
technique, unlike a pre-defined testing mechanism.
Advantages of Debugging:
Several advantages of debugging in software engineering:
1. Improved system quality: By identifying and resolving bugs, a software system can
be made more reliable and efficient, resulting in improved overall quality.
2. Reduced system downtime: By identifying and resolving bugs, a software system
can be made more stable and less likely to experience downtime, which can result in
improved availability for users.
3. Increased user satisfaction: By identifying and resolving bugs, a software system
can be made more user-friendly and better able to meet the needs of users, which can
result in increased satisfaction.
4. Reduced development costs: By identifying and resolving bugs early in the
development process, it can save time and resources that would otherwise be spent on
fixing bugs later in the development process or after the system has been deployed.
5. Increased security: By identifying and resolving bugs that could be exploited by
attackers, a software system can be made more secure, reducing the risk of security
breaches.
6. Facilitates change: With debugging, it becomes easy to make changes to the
software as it becomes easy to identify and fix bugs that would have been caused by
the changes.
7. Better understanding of the system: Debugging can help developers gain a better
understanding of how a software system works, and how different components of the
system interact with one another.
8. Facilitates testing: By identifying and resolving bugs, it makes it easier to test the
software and ensure that it meets the requirements and specifications.
In summary, debugging is an important aspect of software engineering as it helps to
improve system quality, reduce system downtime, increase user satisfaction, reduce
development costs, increase security, facilitate change, a better understanding of the
system, and facilitate testing.
Disadvantages of Debugging:
While debugging is an important aspect of software engineering, there are also some
disadvantages to consider:
1. Time-consuming: Debugging can be a time-consuming process, especially if the bug
is difficult to find or reproduce. This can cause delays in the development process and
add to the overall cost of the project.
2. Requires specialized skills: Debugging can be a complex task that requires
specialized skills and knowledge. This can be a challenge for developers who are not
familiar with the tools and techniques used in debugging.
3. Can be difficult to reproduce: Some bugs may be difficult to reproduce, which can
make it challenging to identify and resolve them.
4. Can be difficult to diagnose: Some bugs may be caused by interactions between
different components of a software system, which can make it challenging to identify
the root cause of the problem.
5. Can be difficult to fix: Some bugs may be caused by fundamental design flaws or
architecture issues, which can be difficult or impossible to fix without significant
changes to the software system.
6. Limited insight: In some cases, debugging tools can only provide limited insight into
the problem and may not provide enough information to identify the root cause of the
problem.
7. Can be expensive: Debugging can be an expensive process, especially if it requires
additional resources such as specialized debugging tools or additional development
time.
SOFTWARE MAINTENANCE
Software Maintenance refers to the process of modifying and updating a
software system after it has been delivered to the customer. This can include fixing bugs,
adding new features, improving performance, or updating the software to work with new
hardware or software systems. The goal of software maintenance is to keep the software
system working correctly, efficiently, and securely, and to ensure that it continues to
meet the needs of the users.
Software maintenance is a continuous process that occurs throughout the entire
life cycle of the software system. It is important to have a well-defined maintenance
process in place, which includes testing and validation, version control, and
communication with stakeholders.
Several Key Aspects of Software Maintenance

Bug Fixing: The process of finding and fixing errors and problems in the software.

Enhancements: The process of adding new features or improving existing features to
meet the evolving needs of the users.

Performance Optimization: The process of improving the speed, efficiency, and
reliability of the software.

Porting and Migration: The process of adapting the software to run on new
hardware or software platforms.

Re-Engineering: The process of improving the design and architecture of the
software to make it more maintainable and scalable.

Documentation: The
process
of
creating,
updating,
and
maintaining
the
documentation for the software, including user manuals, technical specifications, and
design documents.
Software maintenance is a critical part of the software development life cycle
(SDLC) and is necessary to ensure that the software continues to meet the needs of the
users over time. It is also important to consider the cost and effort required for software
maintenance when planning and developing a software system.
Software maintenance is the process of modifying a software system after it has been
delivered to the customer. The goal of maintenance is to improve the system’s
functionality, performance, and reliability and to adapt it to changing requirements and
environments.
Several Types of Software Maintenance

Corrective Maintenance: This involves fixing errors and bugs in the software
system.

Patching: It is an emergency fix implemented mainly due to pressure from
management. Patching is done for corrective maintenance but it gives rise to
unforeseen future errors due to lack of proper impact analysis.

Adaptive Maintenance: This involves modifying the software system to adapt it to
changes in the environment, such as changes in hardware or software, government
policies, and business rules.

Perfective Maintenance: This involves improving functionality, performance, and
reliability, and restructuring the software system to improve changeability.

Preventive Maintenance: This involves taking measures to prevent future problems,
such as optimization, updating documentation, reviewing and testing the system, and
implementing preventive measures such as backups.
It’s important to note that software maintenance can be costly and complex,
especially for large and complex systems. Therefore, the cost and effort of maintenance
should be taken into account during the planning and development phases of a software
project. It’s also important to have a clear and well-defined maintenance plan that
includes regular maintenance activities, such as testing, backup, and bug fixing.
Software Maintenance is the process of modifying a software product after it has been
delivered to the customer. The main purpose of software maintenance is to modify and
update
software
applications
after
delivery
to
correct
faults
and
improve
performance. Maintenance can be categorized into proactive and reactive types.
Proactive maintenance involves taking preventive measures to avoid problems from
occurring, while reactive maintenance involves addressing problems that have already
occurred.
Maintenance can be performed by different stakeholders, including the
original development team, an in-house maintenance team, or a third-party maintenance
provider. Maintenance activities can be planned or unplanned. Planned activities include
regular maintenance tasks that are scheduled in advance, such as updates and backups.
Unplanned activities are reactive and are triggered by unexpected events, such as system
crashes or security breaches. Software maintenance can involve modifying the software
code, as well as its documentation, user manuals, and training materials. This ensures
that the software is up-to-date and continues to meet the needs of its users.
Software maintenance can also involve upgrading the software to a new version or
platform. This can be necessary to keep up with changes in technology and to ensure that
the software remains compatible with other systems. The success of software
maintenance depends on effective communication with stakeholders, including users,
developers, and management. Regular updates and reports can help to keep stakeholders
informed and involved in the maintenance process.
Software maintenance is also an important part of the Software Development Life
Cycle(SDLC). To update the software application and do all modifications in software
application so as to improve performance is the main focus of software maintenance.
Software is a model that runs on the basis of the real world. so, whenever any change
requires in the software that means the need for real-world changes wherever possible.
Need for Maintenance
Software Maintenance must be performed in order to:

Correct faults.

Improve the design.

Implement enhancements.

Interface with other systems.

Accommodate programs so that different hardware, software, system feat ures, and
telecommunications facilities can be used.

Migrate legacy software.

Retire software.

Requirement of user changes.

Run the code fast
Challenges in Software Maintenance
The various challenges in software maintenance are given below:

The popular age of any software program is taken into consideration up to ten to
fifteen years. As software program renovation is open-ended and might maintain for
decades making it very expensive.

Older software programs, which had been intended to paint on sluggish machines
with much less reminiscence and garage ability can not maintain themselves tough in
opposition to newly coming more advantageous software programs on contemporaryday hardware.

Changes are frequently left undocumented which can also additionally reason greater
conflicts in the future.

As the era advances, it turns into high prices to preserve vintage software programs.

Often adjustments made can without problems harm the authentic shape of the
software program, making it difficult for any next adjustments.

There is a lack of Code Comments.

Lack of documentation: Poorly documented systems can make it difficult to
understand how the system works, making it difficult to identify and fix problems.

Legacy code: Maintaining older systems with outdated technologies can be difficult,
as it may require specialized knowledge and skills.

Complexity: Large and complex systems can be difficult to understand and modify,
making it difficult to identify and fix problems.

Changing requirements: As user requirements change over time, the software
system may need to be modified to meet these new requirements, which can be
difficult and time-consuming.

Interoperability issues: Systems that need to work with other systems or software
can be difficult to maintain, as changes to one system can affect the other systems.

Lack of test coverage: Systems that have not been thoroughly tested can be difficult
to maintain as it can be hard to identify and fix problems without knowing how the
system behaves in different scenarios.

Lack of personnel: A lack of personnel with the necessary skills and knowledge to
maintain the system can make it difficult to keep the system up-to-date and running
smoothly.

High-Cost: The cost of maintenance can be high, especially for large and complex
systems, which can be difficult to budget for and manage.
To overcome these challenges, it is important to have a well-defined maintenance
process in place, which includes testing and validation, version control, and
communication with stakeholders. It is also important to have a clear and well-defined
maintenance plan that includes regular maintenance activities, such as testing, backup,
and bug fixing. Additionally, it is important to have personnel with the necessary skills
and knowledge to maintain the system.
Categories of Software Maintenance
Maintenance can be divided into the following categories.

Corrective maintenance: Corrective maintenance of a software product may be
essential either to rectify some bugs observed while the system is in use, or to
enhance the performance of the system.

Adaptive maintenance: This includes modifications and updations when the
customers need the product to run on new platforms, on new operating systems, or
when they need the product to interface with new hardware and software.

Perfective maintenance: A software product needs maintenance to support the new
features that the users want or to change different types of functionalities of the
system according to the customer’s demands.

Preventive maintenance: This type of maintenance includes modifications and
updations to prevent future problems with the software. It goals to attend to problems,
which are not significant at this moment but may cause serious issues in the future.
Reverse Engineering
Reverse Engineering is the process of extracting knowledge or design information from
anything man-made and reproducing it based on the extracted information. It is also
called back engineering. The main objective of reverse engineering is to check out how
the system works. There are many reasons to perform reverse engineering. Reverse
engineering is used to know how the thing works. Also, reverse engineering is to
recreate the object by adding some enhancements.
Software Reverse Engineering
Software Reverse Engineering is the process of recovering the design and the
requirements specification of a product from an analysis of its code. Reverse
Engineering is becoming important, since several existing software products, lack proper
documentation, are highly unstructured, or their structure has degraded through a series
of maintenance efforts.
Why Reverse Engineering?

Providing proper system documentation.

Recovery of lost information.

Assisting with maintenance.

The facility of software reuse.

Discovering unexpected flaws or faults.

Implements innovative processes for specific use.

Easy to document the things how efficiency and power can be improved.
Uses of Software Reverse Engineering

Software Reverse Engineering is used in software design, reverse engineering enables
the developer or programmer to add new features to the existing software with or
without knowing the source code.

Reverse engineering is also useful in software testing, it helps the testers to study or
detect the virus and other malware code.

Software reverse engineering is the process of analyzing and understanding the
internal structure and design of a software system. It is often used to improve the
understanding of a software system, to recover lost or inaccessible source code, and to
analyze the behavior of a system for security or compliance purposes.

Malware analysis: Reverse engineering is used to understand how malware works
and to identify the vulnerabilities it exploits, in order to develop countermeasures.

Legacy systems: Reverse engineering can be used to understand and maintain legacy
systems that are no longer supported by the original developer.

Intellectual property protection: Reverse engineering can be used to detect and
prevent intellectual property theft by identifying and preventing the unauthorized use
of code or other assets.

Security: Reverse engineering is used to identify security vulnerabilities in a system,
such as backdoors, weak encryption, and other weaknesses.

Compliance: Reverse engineering is used to ensure that a system meets compliance
standards, such as those for accessibility, security, and privacy.

Reverse-engineering of proprietary software: To understand how a software works,
to improve the software, or to create new software with similar features.

Reverse-engineering of software to create a competing product: To create a
product that functions similarly or to identify the features that are missing in a
product and create a new product that incorporates those features.

It’s important to note that reverse engineering can be a complex and time-consuming
process, and it is important to have the necessary skills, tools, and knowledge to
perform it effectively. Additionally, it is important to consider the legal and ethical
implications of reverse engineering, as it may be illegal or restricted in some
jurisdictions.
Advantages of Software Maintenance

Improved Software Quality: Regular software maintenance helps to ensure that the
software is functioning correctly and efficiently and that it continues to meet the
needs of the users.

Enhanced Security: Maintenance can include security updates and patches, helping
to ensure that the software is protected against potential threats and attacks.

Increased User Satisfaction: Regular software maintenance helps to keep the
software up-to-date and relevant, leading to increased user satisfaction and adoption.

Extended Software Life: Proper software maintenance can extend the life of the
software, allowing it to be used for longer periods of time and reducing the need for
costly replacements.

Cost Savings: Regular software maintenance can help to prevent larger, more
expensive problems from occurring, reducing the overall cost of software ownership.

Better Alignment with business goals: Regular software maintenance can help to
ensure that the software remains aligned with the changing needs of the business. This
can help to improve overall business efficiency and productivity.

Competitive Advantage: Regular software maintenance can help to keep the
software ahead of the competition by improving functionality, performance, and user
experience.

Compliance with Regulations: Software maintenance can help to ensure that the
software complies with relevant regulations and standards. This is particularly
important in industries such as healthcare, finance, and government, where
compliance is critical.

Improved Collaboration: Regular software maintenance can help to improve
collaboration between different teams, such as developers, testers, and users. This can
lead to better communication and more effective problem-solving.

Reduced Downtime: Software maintenance can help to reduce downtime caused by
system failures or errors. This can have a positive impact on business operations and
reduce the risk of lost revenue or customers.

Improved Scalability: Regular software maintenance can help to ensure that the
software is scalable and can handle increased user demand. This can be particularly
important for growing businesses or for software that is used by a large number of
users.
Disadvantages of Software Maintenance

Cost: Software maintenance can be time-consuming and expensive, and may require
significant resources and expertise.

Schedule disruptions: Maintenance can cause disruptions to the normal schedule and
operations of the software, leading to potential downtime and inconvenience.

Complexity: Maintaining
and
updating
complex
software
systems
can
be
challenging, requiring specialized knowledge and expertise.

Risk of introducing new bugs: The process of fixing bugs or adding new features can
introduce new bugs or problems, making it important to thoroughly test the software
after maintenance.

User resistance: Users may resist changes or updates to the software, leading to
decreased satisfaction and adoption.

Compatibility issues: Maintenance can sometimes cause compatibility issues with
other software or hardware, leading to potential integration problems.

Lack of documentation: Poor documentation or lack of documentation can make
software maintenance more difficult and time-consuming, leading to potential errors
or delays.

Technical debt: Over time, software maintenance can lead to technical debt, where
the cost of maintaining and updating the software becomes increasingly higher than
the cost of developing a new system.

Skill gaps: Maintaining software systems may require specialized skills or expertise
that may not be available within the organization, leading to potential outsourcing or
increased costs.

Inadequate testing: Inadequate testing or incomplete testing after maintenance can
lead to errors, bugs, and potential security vulnerabilities.

End-of-life: Eventually, software systems may reach their end-of-life, making
maintenance and updates no longer feasible or cost-effective. This can lead to the
need for a complete system replacement, which can be costly and time-consuming.
Download