software testing new
TRANSCRIPT
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 1/67
SOFTWARETESTING
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 2/67
Table Of Contents
1. Introduction to Software Testing
2. Building Software Testing Strategy
3. Establishing a Software Testing Methodology
4. Determining Your Software TestingTechniques
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 3/67
Introduction to Software
Testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 4/67
Testing Myths
Testing is nothing but Debugging
Testing is not the job of the programmer
Testing is done to prove that software
³works´
Testing is done to prove that software
doesn¶t ³work´
Testing activities start only after the coding iscomplete
Testing is not a creative Task
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 5/67
Testing Realities
Testing is a structured process of uncovering the defects in a system
Testing is an integral part of SDLC
Testing can be started early in the life
cycle
The purpose of testing is to have all the
bugs known before release
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 6/67
Introduction
Software testing is a vital part of the software
lifecycle. To understand its role, it is instructive toreview the definition of software testing in theliterature.
Among alternative definitions of testing are the
following:
"..the process of exercising or evaluating a system or system component by manual or automated means to
verify that it satisfies specified requirements or to identify differences between expected and actual results ..."
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 7/67
contd...
"... any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results. Testing is the measurement of software quality ..."
"... the process of executing a program with the
intent of finding errors..."
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 8/67
contd..
-Software testing is defined as 'the executionof a program to find its faults'.
- A successful test is one that finds a defect.
- Besides finding faults, a software can alsobe tested for performance, safety, fault-
tolerance or security.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 9/67
Why Test?
No matter how well software has beendesigned and coded, it will inevitably still
contain defects
Testing is the process of executing a program
with the intent of finding faults
A ³successful´ test is one that finds errors, not
one that doesn¶t find errors
Testing can ³prove´ the presence of faults(bugs), but can not ³prove´ their absence
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 10/67
What is a Defect?
A defect is a variance from a desired product
attribute. There are two categories of defects:
± variance from product specifications
± variance from customer/user expectation
Defects generally fall into one of the following three
categories: ± Wrong
± Missing
± Extra
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 11/67
Defects versus Failures
While the defect is a flaw in the software system, it
has no impact until it affects the user/customer and
the operational system.
A defect that causes an error in operation or
negatively impacts a user/customer is called a failure.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 12/67
Software Quality
Subjective ± as it depends on customer satisfaction
Bug free delivered on time
within budget
meets requirements
maintainable
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 13/67
Building a SoftwareTesting Strategy
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 14/67
Computer System Strategic Risks
- A risk is a condition that can result in a loss.
- The development and installation of a computer
system introduces risks into the organization.
- We cannot eliminate risks, but we can mitigate them.- One of the most effective methods to reduce computer
system strategic risk is testing.
Types of strategic risk:
Incorrect results will be produced
Unauthorized transactions will be accepted by the
system.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 15/67
Computer System Strategic Risks
Continued . . .
Computer file integrity will be lost.
Processing cannot be reconstructed.Continuity of processing will be lost.
Service provided to the user will degrade to an
unacceptable level.
Security of the system will be compromised.
Processing will not comply with organizational
policy or governmental regulation.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 16/67
Computer System Strategic Risks
Continued . . .
Results of the system will be unreliable.
System will be difficult to use. Programs will be unmaintainable.
System will not be portable to other hardware an
software.
System will not be able to interconnect with othecomputer systems.
Performance level will be unacceptable.
System will be difficult to operate.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 17/67
Computer System Strategic Risks
Continued . . .
- An effective approach to testing is to identify andevaluate the risks in a computer system.
- Those risks deemed important to reducebecome the areas for testing.
- A decision can be made as to how much risk isacceptable and then a test plan designed toachieve that goal.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 18/67
Economics of Testing
"Too little testing is a crime - Too muchtesting is a sin."
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 19/67
0 20
0 40
0 60
480 12
1680 0
NORMAL SDLC SDLC TESTING ACCUMULATED ACCUMULATED ACCUMULATED ACCUMULATED
TEST ERRORS/1000 ERRORS/1000 TEST
COST LINES CODE LINES CODE COST
DESIGN 20
ERRORS
CODE 20
ERRORS
TEST 80%ERROR
REQUIREMENTS
20 ERRORS
PRODUCTION
³0³ ERRORS
10 10
15 25
18 42
4 182
0 582
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 20/67
Structured Approach to Testing
Requirements Design Code
(Build / Construction)
Test Operation &
Maintenance
Traditional software development life cycle
- All too often, testing after coding is the only
verification technique used to determine the adequacy
of the system.
- When testing is constrained to a single phase and
confined to the later stages of development, severe
consequences can develop.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 21/67
Structured Approach to Testing
- It is usual to hear of testing consuming 50% of
the development budget.
- All errors are costly, but the later in the life cycle
that the error discovery is made, the more costly
the error.
- An error discovered in the latter parts of the life
cycle must be paid for four different times.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 22/67
Structured Approach to Testing
CODING ERRORS
36%
ANALYSIS AND
DESIGN ERRORS64%
Analysis and design errors are the most numerous
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 23/67
- The recommended testing process is presented in
previous diagram as a life cycle chart showing the
verification activities for each phase.
- The success of conducting verification throughout the
development cycle depends upon the existence of
clearly defined and stated products at each development
stage.
- The recommended test process involves testing in
every phase of the life cycle. Life cycle verification
activities table
Structured Approach to Testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 24/67
Structured Approach to TestingLIFE CYCLE PHASE EMPHASIS VERIFICATION ACTIVITIES
Requirements Upon validation to determine that the defined
requirements meet the needs of the
organization.
Determine verification approach
Determine adequacy of
requirements Generate functional test data
Determine consistency of design
with requirements
Design On verification to ensure that the design
accomplish the defined requirements.
Determine adequacy of design
Generate structural and functional
test data
Determine consistency withdesign
Program (build /
construction)
On verification to ensure that the programs
accomplish the defined requirements.
Determine adequacy of
implementation
Generate structural and functional
test data for programs
Test On inspection to determine that the
implemented system meets the systemspecification.
Test application system
Installation On inspection to determine that the
implemented system meets the system
specification.
Place tested system into
production
Maintenance Retesting to determine that the changes work
and that the unchanged portion continuesto work.
Modify and retest
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 25/67
Test Strategy
The objective of testing is to reduce the risksinherent in computer systems.
The strategy must address the risks and presenta process that can reduce those risks.
The system concerns or risks then establish theobjectives for the test process.
The two components of the testing strategy arethe test factors and the test phase.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 26/67
Test factor:The risk or issue that needs to be addressed as
part of the test strategy. The strategy will select
those factors that need to be addressed in the
testing of a specific application system.
Test phase:
The phase of the systems development life cyclein which testing will occur.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 27/67
Not all test factors will be applicable to all
software systems.
The development team will need to select and
rank the test factors for the specific software
system being developed. Once selected and
ranked, the strategy for testing will be partially
defined.
The test phase will vary based on the testing
methodology used.
Ex: The test phases in a traditional waterfalllifecycle methodology will be much different from
the phases in a Rapid Application Development
methodology.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 28/67
Test Factors
CorrectnessFile Integrity
Authorization
Audit Trail
Continuity of processingService levels
Access control
Compliance
ReliabilityEase of use
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 29/67
Test Factors
Continued . . .
Maintainability
Portability
Coupling
Performance
Ease of
Operation
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 30/67
Developing a Test Strategy
A generic test strategy is illustrated in the figurewhich is a test_factor/test_phase matrix. However,
this strategy will need to be customized for any
specific software system.
Four steps must be followed to develop a customizedtest strategy.
Select and rank test factors
Identify the system development phases
Identify the business risks associated with the
system under development
Place risks in the matrix
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 31/67
Test Strategy Matrix
TEST
PHASE
TEST
FACTORS
(high to low)
Factor or
RisksTest
Concerns
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 32/67
Testing Methodology
The testing methodolgy we propose
incorporates both testing strategy and testing
tactics. The tactics add the test plans, test
criteria, testing techniques, and testing toolsused in validating and verifying the software
system under development.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 33/67
Establishing a SoftwareTesting Methodology
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 34/67
Establishing a Software Testing
Methodology
The testing methodology is the means bywhich the test strategy is achieved.
Testers Job.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 35/67
What Are You Testing For?
Variance from specifications
Variance from what is desired
Testers need to identify both types of
defect.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 36/67
Why Are Defects Hard to Find?
Not Looking.
Looking, but not seeing.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 37/67
The four testing tactics of validation,
verification, functional test, and structuraltest, which are the bread and butter of
testing can be separated into two groups:
(1) validation and verification
(2) functional and structural testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 38/67
Verification and Validation
Verification :
"Did we build the right system?
Validation :
"Did we build the system right?³
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 39/67
VERIFICATION
EXAMPLE
PERFORMED BY EXPLANATION DELIVERABLE
Requirements reviews Developers, Users The study & discussion
of the computer system reqs to ensure
they meet stated user
needs & are feasible
Reviewed statement of
requirements, ready tobe translated into
system design.
Design Reviews Developers The study & discussion
of the computer
system design toensure it will support
the system
requirements
System design, ready
to be translated into
computer programs,hardware configs,
docs, and training.
Code Walkthroughs Developers An informal analysis of
the program source
code to find defects
and verify codingtechniques.
Computer software
ready for testing or
more detailed
inspections by thedeveloper.
Code Inspections Developers, Subject
Matter Experts
A formal analysis of the
program source code
to find defects as
defined by meeting
computer designs ecifications.
Computer software
ready for testing by the
developer.
Computer SystemVerification Examples
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 40/67
VALIDATION
EXAMPLE
PERFORMED BY EXPLANATION DELIVERABLE
Unit Testing Developers The testing of a single
program, module, or unitof code. Validates that the
unit performs as designed.
Software unit ready for
testing with other systemcomponent, such as other
units, hardware, docs, or
users.
Integrated Testing Developers, Testers The testing of related
programs, modules, or
units of code. Validates
that multiple parts of thesystem interact according
to the system design.
Portions of the system
ready for testing with other
portions of the system.
System Testing Developers, Testers The testing of an entire
computer system. This
kind of testing can include
functional and structural
testing, such as stress
testing. Validates the
system reqs.
A tested computer system,
based on what was
specified to be developed
or purchased.
User Acceptance
Testing
Testers, Users The testing of a computer
system or parts of a
computer system to make
sure it will work in the
system regardless of what
the system requirementsindicate.
A tested computer system,
based on user needs.
Computer SystemValidation Examples
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 41/67
Functional and Structural Testing
What is Functional Testing?
What is Structural Testing?
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 42/67
Functional Testing
Advantages :
- Simulates actual system usage.
- Makes no system structure assumptions.
Disadvantages :
- Potential of missing logical errors in software.
- Possibility of redundant testing.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 43/67
Structural Testing
Advantages :
- Software¶s structure logic can be tested.
- Areas not covered in functional testing can be
tested.
Disadvantages :
- Doesn¶t ensure that software meets user requirements.
- Its tests may not mimic real-world situations.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 44/67
Considerations in Developing
Testing Methodologies
Following are considerations to convert the
developed test strategy, into test tactics or test
plan that will be followed in executing the day-to-
day testing.
1. Acquire and study the test strategy
2. Determine the type of development Project.3. Determine the type of software system.
4. Determine the project scope.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 45/67
Considerations in Developing
Testing Methodologies
Continued . . .
5. Identify the tactical risks.
6. Determine when testing should occur.
7. Build the system test plan.
8. Build the unit test plan.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 46/67
Determining Your Software TestingTechniques
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 47/67
Determining Your Software
Testing Techniques
Common testing techniques used in evaluatingcomputerized applications are divided into threecategories:
(1) System structural testing techniques
(2) System functional techniques
(3) Unit testing techniques.
We would also see the interrelationship betweenthe test factors and the techniques in order toillustrate the purpose for which each of thedescribed techniques is most valuable.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 48/67
Testing Concepts
1. Structural Vs functional testing
2. Dynamic Vs static testing3. Manual Vs automatic testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 49/67
Structural Vs Functional Testing
Structural Testing
Properties of TEST SET derived from the
program's internal structure.
Functional Testing
Properties of TEST SET derived from a
description of the program's function.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 50/67
Structural Vs Functional Testing
Structural Testing
Structural analysis based test sets tend touncover errors that occur during "coding" of the
program.
Functional Testing
Functional analysis-based test sets tend to
uncover errors that occur in implementingrequirements or design specifications.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 51/67
Structural Vs Functional Testing
Structural Testing
Structural testing ensures sufficient testing of the
implementation of a function.
It is used primarily during the coding phase,
structural analysis should be used in all phases
of the life cycle where the software is
represented formally in some algorithmic,design, or requirements language.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 52/67
Structural Vs Functional Testing
Continued . . .
The intent of structural testing is to assess theimplementation by finding test data that will forcesufficient coverage of the structures present in
the implemented application.
Structural testing evaluates both that all aspectsof the structure have been tested and that the
structure is sound. Determining that all tasksthrough a structure are tested is a difficultprocess and one requiring extensive test data.However, determining if the structure functionsproperly is a test task that is more easily
accomplished.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 53/67
Structural Vs Functional Testing
Functional Testing
Functional testing ensures that the requirements
are properly satisfied by the application system.
The functions are those tasks that the system is
designed to accomplish.
Functional testing is not concerned with howprocessing occurs, but rather, with the results of
processing.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 54/67
Dynamic Vs Static Testing
TEST METHODS can be classified into Dynamic
and Static techniques.
Dynamic Testing
Dynamic analysis requires that the program be
executed and hence involves the traditional
notion of program testing.
i.e. The program is run on some test cases and
the results of the program's performance are
examined to check whether the program
operated as expected.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 55/67
Dynamic Vs Static Testing
Static Testing
Static analysis does not usually involve actual
program execution. Common static analysis
techniques include such tasks as syntax
checking.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 56/67
Dynamic Vs Static Testing
Dynamic Testing
Exhaustive Testing:
It is a Dynamic analysis technique.
It is infinite and infeasible.
Static Testing ± Carried out during initial phases
of SDLC
Dynamic Testing ± Carried out during Later
phases of SDLC.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 57/67
Dynamic Vs Static Testing
- Find criteria for choosing representative test
cases from the total population of test
conditions.
- Normally a c ombination of stati c and dynami c
tests is used, selecting a reasonable subset of
test conditions to provide a high probability that
the system will perform correctly in an
operational status.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 58/67
Manual Vs Automated Tests
- Manual techniques are performed by people,
and automated techniques by the computer.
- This classification is made on the basis of
whether the method is a manual one, such as
structured walkthrough or code inspections, or
whether the method is automated.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 59/67
Manual Vs Automated Tests
- The more automated the developmental
process, the easier it becomes to automate the
test process.
- On the other hand, the greater reliance on
people to analyze, document, and develop
computer system manually, the more it becomes
necessary to test manually.
Testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 60/67
SELECT TEST FACTOR
DETERMINE SDLC PHASE
IDENTIFY CRITERIA TO TEST
SELECT TYPE OFTEST
UNIT TEST TECHNIQUE
SELECT TESTMETHOD
SELECT MANUALOR
AUTOMATED
SELECT MANUALOR
AUTOMATED
SELECT MANUALOR
AUTOMATED
SELECT MANUALOR
AUTOMATED
SELECT MANUALOR
AUTOMATED
SELECT MANUALOR
AUTOMATED
SELECT TESTMETHOD
SELECT TESTMETHOD
SELECT TECHNIQUE SELECT TECHNIQUE
SYSTEM STRUCTURAL SYSTEM FUNCTIONAL
DYNAMIC DYNAMIC DYNAMISTATIC STATIC STATIC
Testing
Techniques
Selection
Process
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 61/67
Structural System Testing
Techniques
- Structural system testing is designed to verifythat the developed system and programs work.
- The objective is to ensure that the productdesigned is structurally sound and will functioncorrectly.
-It attempts to determine that the technology hasbeen used properly and that when all thecomponent parts are assembled they function asa cohesive unit.
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 62/67
Structural System Testing
Techniques
Continued . . .
- The structural system testing techniques provide
the facility for determining that the implementedconfiguration and its inter -relationship of partsfunctions so that they can perform the intendedtasks.
- The techniques are not designed to ensure thatthe application system is functionally correct, butrather, that it is structurally sound.
TECHNIQUE DESCRIPTION EXAMPLE
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 63/67
TECHNIQUE DESCRIPTION EXAMPLE
STRESS Determine system performs
with expected volumes
Sufficient disk space
allocated
Communication lines
adequate
EXECUTION System achieves desired level
of proficiency
Transaction turnaround time
adequate
Software/hardware use
optimized
RECOVERY System can be returned to anoperational status after a failure
Induce failureEvaluate adequacy of
backup data
OPER ATIONS System can be executed in a
normal operational status
Determine systems can run
using document
JCL adequate
COMPLIANCE System is developed in
accordance with standards and
procedures
Standards followed
Documentation complete
SECURITY System is protected in
accordance with importance to
organization
Access denied
Procedures in place
Functional System Testing
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 64/67
Functional System Testing
Techniques
- Functional system testing is designed to ensure
that the system requirements and specifications
are achieved.
- The process normally involves creating test
conditions for use in evaluating the correctness
of the application.
TECHNIQUE DESCRIPTION EXAMPLE
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 65/67
REQUIREMENTS System performs as
specified
Prove system requirements
Compliance to policies,
regulations
REGRESSION Verifies that anything
unchanged still performs
correctly
Unchanged system segments
function
Unchanged manual
procedures correct
ERROR HANDLING Errors can be prevented or
detected, & then corrected
Error introduced into test
Errors re-entered
MANUAL SUPPORT The people-computer interaction works
Manual procedures developed
People trained
INTERSYSTEMS Data is correctly passed
from system to system
Intersystem parameters
changed
Intersystem docs updated
CONTROL Controls reduce system risk
to an acceptable level
File reconciliation procedures
work
Manual controls in place
PARALLEL Old & new system are run &
the results compared to
detect unplanned difference
Old & new system can
reconcile
Operational status of old
system maintained
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 66/67
STOP?
8/8/2019 Software Testing New
http://slidepdf.com/reader/full/software-testing-new 67/67
T hanks- Q A Team