Академический Документы
Профессиональный Документы
Культура Документы
Outline
Goal of testing Test cases, test suites and test data What is functional system testing? Coverage Functional testing techniques:
Functional analysis Equivalence partitioning Boundary value analysis
2 Black Box Testing
Test cases
The basic component of testing is a Test Case In its most general form: (inputs, expected-result)
inputs include system state, user commands and data values to be processed expected result includes visible/audible interface changes or changes in the system state
Test data
An effective test strategy requires careful acquisition and preparation of test data prior to testing
Testing can suffer if test data is poor
Black box testing test cases and data are constructed based solely on the softwares specification
Search for defects that are variances between the actual operation of the system and the requirements for the system System is treated as a black box
9 Black Box Testing
From practical and economic perspectives, exhaustive testing is usually not possible
Which software pieces should we test? Which test cases should we choose?
10 Black Box Testing
Coverage
Coverage is a measure of how completely a test suite exercises the capabilities of a piece of software
Each line of code should be executed at least once One test case should be constructed from each specified requirement
It is necessary to use testing techniques that narrow down the number of test cases allowing the broadest testing coverage with the least effort
11 Black Box Testing
13
Test results
Passed Failed
Actual results:
Defect diagnosis:
14 Black Box Testing
15
Valid values
[0-9]{0, 9} [a-zA-Z]{0, 10} [a-zA-Z]{0, 10}
17
Violation ID
Hasalongname ad0@am
Single invalid field per test case (3 4 4 + 6 = 54) Importance of use case Resources available Most frequent input Life-critical software Infeasible test cases Randomly ...
Black Box Testing
Choose input boundary values as equivalence classes representatives Choose inputs that invoke output boundary values Examples:
(0, 10] validate using 0, 1, 2, 9, 10, 11 Read up to 5 elements validate reading 0, 1, 4, 5, 6 elements
20 Black Box Testing
21
2.
3.
4.
22
Sunday - Thursday
Visitor Member Student
Friday - Saturday
Visitor Member Student
Admission fee 25 50 10 25 15 20 45 30
Black Box Testing
35 70 50
10 25 15
30 65 45
[60, 120] 35
23
Day
Guest status
Visitor
Member Student
Visitor
Member Student 2, 0, 15
A combo box is used for choosing the day and guest status
Age
[0, 16)
Non-numeric value
14@a
[16, 60)
24
34, 16, 59
100, 60, 120
Black Box Testing
[60, 120]
-1, 121
valid
valid (boundary)
invalid
12
25
Fri
Visitor
Black Box Testing
121
Invalid age