1. Fundamentals of testing Flashcards
1 Describe, with examples, the way in which a defect in software can cause harm to a person, to the environment or to a company. (K2) 2 Distinguish between the root cause of a defect and its effects. (K2) 3 Give reasons why testing is necessary by giving examples. (K2) 4 Describe why testing is part of quality assurance and give examples of how testing contributes to higher quality. (K2) 5 Recall the terms 'mistake', 'defect', 'fault', 'failure' and the correspon ding terms 'e
What is testing? (simple)
when we are testing something we are checking whether it is OK
Why testing is needed?
Testing is necessary because we all make mis-
takes. Some of those mistakes are unimportant, but some of them are expensive
or dangerous.
What is “testing is context dependent” principle?
Testing is done differently in different contexts. For example, safety-critical software is
tested differently from an e-commerce site.
What is risk?
A risk is something that has not hap-pened yet and it may never happen; it is a potential problem. When we discuss risks, we need to consider how likely it is that
the problem would occur and the impact if it happens.
What is likelihood and impact of risk
For example, whenever
we cross the road, there is some risk that we’ll be injured by a car. The likeli-
hood depends on factors such as how much traffic is on the road, whether there
is a safe crossing place, how well we can see, and how fast we can cross. The
impact depends on how fast the car is going, whether we are wearing protective
gear, our age and our health. The risk for a particular person can be worked out
and therefore the best road-crossing strategy.
What is error or mistake?
If someone makes an error or mistake in using the software, this may lead
directly to a problem - the software is used incorrectly and so does not behave
as we expected.
What is deffect (bug/fault)?
people also design and build the software and they
can make mistakes during the design and build. These mistakes mean that there
are flaws in the software itself. These are called defects or sometimes bugs or faults.
What is a failure?
When the software code has been built, it is executed and then any defects may
cause the system to fail to do what it should do (or do something it shouldn’t),
causing a failure. Not all defects result in failures; some stay dormant in the code
and we may never notice them.
What failures and defects may arise from?
• errors in the specification, design and implementation of the software and
system;
• errors in use of the system;
• environmental conditions;
• intentional damage;
• potential consequences of earlier errors, intentional damage, defects and
failures
When do defects arise?
stages: requirements design build product work
What is a role of testing in software development, maintenance and
operations?
Rigorous
testing is necessary during development and maintenance to identify defects, in
order to reduce failures in the operational environment and increase the quality
of the operational system.
In which terms testing can measure quality of software?
In terms of number of
defects found, the tests run, and the system covered by the tests.
Quality of what attributes of software can be tested?
We can do this
for both the functional attributes of the software (for example, printing a report
correctly) and for the non-functional software requirements and characteristics
(for example, printing a report quickly enough).
What is a specification validation and verification?
validation (‘is
this the right specification?’) and verification (‘is the system correct to spec-
ification?’).
What is root cause analysis?
When we detect failures, we might try to track them back to their root cause,
the real reason that they happened.
What is “exhaustive testing is impossible” principle?
Testing everything (all combinations of inputs and preconditions) is not feasible except for trivial cases. Instead of exhaustive testing, we use risks and priorities to focus testing efforts.
ISTQB definition of software
testing as a process
• Process - Testing is a process rather than a single activity - there are a series
of activities involved
• All life cycle activities - testing as a process that takes
place throughout the software development life cycle.
• Both static and dynamic
• Planning - activities take place before and after test execution. We need to
manage the testing; for example, we plan what we want to do; we control the
test activities; we report on testing progress and the status of the software
under test; and we finalize or close testing when a phase completes.
• Preparation - We need to choose what testing we’ll do, by selecting test con
ditions and designing test cases.
• Evaluation - As well as executing the tests, we must check the results and
evaluate the software under test and the completion criteria, which help us
decide whether we have finished testing and whether the software product
has passed the tests.
• Software products and related work products - we don’t just test code. We test
the requirements and design specifications, and we test related documents
such as operation, user and training material.
What is test basis?
the thought process of designing tests early in the life cycle can help to prevent defects from being introduced into code. We sometimes refer to this as ‘verifying the test basis via the test design’. The test basis includes documents such as the requirements and design specifications.
ISTQB definition of software
testing regarding objectives of testing
• Determine that (software products) satisfy specified requirements.
• Demonstrate that (software products) are fit for purpose.
• Detect defects - We most often think of software testing as a means of
detecting faults or defects that in operational use will cause failures.
What is “Early testing”principle?
Testing activities should start as early as possible in the software or system development life
cycle and should be focused on defined objectives.
What testing objectives can be?
- finding defects
- gaining confidence in and providing information about the level of quality;
- preventing defects.
What is a “development testing” and its main objective?
Once the code is written, programmers
and testers often run a set of tests so that they can identify and fix defects in
the software. In this ‘development testing’ (which includes component, inte-
gration and system testing), the main objective may be to cause as many fail-
ures as possible so that defects in the software are identified and can be fixed.
What is regression testing?
It is testing to ensure
nothing has changed that should not have changed.
Testing of a previously tested program following modification to ensure that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. It is performed when the software or its environment is changed.
What is “defect clustering” testing principle?
A small number of modules contain most of the defects discovered during pre-release
testing or show the most operational failures.
Why defects tend to cluster?
This can happen because an area of the code is particularly
complex and tricky, or because changing software and other products tends
to cause knock-on defects.
What is “pesticide paradox” testing principle?
If the same tests are repeated over and over again, eventually the same set of test cases will no longer find any new bugs. To overcome this ‘pesticide paradox’, the test cases need to be regularly reviewed and revised, and new and different tests need to be written to exercise
different parts of the software or system to potentially find more defects.
What is debugging?
When a test finds a defect that must be fixed, a programmer must do some work
to locate the defect in the code and make the fix. In this process a programmer will examine the code for the immediate cause of the
problem, repair the code and check that the code now executes as expected.
What is the difference beteen testing and debugging
Developers
may test their own fixes, in which case the very tight cycle of identifying faults, debugging, and retesting is often loosely referred to as debugging. However,
often following the debugging cycle the fixed code is tested independently both
to retest the fix itself and to apply regression testing to the surrounding
unchanged software.
What is “Testing shows presence of defects “ principle?
Testing can show that defects are present, but cannot prove that there are no defects.
Testing reduces the probability of undiscovered defects remaining in the software but, even if
no defects are found, it is not a proof of correctness.
What is “Absence of errors fallacy” testing principle?
Finding and fixing defects does not help if the system built is unusable and does not fulfill the
users’ needs and expectations.