Foundation Level 4 Flashcards
Test techniques classification
- Black-box test techniques
- White-box test techniques
- Experience-based test techniques
Black-box test techniques
(specification-based techniques)
- based on an analysis of the specified behavior of the test object without reference to its internal structure.
- the test cases are independent of how the software is implemented
- black-box testing does not provide a measure of actual code coverage.
White-box test techniques
(structure-based techniques)
- based on an analysis of the test object’s internal structure and processing
- can only be created after the design or implementation of the test object
Experience-based test techniques
use the knowledge and experience of testers for the design and implementation of test cases. The effectiveness of these techniques depends heavily on the tester’s skills. Experience-based test techniques can detect defects that may be missed using the black- box and white-box test techniques.
Black-Box Test Techniques
- Equivalence Partitioning
- Boundary Value Analysis
- Decision Table Testing
- State Transition Testing
- Use Case Analysis
Equivalence Partitioning Assumption
if a test case, that tests one value from an equivalence partition, detects a defect, this defect should also be detected by test cases that test any other value from the same partition => one test is sufficient
Data elements related to the test object
- inputs
- outputs
- configuration items
- internal values
- time-related values
- interface parameter
Valid vs invalid values
- definition varies among teams and organizations
- valid values - those that should be processed by the test object or as those for which the specification defines their processing.
- Invalid values - those that should be ignored or rejected by the test object or as those for which no processing is defined in the test object specification.
Coverage (EP)
the number of partitions exercised by at least one test case, divided by the total number of identified partitions, and is expressed as a percentage.
Each Choice coverage
- test objects include multiple sets of partitions (multiple inputs)
- exercise each partition from each set of partitions at least once.
- does not take into account combinations of partitions
Boundary Value Analysis Assumptions
- can only be used for ordered partitions.
- if two elements belong to the same partition, all elements between them must also belong to that partition.
Boundary Value Analysis Motivation
- developers are more likely to make errors with these boundary values.
- Typical defects found by BVA are located where implemented boundaries are misplaced to positions above or below their intended positions or are omitted altogether.
2-value BVA
- for each boundary value there are two coverage items: this boundary value and its closest neighbor belonging to the adjacent partition.
- overage 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.
3-value BVA
- for each boundary value there are three coverage items: this boundary value and both its neighbors.
- some of the coverage items may not be boundary values
3-value BVA is more rigorous than 2-value BVA
- may detect defects overlooked by 2-value BVA
- , 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.
Limited-entry decision tables
all the values of the conditions and actions (except for irrelevant or infeasible ones; see below) are shown as Boolean values (true or false)
Extended-entry decision tables
some or all the conditions and actions may also take on multiple values (e.g., ranges of numbers, equivalence partitions, discrete values)
Decision table
- full decision table has enough columns to cover every combination of conditions
- “N/A” means that the condition is infeasible for a given rule.
- The table can be simplified by deleting columns containing infeasible combinations of conditions. The table can also be minimized by merging columns, in which some conditions do not affect the outcome
Decision table testing coverage
- coverage items are the columns containing feasible combinations of conditions
- the number of exercised columns, divided by the total number of feasible columns, and is expressed as a percentage.
The strength of decision table testing
- provides a systematic approach to identify all the combinations of conditions, some of which might otherwise be overlooked
- helps to find any gaps or contradictions in the requirements
A state transition diagram
models the behavior of a system by showing its possible states and valid state transitions
state table
- model equivalent to a state transition diagram
- rows represent states, and its columns represent events
- Table entries (cells) represent transitions, and contain the target state, as well as the resulting actions, if defined.
- In contrast to the state transition diagram, the state table explicitly shows invalid transitions, which are represented by empty cells.
A test case based on a state transition diagram
- a sequence of events, which results in a sequence of state changes (and actions, if needed)
- one test case may, and usually will, cover several transitions between states.
Coverage criteria for state transition testing
- all states coverage
- valid transitions coverage
- all transitions coverage