0% found this document useful (0 votes)
121 views26 pages

Dynamic Testing: Black Box Testing Techniques

Dynamic Testing: Black Box Testing Techniques document describes various black box testing techniques including boundary value analysis, equivalence class testing, state table based testing, decision table based testing, and cause-effect graphing based testing. Examples are provided for how to use each technique to generate test cases for programs with different inputs and conditions.

Uploaded by

Vinu Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views26 pages

Dynamic Testing: Black Box Testing Techniques

Dynamic Testing: Black Box Testing Techniques document describes various black box testing techniques including boundary value analysis, equivalence class testing, state table based testing, decision table based testing, and cause-effect graphing based testing. Examples are provided for how to use each technique to generate test cases for programs with different inputs and conditions.

Uploaded by

Vinu Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Dynamic Testing: Black Box

Testing Techniques

1
Black Box Testing
Evolution of Software Testing

2
Black Box Testing
Evolution of Software Testing
• To test the modules independently.

• To test the functional validity of the software

• Interface errors are detected.

• To test the system behavior and check its performance.

• To test the maximum load or stress on the system.

• Customer accepts the system within defined acceptable limits.

3
Boundary Value Analysis (BVA)

4
Boundary Value Analysis (BVA)

• Boundary Value Checking (BVC)

• Robustness Testing

• Worst Case Testing

5
Boundary Value Checking

• Test cases are designed by holding one variable at its extreme


value and other variables at their nominal values in the input
domain. The variable at its extreme value can be selected at:

– Minimum value (Min)


– Value just above the minimum value (Min+ )
– Maximum value (Max)
– Value just below the maximum value (Max-)

6
Boundary Value Checking

• Anom, Bmin
• Anom, Bmin+
• Anom, Bmax
• Anom, Bmax-
• Amin, Bnom
• Amin+, Bnom
• Amax, Bnom
• Amax-, Bnom
• Anom, Bnom

• 4n+1 test cases can be designed with boundary value checking


method.

7
Robustness Testing Method

A value just greater than the Maximum value (Max+)


A value just less than Minimum value (Min-)
• When test cases are designed considering above points in
addition to BVC, it is called Robustness testing.

• Amax+, Bnom
• Amin-, Bnom
• Anom, Bmax+
• Anom, Bmin-

• It can be generalized that for n input variables in a module, 6n+1
test cases are designed with Robustness testing.

8
Software Testing
Worst Case Myths
Testing Method

• When more than one variable are in extreme values, i.e. when more
than one variable are on the boundary. It is called Worst case
testing method.

• It can be generalized that for n input variables in a module, 5 n test


cases are designed with worst case testing.

9
Example

• A program reads an integer number within the range [1,100] and


determines whether the number is a prime number or not. Design all
test cases for this program using BVC, Robust testing and worst-
case testing methods.

• 1) Test cases using BVC

10
Example

• Test Cases Using Robust Testing

11
Equivalence Class Testing

12
Example

• A program reads three numbers A, B and C with range [1,50] and


prints I1 = {<A,B,C>
largest : 1Design
number. ≤ A all test cases for this program using
equivalence≤class
50} testing technique.
I2 = {<A,B,C> : 1 ≤ B
≤ 50}
I3 = {<A,B,C> : 1 ≤ C
≤ 50}
I4 = {<A,B,C> : A < 1}
I5 = {<A,B,C> : A >
50}
I6 = {<A,B,C> : B < 1}
I7 = {<A,B,C> : B >
50}
I8 = {<A,B,C> : C < 1}
I9 = {<A,B,C> : C >
50} 13
Example

• I1 = {<A,B,C> : A > B, A > C}


• I2 = {<A,B,C> : B > A, B > C}
• I3 = {<A,B,C> : C > A, C > B}
• I4 = {<A,B,C> : A = B, A ≠ C}
• I5 = {<A,B,C> : B = C, A ≠ B}
• I6 = {<A,B,C> : A = C, C ≠ B }
• I7 = {<A,B,C> : A = B = C}

14
State Table Based Testing

Finite State Machine (FSM)

State Transition Diagrams or State Graph

15
State Table Based Testing

• State Table

16
State Table Based Testing

17
Decision Table Based Testing

18
Decision Table Based Testing

Example
• A program calculates the total salary of an employee with the conditions that
if the working hours are less than or equal to 48, then give normal salary.
The hours over 48 on normal working days are calculated at the rate of 1.25
of the salary. However, on holidays or Sundays, the hours are calculated at
the rate of 2.00 times of the salary. Design the test cases using decision
table testing.

19
Decision Table Based Testing

20
Cause-Effect Graphing based Testing

Basic Notations for Cause-Effect Graph

21
Cause-Effect Graphing based Testing

Example
• A program has been designed for the determination of nature of
roots of a quadratic equation. Quadratic equation takes three input
values from the range [0,100]. Design all test cases using Cause-
Effect graphing technique.

22
Cause-Effect Graphing based Testing

• C1: a ≠ 0
• C2: b = 0
• C3: c = 0
• C4: D > 0 where D is b2 – 4 * a * c
• C5: D < 0
• C6: D = 0
• C7: a = b = c
• C8: a = c = b/2
• E1: Not a quadratic equation
• E2: Real Roots
• E3: Imaginary Roots
• E4: Equal Roots

23
Cause-Effect Graphing based Testing

24
Cause-Effect Graphing Based Testing

25
Error Guessing

• Error guessing is the method used when all other methods fail or it
is the method for some special cases which need to be tested.

• It means error or bug can be guessed which do not fit in any of the
earlier defined situations. So test cases are generated for these
special cases.

26

You might also like