Software Testing
Fundamentals
Lecture 4
Debugging
• 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.
Debugging
Debugging Strategies:
1. Study the system for the larger duration in order to understand the system. It helps debugger to
construct different representations of systems to be debugging depends on the [Link] of the
system is also done actively to find recent changes made to the software.
2. Backwards analysis of the problem which involves tracing the program backward from the
location of failure message in order to identify the region of faulty code. A detailed study of the
region is conducting 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 to find the defect.
4. Using the past experience of the software debug the software with similar problems in
nature. The success of this approach depends on the expertise of the debugger.
Debugging
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 require very high
cost
because one part has Top-down approach while another part has bottom-up approach.
• This integration testing cannot be used for smaller system with huge interdependence
between different modules.
Implementation Types
Implementation is the process of launching a change to system, process, policies, data, equipment,
infrastructure, facilities and information.
Implementation Types:
[Link]: When the new system is used at the same time as the old system the two systems are said to be running in parallel.
Advantages:
• Users can compare the output of the old system with the output of the new system, to ensure correctness
• There is little risk of data loss because the known-good system is running
Disadvantages:
• Users must take more time to enter data into two different systems
• Data could be different in two different systems if there is intensive data entry.
Example:
• A medical system that tracks patient heart rates is being replaced. A new system is attached while the old
system is still working. The two systems are used in parallel to ensure the new system produces the exact same
data as the old system.
Implementation Types
2. Phased:
• When small parts of the new system gradually replace small parts of the old system, the implementation method is said to be
phased.
Advantages:
• Training can be completed in small parts
• A failure of the new system has minimal impact because it is only one small part
• Issues around scale can be addressed without major impact.
Disadvantages:
• This implementation method takes more time to get the new system fully online than other methods.
• There is a possibility of data loss if part of the new system fails.
Example:
• A school has a new system to manage student athletics. The old system is paper and pencil.
Slowly, over time, a new system is introduced to manage students, their teams, seasons, and their coaches. At first, the new system
simply manages teams. Then the new system manages seasons (and school years), slowly, the new system is increased to manage
coaches, players and finally events. At the end of implementation, the new system is managing everything related to student
athletics and the old paper and pencil system isn't being used any longer.
Implementation Types
3. Pilot :
• When a small group of users within an organization uses a new system prior to wider use, the
system is said to be piloted.
Advantages:
• Training can be supported by pilot group
• Failure or problems can be identified and addressed without wide-spread impact to the
organization
Disadvantages:
• In a pilot, issues of scale can cause problems. For example, the system might work well for 10
users, but not for 1000.
Example:
• A bakery is implementing a new system for customers to order online. They choose 50 customers
and ask them to try the new system, and provide feedback. The bakery can then identify issues and
address them prior to implementing systems for thousands of users.
Implementation Types
4. Direct:
• When a new system is implemented without any phased or pilot implementation, it
is said to be direct. The old system is retired, and the new system goes live.
Advantages:
• If the system is not critical, this can be a good method for implementation
Disadvantages:
• If you are not sure the system will work, this method of implementation may not
be a good idea
Example:
• A store is implementing a new electronic system for employees to leave
suggestions for improvement. There is no existing system. The store uses direct
method because they are very sure the new system will work, there is a low cost if
the system fails, and the store wants to make a "big splash" with the new system.
Software Maintenance
Categories of Software Maintenance –
Maintenance can be divided into the following:
• 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 demands.
• Preventive maintenance:
This type of maintenance includes modifications and updations to prevent future problems of the software. It
goals to attend problems, which are not significant at this moment but may cause serious issues in future.
Maintenance Activities
• IEEE provides a framework for sequential
maintenance process activities.
• It can be used in iterative manner and can
be extended so that customized items and
processes can be included.
• These activities go hand-in-hand with
each of the following phase:
• Identification & Tracing - It involves
activities pertaining to identification of
requirement of modification or
maintenance. It is generated by user or
system may itself report via logs or error
messages. Here, the maintenance type is
classified also.
Maintenance Activities
• Analysis - The modification is analyzed for its
impact on the system including safety and
security implications. If probable impact is
severe, alternative solution is looked for. A set
of required modifications is then materialized
into requirement specifications. The cost of
modification/maintenance is analyzed and
estimation is concluded
• Design - New modules, which need to be
replaced or modified, are designed against
requirement specifications set in the previous
stage. Test cases are created for validation and
verification.
• Implementation - The new modules are
coded with the help of structured design
created in the design step. Every programmer is
expected to do unit testing in parallel.
Maintenance Activities
• System Testing - Integration testing is done among
newly created modules.
Integration testing is also carried out between new
modules and the system.
Finally the system is tested as a whole, following
regressive testing procedures.
• Acceptance Testing - After testing the system
internally, it is tested for
acceptance with the help of users. If at this state,
user complaints some issues they are addressed or
noted to address in next iteration.
• Delivery - After acceptance test, the system is
deployed all over the organization either by small
update package or fresh installation of the
system. The final testing takes place at
client end after the software is delivered.
The End