E
dit
A
ttach
P
rintable
r30 - 18 Sep 2009 - 16:07:16 -
WikiAdmin
You are here:
SETEC Wiki
>
Knowledge Web
>
SoftwareEngineeringCategory
>
AboutSoftwareTesting
>
BoundaryValueTesting
Boundary Valeu Testing
Boundary Value Analysis : BVA
Function F with 2 Variables : x1 and x2 When F si implemented as a program, x1 and x2 will have some boundaries :
a = <x1 =<b
c = <x2 =<d
Legitimate input is any point within the shaded area BVA focuses on the boundary of the input space to identify test cases
Edit
Traingle : boundary Value Analysis Test Cases
Edit
Generalizing Boundary Vale Analysis
BVA is Generalized in 2 ways :
by number of variables
a program is like a functio of n variables
one variable with min. min+, nom, max-, max, and the rest with nominal values
BVA yields 4n+1 test cases
by kinds of ranges
depend on the nature of variables
month--> can be encoded: Jan-1, Feb-2 (min-->Jan, min+-->Feb)
monthe cand be an enumerated type (for language supporting user-defined type)
a variable can be discrete bounded values
create bounded valued when no explicit bounds present
Boolean and Logical Variables present a problem for BVA
Edit
Limitations of BVA
BVA works well with several independent variables that represent bounded physical quantities
some variables are dependent
month, year in
NextDate
?
BVA does not concern
nature of the function
semantic meaning of the variables
Edit
Rubustness Testing
is an extension of BVA
includes min-, and max+ in BVA
there is a problem for expected outputs
what happens when a physical quantity exceeds its maximumM
Even strongly type implicit check for bounded values but we still need to perform explicit range checking and use exception handling to deal with robust values.
Edit
Robustness Test Cases (A Function with 2 Variables)
Edit
Worst-Case Testing
Reject single fault assumption
what happens when one variable has an extreme values
Worst-Case test cases come from cartesian product of five-element set
BVA test cases are a proper subset of worst-case test cases
yield 5n test cases
Robust worst-case testing
involves the cartesian product of seven-element set
Edit
Worst-Case Test Cases (A Function with 2 Variables)
Edit
Robust Worst-Case Test Cases (A Function with 2 Variables)
Edit
Special Value Testing
or "ad-hoc testing"
occurs when a tester
uses his/her domain knowledge
experience with similar programs
uses information about "soft spots" to devise test cases
no guidance, just "best engineering judgement"
depends on abilities of testers
examples : test Feb 28, Feb 29, and Leap Years for
NextDate
?
Edit
Test Cases for the Commission Problem
Look at BVA of output range
find input variable combinations that stress the boundary values $100, $1000, $1800, and $7,800
Edit
Random Testing
rather than choosing min, min-, nom, max-, max, use a random number generator to pick test case values
how many random test cases are sufficient?
Test cases are generated until at least one of each output occurs
Edit
Guidelines for BVA Testing
Test Methods base on input domain of a program
input variables are independent
unsatisfactory test cases can be generated (Feb 31, 1912)
2 distinctions :
normal VS robust values
single fault VS multiple fault assumption
each testing method mentioned can be applied to output range
domain analysis can be used for internal variables (loop counter, index, pointers)
Edit
Equivalence Class Testing
Equivalence Classes
avoid redundancy
form a partition of a set, where partition refers to a collection of mutually disjoint subsets (the union is the entire set)
2 implications of testing :
the entire set provide completeness
disjointendess ensures a form of redundancy
equivalence class testing :
use one element from each equivalence class
Edit
Weak Normal Equivalence Class Testing
Use one variable from each equivalence class (interval) in a test case
is based on single fault assumption
Edit
Strong Normal Equivalence Class Testing
is based on multipel fault assumption
test each element of the Cartesian product of the equivalence classes
the Cartesian product guarantees :
cover all equivanlence classes
cover each possible combination of inputs
Edit
Weak Robust Equivalence Class Testing
Robust - consider invalid values
Weak - single fault assumption
For valid inputs
use one value from each valid class
For invalid inputs
ue one invalid value and the remaining values will be all valid
Problem - specification does not define what the expected result should be for the invalid values
Edit
Strong Robust Equivalence Class Testing
Robust - consider invalid values
Strong - multiple fault assumption
Test cases are from each element of the Cartesian product of all the equivalence classes
Edit
Equivalence Class Test Cases : The Triangle Problem
Use output equivalence class
4 possible outputs : Equilateral, Isosceles, Scalene, and Not ATriangle
4 output equivalence class :
R1 ={<a,b,c> : the triangle with sides a, b, and c is equilateral}
R2 ={<a,b,c> : the triangle with sides a, b, and c is isosceles}
R3 ={<a,b,c> : the triangle with sides a, b, and c is scalene}
R4 ={<a,b,c> : the triangle with sides a, b, and c do not form a triangle}
Edit
Weak Normal Equivalence Class Test Cases : The Triangle Problem
Edit
Weak Robust Equivalence Class Test Cases : The Triangle Problem
Edit
Strong Robust Equivalence Class Test Cases : The Triangle Problem
Edit
Input Equivalence Classes : The Triangle Problem
Edit
Weak and Strong Normal Test Cases : The
NextDate
?
Problem
Edit
Weak Robust Test Cases : The
NextDate
?
Problem
Edit
Strong Robust Test Cases : The
NextDate
?
Problem
Edit
Another Set of Input Equivalence Classes : The
NextDate
?
Problem
Edit
Input Equivalence Class : The Commission Problem
Edit
Strong Robust Test Cases : The Commission Problem
Edit
Output Equivalence Classes and Test Cases : The Commission Problem
Edit
E
dit
|
A
ttach
|
P
rintable
|
R
aw View
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
: r30
<
r29
<
r28
<
r27
<
r26
|
M
ore topic actions
Knowledge
Log In
or
Register
Reset Password
Knowledge Web
Create New Topic
Topic List
Search
Changes
Notifications
Statistics
Rss
,
Atom
External Webs
Knowledge
Products
Pub
Internal Webs
Management
Projects
CMMI
Kampong School
Main
TWiki
Trash
Reset Password
Copyright ©2012 by National Electronics and Computer Technology Center, NECTEC.
Ideas, requests, problems regarding SETEC Wiki?
Send feedback