This section focuses on various test techniques which are fundamental in test analysis and design, aiding testers in defining what to test and how to execute tests effectively.
Understand and apply different test techniques: black-box, white-box, and experience-based.
Derive test cases through specific methodologies such as equivalence partitioning and boundary value analysis.
Collaborate with developers and stakeholders to write effective user stories and acceptance criteria.
Support test analysis (what to test) and design (how to test).
Facilitate the development of sufficient test cases systematically.
Help define test conditions, coverage items, and test data.
Black-Box Techniques: Analyze behavior without considering internal structure. Useful for unchanged implementations despite behavior consistency.
White-Box Techniques: Analyze internal structure and may only be developed post-implementation.
Experience-Based Techniques: Utilize testers' knowledge for case design, capable of uncovering defects overlooked by black and white-box techniques.
Common black-box techniques include:
Equivalence Partitioning (EP): Divides input data into valid and invalid partitions to minimize the number of test cases needed while ensuring defects are discovered.
Boundary Value Analysis (BVA): Focuses on the edges of partitions, commonly where defects reside, ensuring tests include boundary values during execution.
Decision Table Testing: Used for complex conditions where actions are determined by combinations of inputs. Aids in systematically identifying possible outcomes.
State Transition Testing: Analyzes the system's states and transitions based on events and actions, ensuring comprehensive coverage of transitions.
EP divides data into partitions, where all values in a valid partition should be processed similarly.
Valid partitions result in accepted data while invalid ones indicate data that should cause rejection or error.
Achieving 100% coverage requires testing every identified partition.
BVA identifies boundary values within partitions, revealing potential defects where boundaries are incorrectly defined.
Two versions of BVA:
2-value BVA: Focuses on boundary values and nearest neighbors (total of two per boundary).
3-value BVA: Includes boundaries and both adjacent values (total of three per boundary) for more thorough coverage.
BVA is critical since detected defects near boundaries often signal larger implementation errors.
Decision tables document rules showing how condition combinations affect functionality.
They streamline the process of identifying all possible outcomes from input conditions. Test coverage is determined by testing each valid combination.
Careful minimization of decision tables helps manage complexity without losing important test conditions.
Models system behavior via state diagrams and state tables to organize valid transitions initiated by events.
Three coverage criteria:
All States Coverage: Tests every possible state.
Valid Transitions Coverage: Tests all valid transitions.
All Transitions Coverage: Tests valid and invalid transitions to ensure comprehensive testing.
Key techniques are:
Statement Testing: Ensures that every executable statement in the code is tested for functionality. Measures coverage as a percentage of executed statements.
Branch Testing: Evaluates branches formed by decision outcomes in code. 100% branch coverage guarantees that all logical paths through the code are executed.
White-box testing advantages include a deeper understanding of the implementation, which aids defect detection, but it risks missing omissions that do not directly relate to the specified behavior.
This technique leverages tester experience to anticipate faults based on past project knowledge, potential error types, and failure patterns.
Tests are designed to invoke possible failures and identify common defect scenarios based on experiences.
Conducted concurrently with test design, this method allows testers to gain familiarity with the software dynamically, often integrating structured test sessions to enhance focus and documentation.
Effective in situations lacking detailed specifications or time constraints, it relies on the tester's intuition and experience.
Involves using a list to ensure all important areas of functionality are tested, supporting both functional and non-functional testing.
Checklists must be regularly updated and tailored to avoid redundancy, ensuring effective coverage.
User stories serve as a foundation for defining what features bring value to users. They are part of collaborative discussions that include development and business perspectives.
Properly constructed user stories are clear, concise, and actionable.
Clearly defined criteria ensure that user story implementations meet expectations before acceptance.
Involves collaborative agreement on what needs testing, elaborating both positive and negative test scenarios for comprehensive coverage.
A cooperative approach to define tests before feature implementation, ensuring clarity and focus on requirements.
ATDD promotes immediate collaborative engagement among team members during test specification workshops, refining the tests to mirror user story specifics.