Testing
Testing
Not all software defects are errors. One common source of expensiye
caused by coding
derects is caused by requirement gaps, e.g, unrecognised requirements, that result in errors
ot omission by the programme designer. A common source of requirenments gaps is non-
Functional requirements such as testability, scalability, maintainability, usability,performance
and security.
example, defects
273
defect can turn into
failure when the
a in dead code will never
failures. A
hesechanges in nuironment include the environment is changed. result
data or interactin with
software being run on new hardware Examples of
inns
source a
different software. A
wide range
in a
of failure
symptoms. single defect platform, may result
Compatibility
Static vs
Dynamic Testing
The are many approaches to software testing. Reviews, walkthroughs, or inspections
considered as static testing, whereas actually executing programmed code with a given
t Of fest cases is referred to as dynamic testing. Static testing can be (and unfortunately in
itself is used
f Oten is) omitted. Dynamic testing takes place when the programme
the first time (which is generally considered the beginning of the testing stage). Dynamic
testing
Sectdy begin before the programme is 100 complete in order
per cent particular
to test
this are either using
Strihe code (modules or discrete functions). Typical techniques for
stubs/drivers or
Program or execution from a debugger environment.
For example, Spreadsheet
extent interactively (on the fly), with
programmes
results dare,
esults are,
display
Payed
by their very nature, tested to a large
immediately after each calculation or text manipulation.
audithetorss twkakeatea
Though In SQA,
nt. They exami
process.
(SQA) examine ar
quality
assurance
engineering process
on
reduce the
itself to
defect rate.
amount
up the
sot wate
delivered sotwe
deli ed sotwate
the so-called
detect rate" depends on the nat. of
the
an airplanothesoft
softwa
"acceptable
What constitutes
an
Testing Methods
Approach of Boxes
Software testing methods are traditionally divided into black-box testing and whiteho
to describe the point of view that a test engineer takes
testing. These two approaches are used
when designing test cases.
Black-box Testing
Black-box testing treats the software as a "black box"-without any knowledge of intermal
implementation. Black-box testing methods include: equivalence partitioning, boundary value
analysis, all-pairs testing, fuzz testing, model-based testing, traceability matrix, exploratory
testing and specification-based testing
1. Specification-based Testing: Specification-based testing aims tò test the functionality of
software according to the applicable requirements. Thus, the tester inputs data nt
and only sees the output from, the test object. This level of testing usuauy
thorough test cases to be provided to the tester, who then can simply veniy u e
a given input, the output value (or behaviour), either "is" or "is not' thesanie
expected value specified in the test case. Specification-based testing is necessa
it is insuficient to
guard against
certain risks.
2. Advantages and Disadvantages: The black box tester has no "bonds" with the code, and
ciple, "Ask
a
tester's perception is very
simple: a code must have bugs. Using do not. But
Bu
the
and you shall receive," black box testers find
bugs where
hand, black-box testing has been said to be "likeprograi
labyrinth
on the other dark
a walk in a tesi
beingtested
without a e heing
flashlight," because the tester doesn't know how the s
fienareTèstinp
was
chually
tually constructed.ru1cted. As a
result,
check there are
manytest
to
something
ing
of the bacet
parts of
that Could situations when
could have
have been (1) a
275
tester writes
or (2) some back-end are not tested by
an black-box
testing has the tested at all. only one test
tes case,
T h e r e f o r e ,
and th
advantage of "an unaffiliated
heretodisadvantage of "blind exploring"
d the other. opinion," on on the one
tite-bor Testing
ite-box testing
White-bo
is when the tester has access to the
code that implement these. internal data
the structures and
ndluding
algorithms
White-box Testing
Types of
The
following types of white-box testing exist:
D testing (application programming interface) Testing of
the application using
-
level. Manipulating
plurposes ofi o but testing
test cases, because
at the user,
input
or black-box
the and output
ata and f o 5 e qualify as grey box,
output do not under test. This distinction
Clearly outside o
s paricu rting
the "black-box" that we are
calling the system
between two
between
modules of code
code
Cularlyi testing for test. However,
portant when conducting integration interfaces are exposed be able
itw odiff
two different developers, where only the
user would
not normally
yýing data
a
evelopers,
as grey
box, as the
repository does qualify
Sofasotware Engineh
Grey box testing
Engmearn
under
u nder test.
test.
h e system
system
276 tside of
of the
t
be
boundary values or error so indiud
messages.
outside
instance,
for instance,
data
change
the
determine,
1e. for
to to
engineering
modules
are
developed
in separate
main prie.
Regression 1Testing
change in functionality
or
either for a defece
efects, aregress
After modifying
software,
on the software toon
modified softwaremodified
to ensure that the modsion
passing tests
test
re-runs
have not
previously
unintentionally
previous functional
caused a regression
st levels.
the above test
ot ressi
regressionttests are often ang
levels. These regression
ifcatons
at or all ot ften automated
be performed any are known as sanity teci.
Regression regressionson
whenever software functionality, that was previously working
Such regression occur
occur as an unintended conTedy,
corecty,
as intended. 1ypically, regressions
stops working of the software collid of
programme changes, when the newly developed part
previously existing. Common methods of regression testing include rerunning previondrrun
tests and checking whether previously fixed faults have re-emerged. The depth of testi
depends on the phase in the release process and the risk of the added features. They can eith
be complete, for changes added late in the release or deemed to be risky, to very shallow,
consisting of positive tests on each feature, if the changes are early in the release or deemed
to be of low risk.
Aceptance Testing
Acceptance testing can mean one of two things:
1. A smoke test is used as an acceptance test prior to introducing a new build to me
main testing process,
i.e. before integration or
regression.
ACceptance testing performed by the customer, often in their lab environment ontheir
own HW, is known as user
acceptance testing (UAT).
NonFunctional Softrware
Testing
Special methods exist to test
non-functional aspects of software
Performance testing checks to see if quantities
fdata
the
or users. This is generally referred to assoftware can handle large of n t i v i t y o fn o n
works as a system.
ntegOnenttatedta
the software
additionally done
. Alpha testing is simulated or actual operational testing by potential
or an independent test team at the developers' site.
Alpha testing isusers,
ofte
customers
softnopwosaryed
for of-the-shelf software as a form of internal acceptance esting, before the
goes to beta testing.
.Beta testing comes after alpha testing. versions of the software, known
Lown as beta
versions, are released to a limited audience outside of the
software is released to groups of people SO that further testing can ensure team programming
has few faults or bugs. Sometimes, beta versions are made available to
the nrod
the open
to increase the feedback field to a maximal number of future users. public
Finally, acceptance testing can be conducted by the end-user, customer, or client h
validate whether or not to accept the product. Acceptance
hand-off
testing may be performed as part
process between any two phases of development.
Finding Faults
Finding Faults Early: It is commonly believed that the earlier a defect is found the cheaper
it is to fix it. The
it was found. For
following table shows the cost of
fixing the defect depending on the stag
example, if a problem in the
it would cost 10-100 times requirements is found only post-release, then
more to fix than if it had
review. already been found by the requiremenis
Time Detected
elease
Kequirements Architecture Construction System Test Post-
Time Introduction Requirements
Architecture 1x 3x 5-10x 10x 10-100x
25-100x
1x 10x 15x
Construction 1x 10x
10-25x
Testing Tools
Programme testing and fault detection can be aided significantly by testing
tools
and
d
Automated functional GUI
fur testing tools are used to repeat
the GUI system-level tests through
Danchmarks, allowing rurn-time pertormance comparisons to be made
Derformance analysis (or profiling tools) that can help to
resource usage highlight hot spots and
est Plan: A test specification is called a test plan. The developers are well aware what
n s will be executed and this information is made available to management and the
add he idea is makes them more cautious when developing their code or making8
ditional nanges.
chang Some companies have a higher-level document calleda test strategy
Traced
tomeiliy Matrix: A traceability matrix is a table that correlates requirements or design
docum to test document It is used to change tests when the source documents are
anged, or to
verify that the test results are correct.
Test Case:. references
rom a ase normally consists of a unique identifier, requirement
1o folowlesign preconditions, events, a series of steps (also
known as actions)
ollow, specification,
an input input, output, defined test case is
Output, expected result, and actual result. Clinically
a
an 'for condition x your deriveda
Tesult is y'and
,
an
expected
pected result.
resu This can be as pragmatic as
detail the input scenario and what
Smight whereas ds other test cases described in moreof (but often steps are contained
steps
testexpected. It be a series
occasionally
eparate test
Parate prc
procedure
can
that canbe exercised against multiple
test cases, as a matter of
ected outcom The optional warfielde Engmeerimg
outo
or expected
280 expected
resu
but
with
one
of execution
number, related quirement(s), depth, ds are
o r d e r of
executior
economy) order
or
the test is
automatahla
wordated.Lshodt
a trq
author,
and
contain
also ult. These
result. I h e s e steps can be stored
test cases may
for the
actual
renoee Stored in a case
place ther common reposit
contain a or
other In aa da
also
document,
database,
spreadsheet,
test results,
who generated database
the results.
results, and proces
also be
able to see past
orate those
those results. These Dast
results. 'These past results would W
may
configuration
was
used to generate
table.
usually st e
in a separate combination of a test case, test
caco
is the
Test Script:
The test script
the product of work
createdCedure.
and procedure, a
was
derived from
comhiomated test
the term automated,
bot1erh ess
manual automated, or or aa
Initially
Today, test scripts can be combination of
test tools. of test
ferm for a collection cases io
Test Suite: The
most common a
test suite.
more detailed
goals for each
instructions or Ihe
suiteoften also contains
where the tester identifies the system conf
on of tes te
contains a section
It definitely also contain prerequisite states or sfene
of test cases may and
A
testing. group
of the tollowing
tests. descriptns
sets of values or data are used to tos
Test Data: In most cases, multiple test the same
feature. All the test values and changeable ens
functionality of a particular
components are collected in separate files and stored as test data. It is also useful to mental
ovide
with the product or a project.
this data to the client and
Test Harness: The software, tools, samples of data input and output, and configuai
test harness.
guraions
are all referred to collectively as a
Reporting:
Once testing is
completed, testers generated is i s readyforr
ready o
l e t r i c s
ease
software te
Test Result team
Analysis: Or Defect
along with the client, in order to Analysis, is
e byy
the b e treated, fixed,
development
(Le. found
wha decide what defects shoualt with la
aecide dealt with late:
software working properly) or deferred to