Professional Documents
Culture Documents
Principles of Testing
4 Test design
5 Management 6 Tools
techniques
Principles
Contents
What is testing
Why testing is necessary
Testing principles
Fundamental test process
Psychology of testing
Code of Ethics
Testing terminology
… that creates a
fault in the
software ...
huge sums
- Ariane 5 ($7billion)
The Explosion of the Ariane 5 (umn.edu)
- Mariner space probe to Venus ($250m)
Mariner 1 destroyed due to code error, July 22, 1962 – EDN
- American Airlines ($50m)
very little or nothing at all
- minor inconvenience
- no visible or physical detrimental impact
software is not “linear”:
- small input may have very large effect
So why is testing necessary?
contractual requirements
legal requirements
industry-specific requirements
- e.g. pharmaceutical industry (FDA), compiler
standard tests, safety-critical or safety-related such
as railroad switching, air traffic control
It is difficult to determine
how much testing is enough
but it is not impossible
How much testing?
It depends on RISK
- risk of missing important faults
- risk of incurring failure costs
- risk of releasing untested or under-tested software
- risk of losing credibility and market share
- risk of missing a market window
- risk of over-testing, ineffective testing
So little time, so much to test ..
Prioritise tests
so that,
whenever you stop testing,
you have done the best testing
in the time available.
Testing and quality
Contents
What is testing
Why testing is necessary
Testing principles
Fundamental test process
Psychology of testing
Code of Ethics
Seven Testing Principles
Early testing
- Testing activities should start as early as possible in
the software or system development life cycle and
should be focused on defined objectives.
Seven Testing Principles
Defect clustering
- A small number of modules contain most of the
defects discovered during pre-release testing or
show the most operational failures.
Seven Testing Principles
Pesticide paradox
- If the same tests are repeated over and over again,
eventually the same set of test cases will no longer
find any new bugs.
Seven Testing Principles
Absence-of-errors fallacy
- Finding and fixing defects does not help if fallacy
the system built is unusable and does not fulfill the
users' needs and expectations.
Principles
Contents
What is testing
Why testing is necessary
Testing principles
Fundamental test process
Psychology of testing
Code of Ethics
Formal Testing Definition
Process consisting of all life cycle activities
Both static and dynamic
Concerned with planning, preparation and
evaluation of software products and related
work products
To determine that they satisfy specified
requirements
To demonstrate that they are fit for purpose
And to detect defects.
The test process
Test planning
Test monitoring and control
Test analysis
Test design
Test implementation
Test execution
Test completion
Test planning
Define the test objectives
Define the test approach
Decide test techniques to use
Decide what tasks need to do
Formulate test schedule
… (entry and exit criteria)
Notes:
Include the update if necessary
More detail in later chapter
Test monitoring and control
Test monitoring:
- Continuously compare actual progress against the plan to
identify any variances
- Report test status and any necessary deviations
Test control
- Take whatever necessary actions to meet the project
objectives
- Adjust the plan
Notes:
- When things are going very wrong → may be the time to stop
testing or even stop project
- Using exit criteria when monitoring
Test analysis (1)
Analyze test basis
- Test basis: everything we base our test (requirement, design,
risk, interface specification, source code, user expectation…)
Identify types of defects that might occur by evaluating
test basis and test items
- Test item: A part of test object
- Test object: The component or system to be tested
Identify features to be tested
Test analysis (2)
Identify and prioritize test conditions
- Test condition: “what to test” to achieve specific test
objectives
- Test objective: Reason of our testing (evaluate work products
such as requirement or design…, verify specified requirement
is fulfilled, validate test object is completed as expectation,
build confidence in the quality of test object, to prevent
defects, to find failures and defects, to provide sufficient
information to stakeholders, to reduce risks of inadequate
software quality, to comply with contractual or legal)
Capture bi-directional traceability between each test
basis and the associated test conditions
Test design
Design and prioritize test cases
- Test case: set of preconditions, inputs, actions, expected results
and postconditions; developed based on test conditions
Identify necessary test data
- Test data: created/selected data to satisfy preconditions and
inputs to execute test cases
Design test environment
Capture bi-directional traceability between test basis,
test conditions, test cases and test procedures
- Test procedure: sequence of test cases in execution order,
associated actions to setup preconditions and wrap-up
activities postconditions
Test implementation (1)
Develop and prioritize test procedures (and automated
test scripts if need)
Create test suites
- Test suit: set of test cases or test procedures to be executed in a
test cycle
Define test execution schedule
- Test execution schedule: schedule for execution of test suites
within a test cycle
Test implementation (2)
Build test environment and verify the setup corrections
Prepare test data and confirm it is loaded in test
environment
Verify and update bi-directional traceability between
test basis, test conditions, test cases, test procedures
and test suites
Test execution (1)
Record IDs and versions of test items, test objects,
test tools and other testware
- Testware: products produced during the test process for use in
planning, designing, executing, evaluating and reporting
Execute the tests (manually or automatically)
Compare actual results with expected results to look
for anomalies
Analyze the anomalies to establish likely causes.
- Failures may occur due to defects in code or may be false-
positives or may be due to a test defect
Test execution (2)
Report defects based on observed failures.
Log outcome of test execution
- Log info: Anomalies, pass/fail status, IDs/versions of tested
software, test tools, testware
Repeat test activities when action are taken to resolve
the failures
Verify and update bi-directional traceability between
test basis, test conditions, test cases, test procedures
and test results
Test completion
Check whether all defects are closed and record any
unresolved defects
Create test summary report to be communicated to
stakeholders
Finalize and archive testware for later reuse
Handover testware
Analyze lesson learned to determine changes for
future
Use the gathered information to improve test process,
especially test planning
Glossary
Coverage
Test analysis
Test basis
Test case
Test completion
Test condition
Test control
Test data
Test design
Glossary
Test execution
Test execution schedule
Test implementation
Test monitoring
Test oracle
Test planning
Test procedure
Test suite
Testware
Traceability
Principles
Contents
What is testing
Why testing is necessary
Testing principles
Fundamental test process
Psychology of testing
Code of Ethics
Confidence
Confidence
Fault found
Faults found
Time
Low High
Software Quality
You may
be here
Low
A traditional testing approach
A destructive process
Bring bad news (“your baby is ugly”)
Under worst time pressure (at the end)
Need to take a different view, a different
mindset (“What if it isn’t?”, “What could go
wrong?”)
How should fault information be
communicated (to authors and managers?)
Tester’s mindset
Curiosity
Professional pessimism
A critical eye
Attention to detail
Experience
Good communication skills
Levels of independence
Contents
What is testing
Why testing is necessary
Testing principles
Fundamental test process
Psychology of testing
Code of Ethics
Code of Ethics (1)
PUBLIC - Certified software testers shall act
consistently with the public interest.
CLIENT AND EMPLOYER - Certified software testers
shall act in a manner that is in the best interests of
their client and employer, consistent with the public
interest.
PRODUCT - Certified software testers shall ensure
that the deliverables they provide (on the products
and systems they test) meet the highest professional
standards possible.
JUDGMENT - Certified software testers shall maintain
integrity and independence in their professional
judgment.
Code of Ethics (2)
MANAGEMENT - Certified software test managers and leaders
shall subscribe to and promote an ethical approach to the
management of software testing.
PROFESSION - Certified software testers shall advance the
integrity and reputation of the profession consistent with the
public interest.
COLLEAGUES - Certified software testers shall be fair to and
supportive of their colleagues, and promote cooperation with
software developers.
SELF - Certified software testers shall participate in lifelong
learning regarding the practice of their profession and shall
promote an ethical approach to the practice of the profession.
Principles