Software Testing PDF
Software Testing PDF
Subject:
Software Testing
Presented by: Ali Abbasi
Testing is a set of activities that can be planned in advance and conducted systematically. For this reason a
template for software testing should be defined for the software process.
A strategy for software testing must accommodate low-level tests that are necessary to verify that a small source
code segment has been correctly implemented as well as high-level tests that validate major system functions
against customer requirements.
3
Software testing steps:
4
Criteria for Completion of Testing
A classic question arises every time software testing is discussed: “When are we done testing—how do we
know that we’ve tested enough?” Sadly, there is no definitive answer to this question, but there are a few
pragmatic responses and early attempts at empirical guidance.
One response to the question is: “You’re never done testing; the burden simply shifts from you (the software
engineer) to the end user.” Another response (somewhat cynical but nonetheless accurate) is: “You’re done
testing when you run out of time or you run out of money.”
Classes of tests:
• Unit Testing:
Unit testing focuses verification effort on the smallest unit of software design—
the software component or module. Using the component-level design
description as a guide, important control paths are tested to uncover errors
within the boundary of the module.
• Integration Testing
Integration testing is a systematic technique for constructing the software architecture while at the same time
conducting tests to uncover errors associated with interfacing. The objective is to take unit-tested components and
build a program structure that has been dictated by design.
Top-down integration. Top-down integration
testing is an incremental approach to construction
of the software architecture. Modules are
integrated by moving downward through the
control hierarchy, beginning with the main control
module (main program).Modules subordinate (and
ultimately subordinate) to the main control module
are incorporated into the structure in either a
depth-first or breadth-first manner.
depth-first integration integrates all components on
a major control path of the program
structure.Breadth-first integration incorporates all
components directly subordinate at each level,
moving across the structure horizontally.
Bottom-up integration. Bottom-up integration testing, as its name implies, begins construction and testing with
atomic modules (i.e., components at the lowest levels in the program structure). Because components are
integrated from the bottom up, the functionality provided by components subordinate to a given level is always
available. A bottom-up integration strategy may be implemented with the following steps:
Regression testing. Each time a new module is added as part of integration testing, the software changes. New
data flow paths are established, new I/O may occur, and new control logic is invoked. These changes may cause
problems with functions that previously worked flawlessly. In the context of an integration test strategy, regression
testing is the reexecution of some subset of tests that have already been conducted to ensure that changes have
not propagated unintended side effects.
10
Smoke testing. Smoke testing is an integration testing approach that is commonly used when product software is
developed. It is designed as a pacing mechanism for time-critical projects, allowing the software team to assess
the project on a frequent basis. In essence, the smoke-testing approach encompasses the following activities:
1. Software components that have been translated into code are integrated into a build. A build includes
all data files, libraries, reusable modules, and engineered components that are required to implement
one or more product functions.
2. A series of tests is designed to expose errors that will keep the build from properly performing its
function. The intent should be to uncover “show- stopper” errors that have the highest likelihood of
throwing the software project behind schedule.
3. The build is integrated with other builds, and the entire product (in its current form) is smoke tested
daily. The integration approach may be top down or bottom up.
11
12
• VALIDATION TESTING
Validation testing begins at the culmination of integration
testing, when individual components have been
exercised, the software is completely assembled as a
package, and interfacing errors have been uncovered
and corrected. At the validation or system level, the
distinction between conventional software, object-
oriented software, and WebApps disappears. Testing
focuses on user-visible actions and user-recognizable
output from the system.
13
14
The beta test is conducted at one or more end-user sites. Unlike alpha testing, the developer generally is not
present. Therefore, the beta test is a “live” application of the software in an environment that cannot be controlled
by the developer. The customer records all problems (real or imagined) that are encountered during beta testing
and reports these to the developer at regular intervals. As a result of problems reported during beta tests, you
make modifications and then prepare for release of the software product to the entire customer base.
A variation on beta testing, called customer acceptance testing, is sometimes performed when custom software is
delivered to a customer under contract. The customer performs a series of specific tests in an attempt to uncover
errors before accepting the software from the developer. In some cases acceptance testing can be very formal
and encompass many days or even weeks of testing.
• System testing
System testing is actually a series of different tests whose primary
purpose is to fully exercise the computer-based system. Although each
test has a different purpose, all work to verify that system elements have
been properly integrated and perform allocated functions.
Recovery Testing
Recovery testing is a system test that forces the software to fail in a variety of ways and verifies that recovery is
properly performed. If recovery is automatic (performed by the system itself), reinitialization, checkpointing
mechanisms, data recovery, and restart are evaluated for correctness. If recovery requires human intervention,
the mean-time-to-repair (MTTR) is evaluated to determine whether it is within accept- able limits.
15
Security testing
Security testing attempts to verify that protection mechanisms
built into a system will, in fact, protect it from improper
penetration.
Given enough time and resources, good security testing will
ultimately penetrate a system. The role of the system designer is
to make penetration cost more than the value of the information
that will be obtained.
Stress Testing
Earlier software testing steps resulted in thorough evaluation of normal program functions and performance.
Stress tests are designed to confront programs with abnormal situations. In essence, the tester who performs
stress testing asks: “How high can we crank this up before it fails?”
Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or
volume. For example, (1) special tests may be designed that generate ten interrupts per second, when one or
two is the average rate, (2) input data rates may be increased by an order of magnitude to determine how input
functions will respond, (3) test cases that require maximum memory or other resources are executed, (4) test
cases that may cause thrashing in a virtual operating system are designed, (5) test cases that may cause
excessive hunting for disk-resident data are created. Essentially, the tester attempts to break the program.
16
Performance Testing
For real-time and embedded systems, software that provides required function but does not conform to
performance requirements is unacceptable. Performance testing is designed to test the run-time performance of
software within the context of an integrated system. Performance testing occurs throughout all steps in the
testing process. Even at the unit level, the performance of an individual module may be assessed as tests are
conducted. However, it is not until all system elements are fully integrated that the true performance of a system
can be ascertained.
Performance tests are often coupled with stress testing and usually require both hardware and software
instrumentation. That is, it is often necessary to measure resource utilization in an exacting fashion. External
instrumentation can monitor execution intervals, log events as they occur, and sample machine states on a
regular basis. By instrumenting a system, the tester can uncover situations that lead to degradation and possible
system failure.
Deployment Testing
In many cases, software must execute on a variety of platforms and
under more than one operating system environment. Deployment
testing, sometimes called configuration testing, exercises the
software in each environment in which it is to operate. In addition,
deployment testing examines all installation procedures and
specialized installation software that will be used by customers, and
all documentation that will be used to introduce the software to end
users.
17
18
Thanks
for
Your Time
Sources:
• Software engineering a practitioners approach (7th edition) by Roger S. Pressman