Blackbox Testing

1 / 17
About This Presentation
Title:

Blackbox Testing

Description:

U.S. Army Personnel specification for holidays: ... When the non-workday on which the holiday falls is the first non-workday or the ... Define syntax of language ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 18
Provided by: Robert9

less

Transcript and Presenter's Notes

Title: Blackbox Testing


1
Blackbox Testing
  • CS2335
  • Spring 2005

2
Blackbox Testing
  • AKA Specification-Based
  • Uses functional requirements to derive test cases
  • Assumes errors include missing or improperly
    implemented functions
  • No knowledge of implementation details

3
Motivation
Arianne 5 Rocket Improper Reuse of A3 code
Failure to test Spec
4
Equivalence Partitioning
  • Divide input domain into classes of data
  • Single test case can cover all equivalent data
    elements
  • Assumption if any one case in a partition
    succeeds all would succeed and vice-versa
  • Partitions consist of valid and invalid sets of
    data

5
Basic Rules
  • Range of values one valid, two invalid
    partitions
  • Specific value one valid, two invalid partitions
  • Set member one valid and one invalid partition
  • Boolean value one valid and one invalid class
  • Other elements use common sense and analysis

6
Invoice Specification
Invoices are calculated using the following
algorithm based on quantity of x and y Item X
sells for 5 and Item Y sells for 10 Invoice
Total gt200 get 5 discount Invoice
Total gt1000 get 10 discount Invoices
that order more than 30 X items
get a 5 discount
7
Invoice Equivalence Partitions
X Classes Y Classes Invoice Total Classes
lt0, gt0
8
Darwin Species File Partitions
Null, Correct, Long, Short
Correct, Incorrect
Exists, Nonexistent
9
Is Spec testing really hard?
U.S. Army Personnel specification for
holidays Executive Order 10358 provided in the
case of an employee whose work week varied from
the normal Monday through Friday work week that
Labor Day and Thanksgiving Day each were to be
observed on the next succeeding workday when the
holiday fell on a day outside the employees
regular basic work week. Now, when Labor Day,
Thanksgiving Day or any Monday holiday is outside
the employees basic workweek, the immediately
preceding workday will be his holiday when the
non-workday on which the holiday falls is the
second non-workday or the non-workday designated
as the employees day off in lieu of Saturday.
When the non-workday on which the holiday falls
is the first non-workday or the non-workday
designated as the employees day off in lieu of
Sunday, the holiday observance is moved to the
next succeeding workday.
10
Border/Boundary Conditions
Most errors happen at the boundary, so select
test cases that test at and on each side of the
boundary.
X Boundaries
30, 31, -1, 0
Y Boundaries
-1, 0
Invoice Total Boundaries
200, 199, 999,1000
If there are specification limits on data sizes
be sure to test at the limits i.e. program must
store up to 100 numbers, then test at 100. What
happens at 101???
11
Syntax Testing
  • Identify language or format (may be hidden)
  • Define syntax of language
  • Cover set of input strings (valid statements) by
    covering the syntax graph

12
Other composite techniques
  • State-Based
  • Spec is represented as a state machine
  • Select test cases to cover machine
  • Condition (Logic-Based)
  • Complex dependencies
  • Generate decision table for valid combinations
  • Comparison Testing

13
Comparison Test
14
Example Decision Table
  • Compute from input sides a, b, c whether a
    triangle is equilateral, isoceles, scalene, or
    not a triangle.
  • altbc, bltac, cltab
  • ab, bc, ac
  • Any two sides equal length

15
Decision Table Tests
16
Testing Login??
Usernames are a-zA-Z0-9 and 10 chars or
less Passwords are 6-8 chars, must be printable
ASCII
17
Next Time Other Testing
GUI
Regression
Validation
Integration
Class
Write a Comment
User Comments (0)