This document discusses testing and debugging techniques. It defines unit testing as testing individual modules to check for issues. The main types of testing covered are functional testing, which tests features and scenarios, and performance testing, which measures how the system handles different workloads. Stress testing monitors the system under overload conditions. Debugging is the process of finding and fixing bugs so the software behaves as expected, and can involve backtracking through code or eliminating potential causes through testing.
3. Testing
Running a program with the intent of finding bugs.
It has been many types,
◦ Unit testing
◦ System testing
◦ Integration testing
◦ Acceptance testing
◦ Functional testing
4. Unit testing
Unit testing, a testing technique using which individual
modules are tested to determine if there are any issues by
the developer himself. It is concerned with functional
correctness of the standalone modules.
The main aim is to isolate each unit of the system to
identify, analyze and fix the defects.
Coding &
Debugging Unit testing
Integration
testing
5.
6. Types
Functional Testing :
Functional Testing is a testing technique that is used to
test the features/functionality of the system or Software,
should cover all the scenarios including failure paths and
boundary cases.
7. Performance Testing :
Performance testing, a
non-functional testing
technique performed to
determine the system
parameters in terms of
responsiveness and
stability under various
workload. Performance
testing measures the
quality attributes of the
system, such as scalability,
reliability and resource
usage.
8. Stress Testing :
Stress testing a Non-Functional testing technique that is
performed as part of performance testing. During stress
testing, the system is monitored after subjecting the
system to overload to ensure that the system can sustain
the stress.
The recovery of the system from such phase (after stress)
is very critical as it is highly likely to happen in
production environment.
9. Structural Testing :
• Structural testing, also
known as glass box testing
or white box testing is an
approach where the tests
are derived from the
knowledge of the
software's structure or
internal implementation.
• The other names of
structural testing includes
clear box testing, open box
testing, logic driven testing
or path driven testing.
Structural Testing
Techniques:
Statement Coverage -
This technique is aimed at
exercising all
programming statements
with minimal tests.
Branch Coverage - This
technique is running a
series of tests to ensure
that all branches are tested
at least once.
Path Coverage - This
technique corresponds to
testing all possible paths
which means that each
statement and branch are
covered.
10. Debugging
It is a systematic process of spotting and fixing the
number of bugs, or defects, in a piece of software so
that the software is behaving as expected.
Debugging is harder for complex systems in
particular when various subsystems are tightly
coupled as changes in one system or interface may
cause bugs to emerge in another.
Debugging is a developer activity and effective
debugging is very important before testing begins to
increase the quality of the system.
Debugging will not give confidence that the system
meets its requirements completely but testing gives
confidence.
11. Debugging Process
The debugging process begins with the executing of a
test case.
Results re assessed and a lack of correspondence
between expected and actual performance is
encountered.
In the latter case, 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.
The debugging process will always have one of two
outcomes
◦ The cause will be found and corrected.
◦ The cause will not be found.
12.
13. Debugging Approaches
Brute Force :
◦ Take memory dumps, invoke run time traces, program
is loaded with PRINT statements.
◦ We hope that in the mass of information that is
produced we will find a clue that can lead us to the
cause of an error.
◦ Least efficient and quite common.
◦ More frequently leads to wasted effort and time.
14. Backtracking:
◦ Can be used successful in small programs.
◦ Beginning at the site where a symptom has been
uncovered the source code is traced
backward(manually) unit the site of the cause is
found.
◦ Disadvantage: as the number of source line increases,
the number of potential paths may become
unmanageably large.
15. Cause elimination :
◦ Introduces the concept of binary partitioning.
◦ Uses binary partitioning to reduce the number of
locations potential where errors can exist.
◦ Isolate potential causes, devise cause hypotheses test
to isolate bug.