4.2 Black-box Test Techniques Flashcards
What is black-box testing?
Test techniques based on analysis of the specified behavior of the test object without reference to its internal structure. Test cases are independent of code and software implementation, and therefore test cases remain the same even if the structure changes, so long as the required behavior does not change.
How does equivalence partitioning work?
Data is divided into groups based on the expectation that all the elements of a given partition are to be processed in the same way. Therefore if a test case that checks one value detects a defect, cases that test any other values should also produce a defect. Therefore, only one test case per partition is needed.
What is the difference between valid and invalid partitions?
Valid partitions contain “valid” data, as defined by the team. Usually this means data that should be successfully processed by the test object.
Invalid partitions contain “invalid” data, as defined by the team. Usually this means data that should be ignored or rejected by the test object.
What is Each Choice coverage?
Each Choice coverage requires each set of test cases to exercise each partition from each set of partitions at least once, not taking into account combinations of partitions.
It is used because many test objects include multiple sets of partitions (more than one input parameter).
What is Boundary Value Analysis?
A technique based on testing the boundaries of equivalence partitions. The minimum and maximum values of a partition are its boundaries; all elements between them therefore belong to the same partition.
Developers are more likely to make errors with boundary values, often where the implemented boundaries are a step above or below their intended positions. In some cases, boundaries are inadvertently omitted altogether.
What is 2-value BVA?
For each boundary value, there are two coverage items: this value, and its closest neighbor in the adjacent partition.
To achieve 100% coverage with 2-value BVA, test cases must exercise all coverage items, i.e., all identified boundary values. Coverage is measured as the number of boundary values that were exercised, divided by the total number of identified boundary values, and is expressed as a percentage.
What is 3-value BVA?
For each boundary value, there are three coverage items: this boundary value, and both its neighbors. Therefore in 3-value BVA, some coverage items may NOT be boundary values.
To achieve 100% coverage, test cases must exercise all coverage items. Coverage is the number of boundary values and their neighbors, divided by the total number of identified boundary values, and is expressed as a percentage.
Which version of boundary value analysis is more rigorous?
3-value BVA is more rigorous than 2-value BVA as it may detect defects overlooked by 2-value BVA. For example, if the decision “if (x ≤ 10) …” is incorrectly implemented as “if (x = 10) …”, no test data derived from the 2-value BVA (x = 10, x = 11) can detect the defect. However, x = 9, derived from the 3-value BVA, is likely to detect it.
What is a Decision Table?
Decision Tables are used to test implementation of system requirements that specify how different combinations of conditions result in different outcomes. They are an effective way of recording complex logic, such as business rules.
The conditions and resulting actions of the system are defined as the rows of the table. Each column corresponds to a decision rule that defines a unique combination of conditions along with the associated outcomes.
What is a limited entry Decision Table?
All the values of conditions and actions are boolean (true / false).
What is an extended entry Decision Table?
Some or all conditions and actions may have values beyond boolean, such as ranges of numbers, equivalence partitions, or discrete values.
Describe the notation for Decision Table conditions and actions.
For conditions: T means True, the condition is satisfied. F means false, the condition is not satisfied. “-“ (hyphen) means the value of the condition is irrelevant for the action outcome. “N/A” means the condition is infeasible for the given rule.
For actions: X means that the action should occur. Blank means it should not occur.
A full decision table has enough columns for every combination of conditions. Testing the full table can be time consuming since the number of rules grows exponentially with the number of conditions. How can we simplify it?
- Delete columns containing infeasible combinations.
- Merge columns where conditions don’t affect the outcome into a single column, where it makes sense to do so.
- Use a minimized decision table or a risk-based approach to determine test coverage.
What is Decision Table Testing?
Coverage items are the columns containing feasible combinations of conditions. To achieve 100% coverage with this technique, test cases must exercise all these columns. Coverage is measured as the number of exercised columns, divided by the total number of feasible columns, and is expressed as a percentage.
What are the benefits of decision table testing?
It provides a systematic approach to identify all combinations of conditions, some of which might otherwise be overlooked.
It helps to find gaps or contradictions in the requirements.