Académique Documents
Professionnel Documents
Culture Documents
Test Levels
Component Testing (unit testing)
Integration Testing
System Testing
Acceptance Testing
Maintenance Tests
Testing once changes have been made
But, testing should begin at the Requirements Stage and not wait
until the code is created and passed onto Testing.
Checking
Software Engineering
Change Management
Formal Proof
...
Reviews
Tests
Testing
Verification
Comparison of the product of a development phase with its
specification (e.g. component implementation against its
specification).
Validation
The applicability of a problem solution (a product or a system) is
checked by the user
Are we developing the right software to solve the problem?
Support Monitoring
method “know-how” fault information system
guidelines (defect tracking system)
tools develop a fault classification
resources system
(time and staff) progress and effort monitoring
reporting
Integration Testing
System Testing
Acceptance Testing
V Model:
Requirements
Acceptance Testing
Analysis
Component Coding
V Model:
Requirements
Acceptance Testing
Analysis
Component Coding
Term Synonym
Besides the general V Model, there are a series of other life cycle
models. Here are two well known representatives:
Waterfall model
Problem: Greatly simplifies reality; it assumes a linear sequence of
phases. A modified, more realistic version of the waterfall model allows for
returns from a phase to the preceding phase (feedback loop). Called the
Modified Waterfall Model.
Requirements
analysis
System &
component
design
Implementation and
Component test
Integration
and system test
Installation
and maintenance
Incremental models
Incremental models consider that the phases of software development
generally are not passed through only once but several times.
prototypes,
models,
simulations
Integration test
Putting the components / modules together
Interfaces
Component test (unit test, component test)
Component specification
Component implementation
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 18 - 123
Testing Phases in the V Model
Component Test
TP TD TC TS TL TR
Integration Test
TP TD TC TS TL TR
System Test
TP TD TC TS TL TR
Acceptance Test
TP TD TC TS TL TR
time
QA testing
QA testing means
testing in accordance with quality assurance requirements
specification-based testing
Goal: Ensure that software released for testing complies with the
demands on software quality (i.e. functional as well as non-functional
requirements)
Development Testing
QA testing
(specification-based) Acceptance Test
Requirements
Specification
Ideal Case
Development
Dev. test
Prep. for
QA testing
QA testing
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 29 - 123
Project Planning and Testing
Design
Feature freeze and
release for QA test
?
?
Development
Dev. test
Prep. for
QA testing
QA testing
Wanted:
Efficient means for ensuring the quality of the product,
without consequences on the scheduled project deadlines
without trade-offs for the systematic test
Prioritization
Last change of SW
Code sections burdened with risk (if tests are not mandatory)
check completely if possible
(if applicable, check incrementally according to impact analysis)
Last change of SW
often: 0
Release Conditions
Examples:
Exit testing only if
all known faults of priority level “high” are corrected
all known faults of priority level “high” and all known faults of priority
level “medium” are corrected
Examples
A predefined test coverage has been reached.
The number of remaining failures has fallen below a predefined
number (Note: this number can only be estimated!)
Only a certain number of failures has been found per (test) time unit.
The delivery date has been reached(!)
Test Strategies:
The Change Request Management System gives hints for the
decision whether further testing makes sense or not
Prerequisite: (project) global definition of configurations -
which changes are permitted at a certain point in time, and which are
not?
2. recommendation:
test ends here
Code freeze
permitted changes
(start of QA testing)
comp 1
Develop QA test and ChReq’s Project
comp 2
ment time
Number of
detected faults 1. no more
known faults
of high severity
Component Coding
Component Test
Testing aspects
Functionality of the component / module
Component structure
Exceptions
Performance or other
non-functional requirements
Fault classes
Missing paths
Wrong paths
Computation faults
Prerequisites
Component specification exists
Detailed specification and source code are available
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 40 - 123
Component / Module Test
Definition: Component
Software entity
having a well-defined interface for provided services,
with a specification of the required services. Only explicit
dependencies are allowed.
Software entity
having a well-defined interface (typically functional) and
an internal state (defined by the data of the component)
Test harness
- contains the necessary test drivers and surrogates
Test Harness
Sub- Sub-
routine routine Surrogates
#1 #2
Test Cases
Testing Debugging
detects deviations, failures and finds the reasons for deviations
breakdowns and breakdowns
is a planned activity is a deductive activity (the first
step indicates the next step…)
is based upon defined conditions cannot be automated
Debugging is an activity
where the reason for a failure is located,
its correction should be well thought out,
the correction is carried out and
the consequences of the correction are checked.
Testing expert
systematically plans test strategies and test cases
tests systematically
Corrections take a relatively high amount of effort
Beware
Here, an Extreme Programming test means the development test
(unit test), not the QA test !
There are no explicit requirements and no explicit test specifications
i.e. the quality of the tests depends upon the developer‘s
understanding of reasonable and necessary tests
Advantages
Developers consider testability already during design
Stability of interfaces
Testability is important!
Design for testability
many time-consuming
iterations needed
Standard SW Ok?
Development returns + (Test Development)
Process corrections
QA Test Approved
Product
Test-oriented
SW
Development Ok?
Process returns + fewer iterations
corrections “Test Development”
corrections
more time for QA test
System test
Integration test
Testing effort
Component test
Traditional
process
t
QA Test
Testing effort
Test-
oriented
process t
Developm’ Test QA Test
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 57 - 123
Results
System test
Integration test
Testing effort
Component test
Traditional
process
t
QA Test
Testing effort
Test-
oriented
process t
Development’s Test QA Test
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 58 - 123
Integration and Integration Test
Integration and Integration Test
Component Coding
Attention:
Integration Strategy
Order of the Integration Steps (covered in detail over the next pages)
Bottom-up
Top-down
Ad-hoc
Hardest first
Function-oriented
Transaction-oriented
Non-incremental or “Big-bang”
Bottom-up Integration
main
(will be tested at the end)
(5)
(4) (3)
(1) (2)
Idea:
“Start at the lowest level and then work upwards”
Integrate hardware-related or support functions first
Top-level functions are called by test drivers
Advantages:
No stubs needed
Ideal case: very efficient development
Disadvantages:
Cannot be presented at an early stage
No prototype available
Higher-level components must be simulated by test drivers
Useful:
If the requirements are clear, the project duration is short and no
prototype is needed
Top-down Integration
main
(1)
(2)
(3)
(4)
Idea:
“Start at the highest level and then work downwards”
The “calling functions” are integrated before the “called functions”
Called functions are simulated
Begin with an early prototype
Advantages:
Progress can be demonstrated early
A common understanding of the main functionality is achieved early
Early validation of system handling
Possible demand for corrections detected early
Disadvantages:
Effort for the implementation of the simulators for the called functions
is high
Hardest-first Integration
Idea:
“Implement the most difficult/critical task first”
Critical or error-prone components, or components that are essential
for further integration steps, are integrated early
Calling function is simulated
Called functions are simulated
Advantages:
Critical components / functions are checked early. If needed, even
major changes can be realized on time.
Feasibility is examined early
Benefits of usage may be possible before completion of the whole
system
Disadvantages:
Critical components / functions must be available early (planning)
Effort for the implementation of the simulators
Useful:
If there are critical or extremely error-prone components
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 72 - 123
Integration Strategies
Idea:
Integration commences as soon as at least two components with a
common interface have passed the respective component tests
Calling function is simulated
Called function is simulated
Advantages:
Integration can start as soon as possible
Disadvantages:
May not be a prototype and therefore no early presentation
Critical components are possibly integrated very late
Effort for the implementation of simulators is high
Useful:
If no other strategy applies
If you cannot wait any longer for components delivered late
Big-bang Integration
Idea:
“All at once” (or “a great deal at once”)
All components are integrated in one step
Advantages:
No effort for the implementation of simulators
Disadvantages:
Localization of faults is costly
Systematic testing is difficult, if not impossible (many interruptions)
Often, integration and test can only be continued after the corrections
Useful:
If no other strategy applies (e.g. because a partial integration cannot
be performed due to the test environment)
Function-oriented Integration
Idea:
Integrate components that realize a common system function.
Advantages:
User-oriented, determined approach (often risk-minimizing)
Disadvantages:
Rarely used functions are tested rarely
(perilous functions are possibly neglected)
“Tricky” faults (not occurring during the standard tests) remain
undetected
Localization of faults is costly
Possibly, tests begin very late
Useful:
In combination with other strategies (e.g. bottom-up)
Transaction-oriented Integration
Idea:
Integrate components that realize a common transaction
Advantages:
Data-oriented, determined approach (often risk-minimizing)
Disadvantages:
Rarely used transactions are tested rarely
“Tricky” faults (not occurring during the standard tests) remain
undetected
Localization of faults is costly
Possibly, tests begin very late
Useful:
In combination with other strategies
Summary (1)
bad good
Design for Testability
Loose coupling
Strong cohesion
Added test interfaces
Added functionality for tests
Design in Layers
Project-specific, customer-specific, or user interface-specific components
Basis components with standard functionality
Hardware-related components
Summary (2)
Component Coding
System Test
Testing aspects
Completeness of the functional qualities
Completeness of the non-functional qualities, e.g.
Efficiency and data capacity
Ease of use and robustness
Security and reliability
Compatibility and maintainability
Fault classes
Requirement not fulfilled
Requirement wrongly fulfilled
Prerequisites
Requirement specification is available
Requirements are quantified
Volume Test
Focus:
Reliability, correctness, efficiency of the system when dealing with
large amount of data
Test cases:
Transactions with large amounts of data
Load Test
Focus:
Reliability, correctness and efficiency of the system under a high or
growing computational load
Test cases:
Activities consuming large amounts of computing time
Large number of parallel requests
Examples of failures:
System crash of internet servers, database servers, ...
Probe effect
Stress Test
Focus:
Reliability, correctness and efficiency of the system under a high
communication load
Test cases:
High rate of equal requests
High rate of different requests
Performance/Efficiency Test
Focus:
Acceptable response times and efficient resource usage of the system
under low and high load
Test cases:
Activities consuming high and low amounts of computing time
Security Test
Focus:
Security of the system regarding unauthorized access / actions
Test cases:
“Forbidden” login, “forbidden“ data base queries
Stability/Reliability Test
Focus:
Stability under difficult conditions
Test cases:
Abort function, interrupts, radio interferences or interferences on the
system‘s bus
Focus:
Wrong operation by user
Successful (system) restart after (system) abort (e.g. power breakdown,
hardware failure)
Test cases:
Wrong input by user
Recovery after abort in different situations
Examples of failures:
Deadlocks
Inconsistencies
System crash after wrong input
Compatibility Test
Focus:
Compatibility / data conversion / portability
Test cases:
Compliance with standards
Porting to another hardware platform
Conversion to another transaction protocol
Usability Test
Focus:
Usability
Test cases:
Application-relevant sequence of operations, installation and
maintenance problems
Configuration Test
Focus:
Configurability
Test cases:
Creation of different configurations
Test of the software in different configurations
Focus:
Complexity of the activities for small changes
(hopefully, the small changes were defined)
Test cases:
Extension of allowed margins, input values, states, …
Comprehensibility of the documentation in order to perform the
adaptation
Update of the documentation regarding the adaptation
Test computer
Actua-
Sensor-
h/w
Controller tor
h/w
Summary
Component Coding
Acceptance Test
Testing aspects
“Confidence-building measure”
Practical suitability
Completeness
Fault classes
Requirement not fulfilled
Requirement wrongly fulfilled
Prerequisites
Requirement specification is available
Customer is available to provide feedback
Alpha/beta testing
Validation of software before being released; performed by
representatives of the users
The situation is as if the product had been bought already
(customer environment)
Plan a feedback loop
Product Acceptance
Prerequisites
Acceptance requirements are defined (at the beginning of the project!)
Product Acceptance
Acceptance criteria:
Acceptance as mainly fulfilling requirements
Acceptance with minor defects
Acceptance despite major defects
Acceptance deferred due to major defects
Acceptance without validation
Product Acceptance
Common scenarios
Customer reports a defect (justified)
Customer claims mandatory functionality is missing
Customer repeatedly reports severe defects in order to defer acceptance
Planning
Who takes part?
Schedule
Criteria must be defined
Coding
Ideal Conditions
Component Coding
Maintenance
Component Coding Test
Efficient adaptation:
What to change?
Requirements Requirements in the relevant
specifications
Functional Design Affected design
Affected test specifications
Technical Design Affected code: few components
with loose coupling
Component Design
Component Coding
main
Acceptance Test
System Test
changed module
What to repeat?
Component test
Integration test Component Test
System test
(condensed)
Acceptance test Component Coding
(condensed)
© 2006 www.methodpark.com | Testing in the Software Lifecycle | 123 - 123
Maintenance Test
Component Coding
Summary (1)