week-4-5
week-4-5
1 Testing technique
2 Black Box Testing
Black box testing techniques
Random testing (RT)
Equivalence class testing(EC)
Boundary values testing (BV)
Decision tables (DT)
State-transition Testing
Use Case Based Testing
3 White Box
4 Experience Based
5 Choosing Design Techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 1 / 76
Testing technique
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 2 / 76
Testing technique
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 4 / 76
Black Box Testing
Advantages
Focus on the domain
No need for the code
early test design
Catches logic defects
Applicable at all granularity levels
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 5 / 76
Black Box Testing
Analyze requirements
Choose valid and invalid inputs
Determine expected outputs for those inputs
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 6 / 76
Black Box Testing Black box testing techniques
Random Testing
Equivalence class testing (EC)
Boundary values testing (BV)
Decision tables
State-transition diagrams
Use case testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 7 / 76
Black Box Testing Black box testing techniques
Random Testing
Advantage
Uncovers Unexpected Defects
Random Testing explores inputs that structured techniques might
overlook, such as unusual or extreme values.
Example (Req 1.A): Inputting Age = ”123456789” might reveal a
buffer overflow or crash not caught by EC or BV
Quick to Implement
Requires minimal planning—no need to partition inputs or boundaries.
Example: For the HR app’s ”Create Employee” form, a tester can
quickly enter random values like -10, ”xyz,” or 999 without designing
test cases.
Low Resource Overhead
Needs no deep requirement analysis or code knowledge
Example: A junior tester can perform random testing on the HR form
without studying requirements
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 8 / 76
Black Box Testing Black box testing techniques
Random Testing
Limitation
No coverage guarantee.
Random selection may miss critical areas like boundaries or specific
requirement conditions.
Example (Req 1.A): Random inputs might include 25, 100, -5, but
skip 19 or 20, failing to verify the exact range edges.
Inefficient for Specific Requirements:
Doesn’t target precise validation rules, making it less effective for
verifying detailed specs.
Example: Req 1.A’s ”whole numbers only” needs targeted tests (e.g.,
20.5), which random testing might not hit.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 9 / 76
Black Box Testing Black box testing techniques
Random Testing
Limitation
High Noise in Results:
Produces many irrelevant or redundant tests, requiring effort to
analyze.
Example: Inputs like Age = ”hello” are obvious failures, wasting time
if overused.
Limited Depth:
Doesn’t explore logical combinations or workflows, focusing only on
single inputs.
Example: Random testing won’t verify complex HR rules (e.g., Age
20–50 + Full-Time → Active), unlike Decision Table Testing.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 10 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 11 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 12 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 13 / 76
Black Box Testing Black box testing techniques
Example 1
One input variable
Age field can take the values in the range of 20 to 50
Example 1
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 15 / 76
Black Box Testing Black box testing techniques
Example 1
Partition value
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 16 / 76
Black Box Testing Black box testing techniques
Example 1
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 17 / 76
Black Box Testing Black box testing techniques
Example 1
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 18 / 76
Black Box Testing Black box testing techniques
Example 1
Test case design
Identify variables: 1 input variable, age
input domain: [1..99]
Divide the input domain in equivalence
classes: 4 (there are valid classes)
Create one test case for each equivalence class (test by contract, only
valid inputs)
Test Cases:
Age = 35 (valid).
Age = 19 (invalid).
Age = 51 (invalid).
Age = 20.5 (invalid).
Age = ”abc” (invalid).
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 19 / 76
Black Box Testing Black box testing techniques
Example 2: Password
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 20 / 76
Black Box Testing Black box testing techniques
Example 2: Password
Test Cases:
1 AB36P (1,4,6)
2 (2)
3 VERYLONG (3)
4 1XY12 (5)
5 A17#%X (7)
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 21 / 76
Black Box Testing Black box testing techniques
Equivalence Partitioning
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 22 / 76
Black Box Testing Black box testing techniques
Equivalence Partitioning
When invalid equivalence partitions are used in test cases, they should
be tested individually, i.e., not combined with other invalid
equivalence partitions, to ensure that failures are not masked. Failures
can be masked when several failures occur at the same time but only
one is visible, causing the other failures to undetected.
Partition can be identified for any data element related to the test
object, including inputs, outputs, internal values, time-related values
(e.g before or after an event ) and for interface parameters(e.g
integrated components being tested during integration testing)
Any partition may be divided into sub-partitions if required
Equivalent partitioning is applicable at all test levels of testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 23 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 24 / 76
Black Box Testing Black box testing techniques
Would the value of the country change the way the software behaves
?
If yes, then every value should be in a separate partition
If no, then all the values can reside in a single partition
Registration Example
Partition 1 Title (Mr,Miss,Mrs. etc)
Partition 2 Country (Egypt, Canada, US, India)
Shipping Example
Partition 1 Title (Mr,Miss,Mrs. etc)
Partition 2 (Egypt)
Partition 2 (Canada)
...
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 25 / 76
Black Box Testing Black box testing techniques
Age : (< 20), (20 >= and <= 50), (> 50)
Country : (Egypt), (Canada), (USA), (India)
3partitions + 4partitions = 7Partitions
Test cases:
TC1:(10,Egypt)
TC2: (40,Canda)
TC3:(60,USA)
TC4:(45,India)
In test automation:
Parametrize partitions into data-driven test cases
Integrate with Postman or REST-assured for API testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 26 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 27 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 28 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 29 / 76
Black Box Testing Black box testing techniques
Multiple Variables:
When multiple inputs have ranges (e.g., Age, Salary, Experience),
testing all boundary combinations is exponential.
Example: 3 variables (Age, Salary, Experience) × 6 boundaries each
(19, 20, 21, 49, 50, 51 for Age) = 6³ = 216 combinations.
Problem: Too many tests for practical execution.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 30 / 76
Black Box Testing Black box testing techniques
Robustness
testing
Worst case
testing
Robust worst
case testing
Special value
testing
Random
testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 31 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 32 / 76
Black Box Testing Black box testing techniques
Key Components
Conditions: Input variables or criteria (e.g., Age ≥ 18, Gender = Female).
Actions: Outputs or system responses (e.g., Premium = $500, Deny
Insurance).
Rules: Columns in the table representing unique combinations of condition
outcomes,each mapping to specific actions.
Process
1 Identify conditions from requirements.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 33 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 34 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 35 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 36 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 37 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 38 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 39 / 76
Black Box Testing Black box testing techniques
The technique
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 40 / 76
Black Box Testing Black box testing techniques
State-transition Testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 41 / 76
Black Box Testing Black box testing techniques
State-Transition Components
Key Components
States: Distinct conditions or modes of the system (e.g., ”Idle,”
”Card Inserted” in an ATM).
Events/Inputs: Triggers causing state changes (e.g., ”Insert Card,”
”Enter PIN”).
Transitions: Rules defining how the system moves from one state to
another (e.g., Insert Card: Idle → Card Inserted).
Actions/Outputs: System responses during transitions (e.g.,
”Display PIN Entry Screen”).
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 42 / 76
Black Box Testing Black box testing techniques
State-Transition Process
Process
1 Identify states from requirements or system behavior.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 43 / 76
Black Box Testing Black box testing techniques
State-Transition Example
Example
An ATM system handles user interactions with the following behavior:
States:
S1: Idle: ATM is waiting for a user.
S2: Card Inserted: Card is inserted, awaiting PIN.
S3: Authenticated: PIN is correct, user can select actions.
S4: Card Ejected: Card is returned, session ends.
Events:
E1: Insert Card: User inserts card.
E2: Enter Correct PIN: User inputs valid PIN.
E3: Enter Wrong PIN: User inputs invalid PIN.
E4: Select Transaction: User chooses an action (e.g., withdraw).
E5: Eject Card: ATM returns card (automatic or user-initiated).
E6: Cancel: User cancels operation.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 44 / 76
Black Box Testing Black box testing techniques
State-Transition Rules
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 45 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 46 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 47 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 48 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 49 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 50 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 51 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 52 / 76
Black Box Testing Black box testing techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 53 / 76
Black Box Testing Black box testing techniques
Benefit
User-centric-Based on real user actions and expectations
Functional coverage-Helps ensure system meets its business objectives
Easy communication-Stakeholders understand test cases derived from
real scenarios
Complements other techniques-Pairs well with state transitions,
equivalence classes, etc.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 54 / 76
Black Box Testing Black box testing techniques
Preconditions
User is logged in
Cart contains at least one item
Main Flow:
1 User clicks “Place Order”
Alternative Flows:
1 Invalid payment → show error, stay on payment screen
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 56 / 76
Black Box Testing Black box testing techniques
Test Cases
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 57 / 76
White Box
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 58 / 76
White Box
White Box
White box testing techniques are used to assess the amount of testing
performed by tests derived from black box based techniques, i.e to
calculate coverage
Then we use the white box techniques to help design additional tests
to increase the test coverage
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 59 / 76
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 60 / 76
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 61 / 76
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 62 / 76
White Box
How much would exp=20 and title = JR give use branch coverage ?
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 63 / 76
White Box
To achieve 100% decision coverage. How many test cases would you need
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 64 / 76
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 65 / 76
White Box
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 66 / 76
Experience Based
Experience Based
Test cases are derived from the users and tester’s skill and intution,
and their experience with similar applications and technologies
These techniques can help identify tests that were not easily identified
by other more systematic techniques
These techniques may achieve widely varying degrees of coverage and
effectiveness
Coverage can be difficult to assess and may not be measurable with
these techniques
These techniques are ofent combined with black-box and white box
test techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 67 / 76
Experience Based
Error Guessing
Explorator Testing
Checklist based testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 68 / 76
Experience Based
Error Guessing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 69 / 76
Experience Based
Exploratory Testing
We use the tester’s experience to test the software without going into
the cyle of writing test conditions, test cases, test procedures and so
on. But rather, just sit and try to break the software
During exploratory testing, the tester can incorporate the use of other
black-box, white-box and experince based technqiues.
So theoretically speaking the tester here do test design,test
execution,test loggin and system evaluation all at the same time
concurrently.
The results of the exploratory tests are used to learn more about the
component or system at hand, and to create tests for the areas that
may need more testing
Exploratory testing work products may be created during test
execution, though the exten to which exploratory tests are
documented my vary significantly
Exploratory testing is most useful when there are few or inadequate
specification or significant time pressure on testing.
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 70 / 76
Experience Based
Checklist-based Testing
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 71 / 76
Experience Based
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 72 / 76
Choosing Design Techniques
Regulatory Standards
Customer or contractual requirements
Level of risk
Type of risk
Type of component or system
Test objectives
Documentation available
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 73 / 76
Choosing Design Techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 74 / 76
Choosing Design Techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 75 / 76
Choosing Design Techniques
Wondimagegn D. (AAIT ) Quality Assurance and Software Testing April 23, 2025 76 / 76