The document discusses black box testing techniques for software quality assurance including equivalence partitioning, boundary analysis, and state transition testing. Equivalence partitioning involves dividing input and output values into partitions that are expected to produce the same results. Boundary analysis tests partition boundaries and invalid values just beyond the edges. State transition testing uses a model of component states, transitions, events, and actions to ensure all state transitions are tested. Decision tables can also be used to systematically test combinations of conditions and expected actions. Examples are provided to illustrate these black box testing strategies.
2. Preview the problem … very large or infinite number of test scenarios + finite amount of time = impossible to test everything the solution … Software test techniques exist to reduce the number of tests to be run whilst still providing sufficient coverage of the system under test
3. Overview Black-box testing: Test cases derived from specifications The focus is not the design, nor the implementation positive testing -> testing the implementation against specified conditions negative testing -> testing the implementation against unspecified conditions (unspecified inputs) -> stability and robustness of specifications Input Output
4. Equivalence partition create partitions of the input and output values of the component each partition shall contain a set or range of values, chosen such that all values can reasonably expected to be treated by the component in the same way both valid and invalid values are partitioned in this way For each test case specify: Input to the component Partition exercised The expected outcome of the test case Test completeness criteria: test at least one input/output pair for each equivalence partition Indicates when to stop testing
6. Boundary Analysis refinement of equivalence partitioning for which each edge of an equivalence class is a representative element of the class invalid-input elements are found just beyond the ends For each test case specify: the input(s) to the component the partition boundaries exercised The expected outcome of the test case Test completeness criteria: test at least one input/output pair for each equivalence partition and the “borders” between the equivalence partitions
7. Boundary Analysis Example: f(int month) – want to test this function if (month > 0 && month < 13) or if (month >= 0 && month < 13) …, -1, 0, |1, 2, 3, …., 9, 10, 11, 12|, 13, 14, …. |_________________________| valid partition Test: 0, 1, 12, 13
11. Decision table Decision Table A decision table is a tabular form that presents a set of conditions and their corresponding actions. Condition Stubs Condition stubs describe the conditions or factors that will affect the decision or policy. They are listed in the upper section of the decision table. Action Stubs Action stubs describe, in the form of statements, the possible policy actions or decisions. They are listed in the lower section of the decision table. Rules Rules describe which actions are to be taken under a specific combination of conditions. They are specified by first inserting different combinations of condition attribute values and then putting X's in the appropriate columns of the action section of the table.
13. Example A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.
14. Example 1. Identify Conditions & Values gender: M, F city dweller: Y, N age group: A, B, C 2. Compute Maximum Number of Rules: 2 x 2 x 3 = 12 3. Identify Possible Actions: market product W market product X market product Y market product Z
15.
16. Conclusions Advantages of Black Box Testing more effective on larger units of code than glass box testing tester needs no knowledge of implementation, including specific programming languages tester and programmer are independent of each other tests are done from a user's point of view will help to expose any ambiguities or inconsistencies in the specifications test cases can be designed as soon as the specifications are complete
17. Conclusions Disadvantages of Black Box Testing only a small number of possible inputs can actually be tested, to test every possible input stream would take nearly forever without clear and concise specifications, test cases are hard to design there may be unnecessary repetition of test inputs if the tester is not informed of test cases the programmer has already tried may leave many program paths untested cannot be directed toward specific segments of code which may be very complex (and therefore more error prone) most testing related research has been directed toward glass box testing