Presentation is loading. Please wait.

Presentation is loading. Please wait.

Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING.

Similar presentations


Presentation on theme: "Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING."— Presentation transcript:

1 Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING

2 Black-box testing An approach to testing where the program is considered as a ‘black-box’ Also called Behavioral Testing The program test cases are focus on functional requirement of software Test planning can begin early in the software process

3 Black Box Testing Is not an alternative to white box testing, rather it is a complementary approach that is likely to uncover a different class of errors than white box methods

4 Objective of black box testing Tests are designed to answer the following questions How is functional validity tested? How is system behavior and performance tested? What classes of input will make good test cases? Is the system particularly sensitive to certain input values? How are the boundaries of a data class isolate? What effect will specific combinations of data have on system operations?

5 Black-box testing

6 Contoh Black Box Testing Equivalence Partitioning Boundary Value Analysis / Limit Testing Comparison Testing Performance Testing Robustness Testing etc

7 Equivalence Partitioning (1) Divide the input domain into classes of data for which test cases can be generated Based on equivalence classes for input conditions An equivalence class represent a set of valid or invalid states

8 Equivalence partitioning (2) Each of these classes is an equivalence partition where the program behaves in an equivalent way for each class member An input condition is either a specific numeric value, range of values, a boolean condition or a set of related values. Test cases should be chosen from each partition (or class)

9 Equivalence partitioning

10 General Rules in EQP Equivalence classes can be defined by : If an input condition specifies a range or a spesific value, one valid and two invalid equivalence class defined If an input condition specifies a boolean or a member of a set, one valid and one invalid equivalence class defined

11 Guidelines & Example for Equivalence classes If an input condition specifies range of values, Ex: [1..999] If an input condition requires a specific the number of values, Ex : a thing that contain 1 to 6 name If an input condition specific a member of a set, Ex : [KA, Bis, Taxi] If an input condition is Boolean, Ex : True

12 Example 1 Requirement of subprogram to be tested IS : The subprogram takes an integer input in the range [-100,100] FS : Output is the sign of the input value (value 0 is considered positive)

13 Partition system inputs into ‘equivalence sets’ If input is a 5-digit integer between 10,000 and 99,999, equivalence partitions are Values less than 10,000, Values between 10,000 and 99999 Values greater than 10,000 Choose test cases at the boundary of these sets 9999; 10,000; 99,999; 50,000; 100,000 Example 2

14 Equivalence partitions

15 Example 3 : ATM Consider data maintained for ATM. User should be able to access the bank using PC and modem User should provide six-digit password Need to follow a set of typed commands Software accepts Area code: can be blank or three-digit Prefix: three-digit number not beginning with 0 or 1 Suffix: four digits Password: six digit alphanumeric Command: {check, deposit, bill pay, transfer}

16 Input conditions for ATM Area code: Boolean: (the area code may or may not be present) Range: values defined between 200-999 Specific value: no value > 905 Prefix : range – specific value >200 Suffix : value (four-digit length) Password: Boolean: password may or may not be present value (six digit) Command: set containing commands noted previously

17 Boundary Value Analysis (BVA) Test case design that complements equivalence partitioning Focus of the testing is on the boundaries of the input domain If input condition specifies a range bounded by a certain values, say, a and b, then test cases should include The values for a and b The values just above and just below a and b  (a-1), (a+1), (b-1), (b+1)

18 Boundary Value Analysis (BVA) If an input condition specifies a number of values N, test cases should be exercise the numbers (N), the values just above and just below the values : (N-1) & (N+1)

19 Example : Search routine procedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : in out BOOLEAN; L: in out ELEM_INDEX) ; Pre-condition -- the array has at least one element T’FIRST <= T’LAST Post-condition -- the element is found and is referenced by L ( Found and T (L) = Key) or -- the element is not in the array ( not Found and not (exists i, T’FIRST >= i <= T’LAST, T (i) = Key ))

20 Inputs which conform to the pre-conditions Inputs where a pre-condition does not hold Inputs where the key element is a member of the array Inputs where the key element is not a member of the array Input partitions for Search Routine


Download ppt "Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING."

Similar presentations


Ads by Google