ISTQBCH2--testing in lifecycle2 (2)
ISTQBCH2--testing in lifecycle2 (2)
Software Testing
ISTQB / ISEB Foundation Exam Practice
4 Dynamic test
5 Management 6 Tools
techniques
1
Lifecycle
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
2
V-Model: test levels
Business Acceptance
Requirements Testing
System System
Specification Testing
Component
Code
Testing
3
V-Model: late test design
Tests
Business Acceptance
Requirements Testing
Tests
Project “We don’t have Integration Testing
Specification time to design in the Large
tests early”Tests
System System
Specification Testing
Tests
Design Integration Testing
Specification in the Small
Tests
Component
Code
Testing
Design
Tests?
4
V-Model: early test design
Tests Tests
Business Acceptance
Requirements Testing
Tests Tests
Project Integration Testing
Specification in the Large
Tests Tests
System System
Specification Testing
Tests Tests
Design Integration Testing
Specification in the Small
Tests Tests
Component
Design Code
Testing
Run
Tests Tests
5
• In traditional models, defects were found too late in the life
cycle, as testing was not involved until the end of the project.
Testing also added lead time due to its late involvement.
• The V-model, on the other hand, shows that testing is
not only an execution-based activity.
• There are a variety of activities that need to be
performed before the end of the coding phase.
• These activities should be carried out in parallel with
development activities, and testers need to work with
developers and business analysts so they can
perform these activities and tasks and produce a set
of test deliverables.
• The work products produced by the developers and
business analysts during development are the basis
6
of testing in one or more levels.
Early test design
8
Verification, Validation and Testing
Validation
Testing
Any
Verification
9
Another model--incremental development
models
10
Rapid Application Development
Components/functions are developed in parallel as if they were
mini projects, the developments are time-boxed, delivered, and
then assembled into a working prototype.
This methodology
allows early validation
of technology risks and
a rapid response to
changing customer
requirements.
11
Agile development
Extreme Programming (XP) is one of the most well-known agile development life
cycle models.
Some characteristics of XP are:
• It promotes the generation of business stories to define the functionality.
• It demands an on-site customer for continual feedback and to define and carry
out functional acceptance testing.
• It promotes pair programming and shared code ownership amongst the
developers.
• It states that component test scripts shall be written before the code is written and
that those tests should be automated.
• It states that integration and testing of the code shall happen several times a day.
• It states that we always implement the simplest solution to meet today's
problems.
12
How would you test this spec?
13
“Testing is expensive”
Compared to what?
What is the cost of NOT testing, or of faults
missed that should have been found in test?
- Cost to fix faults escalates the later the fault is found
- Poor quality software costs more to use
• users take more time to understand what to do
• users make more mistakes in using it
• morale suffers
• => lower productivity
Do you know what it costs your organisation?14
What do software faults cost?
15
Hypothetical Cost - 1
£700 £50
16
Cost of fixing faults
1000
100
10
Contents
Models for testing, economics of testing
omponent Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
18
Component testing
Component
Test Planning
Component
Test Specification
Component
Test Execution
Component
Test Recording
Checking for
Component END
Test Completion 20
Component test process
BEGIN Component test planning
- how the test strategy and
Component
Test Planning
project test plan apply to
the component under test
Component
Test Specification -any exceptions to the strategy
Component
Test Execution
- all parts the component
will interact with (e.g. stubs
Component and drivers
Test Recording
Checking for
Component END
Test Completion 21
Component test process
BEGIN
Component
Test Planning
Component
Test Specification
Component test execution
Component - Each test case is executed
Test Execution - Either executed manually
or using an automated
Component
Test Recording tool
Checking for
Component END
Test Completion 23
Component test process
Component test recording
BEGIN using a testing management tool
- identities & versions of
Component
Test Planning
component, test specification
- actual outcome recorded &
Component compared to expected outcome
Test Specification - discrepancies logged
- repeat test activities to establish
Component removal of the discrepancy
Test Execution (fault in test or verify fix)
- record coverage levels achieved
Component for test completion criteria
Test Recording
specified in test plan
Checking for
Component Sufficient
END to show test
Test Completion activities carried out 24
Component test process
BEGIN
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
27
Integration testing in the small
more than one (tested) component
communication between components
what the set can perform that is not possible
individually
non-functional aspects if possible
integration strategy:
- big-bang vs incremental (top-down, bottom-up,
functional)
done by designers, analysts, or
independent testers
28
Integration Testing Example
https://youtu.be/QYCaaNz8emY
http://www.guru99.com/integration-testing.html
29
Example of Integration Test
Cases
Test Case ID Test Description Input Expected Result
Test the integration between the System generates a The bill is correctly
TS-3 billing system and the accounting bill and sends it to the processed and recorded in
system accounting system the accounting system
In theory:
- if we have already tested components why not just
combine them all at once? Wouldn’t this save time?
- (based on false assumption of no faults)
In practice:
- takes longer to locate and fix faults
- re-testing after fixes more extensive
- end result? takes more time
31
Incremental Integration
32
Top-Down Integration
Baselines:
- baseline 0: component a
- baseline 1: a + b a
- baseline 2: a + b + c
- baseline 3: a + b + c + d b c
- etc.
d e f g
Need to call to lower
level components not
h i j k l m
yet integrated
Stubs: simulate missing
n o
components
33
Stubs
Stub replaces a called component for
integration testing
Keep it Simple
Examples
- print/display name (I have been called)
- reply to calling module (single value)
- computed reply (variety of values)
- prompt for reply from tester
- search list of replies
- provide timing delay
34
Pros & cons of top-down approach
Advantages:
- critical control structure tested first and most often
- can demonstrate system early (show working
menus)
Disadvantages:
- needs stubs
- may be difficult to "see" detailed output (but should
have been tested in component test)
35
Bottom-up Integration
Baselines: a
- baseline 0: component n
b c
- baseline 1: n + i
- baseline 2: n + i + o
d e f g
- baseline 3: n + i + o + d
- etc.
h i j k l m
Needs drivers to call
the baseline configuration
n o
Also needs stubs
for some baselines
36
Drivers
37
Pros & cons of bottom-up approach
Advantages:
- lowest levels tested first and most thoroughly (but
should have been tested in unit testing)
- good for testing interfaces to external environment
(hardware, network)
Disadvantages
- no working system until last baseline
- needs both drivers and stubs
- major control problems found last
38
Minimum Capability Integration
(also called Functional)
Baselines: a
- baseline 0: component a
b c
- baseline 1: a + b
- baseline 2: a + b + d
d e f g
- baseline 3: a + b + d + i
- etc.
h i j k l m
Needs stubs
Shouldn't need drivers
n o
(if top-down)
39
Thread Integration
(also called functional)
order of processing some event a
determines integration order
interrupt, user transaction b c
d e f g
advantages:
- critical processing first h i j k l m
disadvantages: n o
- may need complex drivers and stubs
40
Inegration Example
41
Example:
For Example we have 3 modules Sign-in, home-page, and
user-database module. Sign-in module is ready and need to
test it, but we call functions from home-page and user-
database (which is not ready). To test at a selective module
we write a short dummy piece of a code which simulates
home-page and user-database, which will return values for
Sign-in, this piece of dummy code is always called Stubs
and it is used in a top down integration.
Considering the same Example above: If we have home-
page and user-database modules get ready and Sign-in
module is not ready, and we need to test home-page and
user-database modules Which return values from Sign-in
module, So to extract the values from Sign-in module We
write a Short Piece of Dummy code for Sign-in which
returns value for home-page and user-database, So these
pieces of code is always called Drivers and it is used in
Bottom Up Integration.
42
Lifecycle
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
43
System testing
Functional requirements
- a requirement that specifies a function that a system
or system component must perform (ANSI/IEEE
Std 729-1983, Software Engineering Terminology)
45
Non-functional system testing
46
Performance Tests
Timing Tests
- response and service times
- database back-up times
Capacity & Volume Tests
- maximum amount or processing rate
- number of records on the system
- graceful degradation
Endurance Tests (24-hr operation?)
- robustness of the system
- memory allocation 47
Multi-User Tests
Concurrency Tests
- small numbers, large benefits
- detect record locking problems
Stress Tests
- go beyond limits for the system - know what will
happen
- particular relevance for e-commerce
48
Source: Sue Atkins, Magic Performance Management
Load testing
Load testing in a nutshell consists of:
- Conducting the anticipated load in terms of virtual users or requests per
second.
- Comparing actual metrics (response time, throughput, percentage of
errors, resource usage, etc.) with the expected metrics.
- Deciding whether the current build is ready to go or not.
tools
- JMeter: http://jakarta.apache.org/jmeter/
16 Top Load Testing Software Tools for 2024 | Test Guild
Front-end performance testing measures how fast your website loads and
displays content for users. In contrast, back-end performance testing
involves sending multiple requests to your servers to see if they can
handle simultaneous requests.
49
Stress Tests
The goal of stress testing is to evaluate and determine the
behavior of a software component while the offered load
is in excess of its designed capacity
The system is deliberately stressed by pushing it to and
beyond its specified limits
- It ensures that the system can perform acceptably under worst-
case conditions, under an expected peak load. If the limit is
exceeded and the system does fail, then the recovery mechanism
should be invoked
Stress tests are targeted to bring out the problems
associated with one or more of the following:
- Memory leak
- Buffer allocation and memory carving
50
Usability Tests
messages tailored and meaningful to (real) users?
coherent and consistent interface?
sufficient redundancy of critical information?
within the "human envelope"? (7±2 choices)
feedback (wait messages)?
clear mappings (how to escape)?
http://www.usefulusability.com/24-usability-testing-
tools/
http://www.feng-gui.com/
https://www.usertesting.com/be-a-user-tester
Who should design / perform these tests?
51
Security Tests
- Security tests are designed to verify that the system
meets the security requirements
• Confidentiality
– It is the requirement that data and the processes be protected
from unauthorized disclosure
• Integrity
– It is the requirement that data and process be protected from
unauthorized modification
• Availability
– It is the requirement that data and processes be protected from
the denial of service to authorized users
- Security test scenarios should include negative
scenarios such as misuse and abuse of the software
52 system
Security Tests (cont’d) :
useful types of security tests includes the following:
1. Verify that only authorized accesses to the system are permitted
2. Verify the correctness of both encryption and decryption
algorithms for systems where data/messages are encoded.
3. Verify that illegal reading of files, to which the perpetrator is not
authorized, is not allowed
4. Ensure that virus checkers prevent or limit entry of viruses into
the system
5. Ensure that the system is available to authorized users when a
zero-day attack occurs
6. Try to identify any “backdoors” in the system usually left open
by the software developers
53
Configuration and Installation
Configuration Tests
- different hardware or software environment
- configuration of the system itself
Installation Tests
- distribution (CD, network, etc.) and timings
- physical aspects: electromagnetic fields, heat,
humidity, motion, chemicals, power supplies
- uninstall (removing installation)
54
Reliability Tests
Back-ups
- computer functions
- manual procedures (where are tapes stored)
Recovery
- real test of back-up
- manual procedures unfamiliar
- should be regularly rehearsed
- documentation should be detailed, clear and
thorough
56
Documentation Testing
Documentation review
- check for accuracy against other documents
- gain consensus about content
- documentation exists, in right format
Documentation tests
- is it usable? does it work?
- user manual
- maintenance documentation
57
Tools used for System Testing
JMeter
Gallen Framework
HP Quality Center/ALM
IBM Rational Quality Manager
Microsoft Test Manager
Selenium
Appium
LoadRunner
Gatling
Apache JServ
SoapUI
Top 20 Performance Testing Tools in 2024 | BrowserStack
58
Lifecycle
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
59
Integration testing in the large
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
61
User acceptance testing
Users know:
- what really happens in business situations
- complexity of business relationships
- how users would do their work using the system
- variants to standard tasks (e.g. country-specific)
- examples of real cases
- how to identify sensible work-arounds
66
Acceptance testing motto
67
Lifecycle
Contents
Models for testing, economics of testing
High level test planning
Component Testing
Integration testing in the small
System testing (non-functional and functional)
Integration testing in the large
Acceptance testing
Maintenance testing
68
Maintenance testing
Testing New Product Versions
Testing to preserve quality after software
maintenance
when a product is adapted to new operational
conditions (adaptive maintenance, updates of
operating systems, databases, middleware) or
when defects are corrected (corrective
maintenance).
Testing changes made during maintenance can
be difficult because the system’s specifications
are often out of date or missing.
69
What to test in maintenance testing
Test any new or changed code
Impact analysis
- what could this change have an impact on?
- how important is a fault in the impacted area?
- test what has been affected, but how much?
• most important affected areas?
• areas most likely to be affected?
• whole system?
The answer: “It depends”
70
Regression testing
regression testing involves executing test
cases that have been executed before.
Regression tests are executed whenever
- the software changes, either as a result of fixes or
new or changed functionality.
- It is also a good idea to execute them when some
aspect of the environment changes, for example
when a new version of a database management
system is introduced or a new version of a source
code compiler is used.
71
Criteria Re-testing Regression Testing
The process of re-executing selected test
The process of executing test cases that
cases to ensure that the software still
Definition failed in previous test cycles to verify if
functions correctly after any new changes
the issues have been fixed.
have been made.
To ensure that the software still works
Focuses on executing test cases related
Purpose correctly and have not been negatively
to fixed defects or failures.
impacted by the changes.
Uses an environment that closely
Uses the same environment as the resembles the production environment,
Test Type
previous test cycle. including hardware, software, and network
configurations.
73
Lifecycle