CTFL v4.0 Cheatsheet
Certified Tester Foundation Level
Download free PDFFundamentals of testing
Testing and quality
- **Testing** evaluates work products, finds defects, measures coverage, reduces risk and supplies information for decisions. It includes static and dynamic activities.
- **Verification** checks specified requirements; **validation** checks fitness for stakeholder needs. Correct implementation can still deliver the wrong product.
- **Quality assurance** improves processes to prevent problems. **Quality control**, including testing, evaluates product quality.
- An **error** is a human mistake; a **defect** is a flaw in a work product; a **failure** is incorrect behavior during execution. A defect need not cause every execution to fail.
- **Debugging** reproduces failures, diagnoses causes and fixes defects. Testing detects problems and later checks fixes; environmental conditions can also cause failures.
Seven testing principles
- **Presence, not absence:** testing can reveal defects but cannot prove there are none. **Exhaustive testing is impossible** except for trivial cases; select tests deliberately.
- **Early testing saves time and money. Defects cluster together:** use defect history and risk to focus effort, while checking other areas too.
- **Tests wear out:** repeated tests become less effective at discovering new defects. Refresh data and tests; retain useful regression checks.
- **Testing is context dependent. Absence-of-defects fallacy:** a technically correct product may fail users. Seek early stakeholder feedback and validate real needs.
Activities and work products
- **Planning** defines objectives, approach, resources and schedule. **Monitoring** compares actual progress with plans; **control** takes corrective action throughout testing.
- **Analysis: what to test?** Examine the test basis, identify testable features and prioritize test conditions. Assess testability and identify defects in the basis.
- **Design: how to test?** Derive test cases, expected results, coverage items, test data requirements and environment requirements.
- **Implementation** prepares procedures, suites, scripts, data, schedules and environments. **Execution** runs tests, compares actual with expected results, logs outcomes and reports anomalies.
- **Completion** evaluates exit criteria, reports results and residual risks, handles unresolved defects, archives reusable testware and records lessons learned. Activities can overlap and repeat.
People, context and independence
- **Whole-team approach:** business representatives, developers and testers share responsibility for quality. Anyone with suitable skills can contribute to a task.
- **Tester skills** include curiosity, analytical and critical thinking, attention to detail, technical and domain knowledge, tool use and empathetic communication.
- **Independence** can expose different assumptions and failures. It increases from self-testing through peers and separate teams to an external organization.
- Balance independence with collaboration: isolation can reduce context and create bottlenecks. Developers retain responsibility for quality; independent testing complements their tests.
Testing throughout the software development lifecycle
Lifecycle and early feedback
- In **every SDLC**, pair development activities with testing, give each test level distinct objectives, and start analysis, design and reviews as soon as relevant work products exist.
- **Sequential models** typically execute later test levels after implementation while preparing tests earlier. **Iterative and incremental models** need repeated testing and frequent regression checks.
- **Shift left** moves suitable testing earlier: review requirements, write tests before code, use static analysis and integrate frequently. Early non-functional tests complement later system tests.
- **DevOps and CI/CD** combine development, testing and operations through automated builds and rapid feedback. Continuous automation still needs human judgment and exploratory testing.
Test-first development
- **TDD:** write a failing test, add enough code to pass it, then refactor. Repeat the red-green-refactor cycle and maintain both tests and production code.
- **ATDD:** business, development and testing collaboratively derive tests from acceptance criteria before implementation. Begin with intended successful behavior, then extend to negative and quality scenarios.
- **BDD:** express shared behavior through readable examples, commonly **Given** context, **When** an event occurs, **Then** an outcome follows. Automation requires supporting executable bindings.
Five test levels
- **Component testing** examines individual components in isolation, often with harnesses or test doubles. **Component integration testing** examines interfaces and interactions between components.
- **System testing** evaluates the complete system against system requirements, including end-to-end behavior and relevant non-functional characteristics.
- **System integration testing** checks interfaces with other systems or external services, such as a payment gateway. The scope of the interaction determines the level.
- **Acceptance testing** validates business needs and deployment readiness. Forms include user, operational, contractual and regulatory acceptance, plus alpha and beta testing.
Test types and change
- **Functional testing** checks what the product does. **Non-functional testing** checks how well it behaves, including performance, usability, security, reliability and compatibility.
- **Black-box testing** derives tests from specified behavior; **white-box testing** derives tests from internal structure. Test types and techniques can apply at multiple levels.
- **Confirmation testing** checks that a particular defect was fixed. **Regression testing** checks for adverse consequences of changes in the changed component, related areas or environment.
- **Maintenance testing** follows changes to an operational system, migrations or retirement. Use impact analysis to select tests; retirement may require checking archival and retrieval of retained data.
Testing quadrants
- **Q1: technology-facing, supports the team.** Component and component integration tests give rapid implementation feedback and are commonly automated in CI.
- **Q2: business-facing, supports the team.** Examples, story tests, functional tests, API tests and simulations clarify acceptance criteria; tests may be manual or automated.
- **Q3: business-facing, critiques the product.** Exploratory, usability and user acceptance testing assess real user experience and fitness for use.
- **Q4: technology-facing, critiques the product.** Performance, security and other technical non-functional tests assess operational qualities. Quadrants are perspectives, not an execution sequence or priority ranking.
Pyramid and retrospectives
- The **test pyramid** favors many small, isolated, fast lower-level checks and fewer broad, slower end-to-end checks. Higher tests usually cover more code and cost more to maintain.
- **Retrospectives** inspect what worked, what failed and what to improve. Agree actions, owners and follow-up to improve effectiveness, collaboration, test basis quality and defect reporting.
Static testing
Reviews and static analysis
- **Static testing** examines work products without executing them and finds defects directly. **Dynamic testing** executes software, observes behavior and may trigger failures.
- **Reviews** suit work products people can read and understand: requirements, plans, test cases, code and models. **Static analysis** uses tools on artifacts with analyzable structure.
- Static techniques can reveal ambiguities, omissions, inconsistencies, coding-standard violations, structural problems and vulnerabilities. Runtime performance and actual failures require dynamic observation.
Choose the review type
- **Informal review:** lightweight anomaly detection with no prescribed formal process or required documented output.
- **Walkthrough:** led by the author; builds shared understanding, educates participants and can detect anomalies. Individual preparation may be optional.
- **Technical review:** technically qualified reviewers, normally led by a moderator, evaluate alternatives and seek consensus while detecting anomalies.
- **Inspection:** the most formal review type, following a defined process with recorded findings and metrics for process improvement. The author does not lead or record the inspection.
Review activities and responsibilities
- **Planning** sets objectives, scope, work product, quality characteristics, roles, effort and exit criteria. **Initiation** ensures participants have materials and understand the process.
- **Individual review** finds anomalies, questions and recommendations. **Communication and analysis** discusses findings and decides actions; **fixing and reporting** tracks changes and exit criteria.
- **Manager:** provides resources and time. **Review leader:** organizes the review and takes overall responsibility. **Moderator/facilitator:** manages meetings, time and a safe discussion.
- **Author:** creates the work product and fixes agreed defects. **Reviewers:** identify anomalies. **Recorder/scribe:** records findings, decisions and actions.
- Successful reviews use clear objectives, manageable chunks, appropriate techniques, trained participants and preparation time. Discuss the work product constructively; avoid judging people by defect counts.
Test analysis and design
Equivalence partitioning
- **Equivalence partitioning (EP)** groups values expected to be processed alike. Include valid and invalid partitions; choose at least one representative from each relevant partition.
- Define partitions for each characteristic separately, such as length, allowed characters and first-character rules. Clarify overlapping ranges or missing behavior before deriving expected results.
- **Each Choice coverage** exercises every partition in every set at least once. It does not require every combination; respect constraints when combining representatives.
- **Partition coverage = exercised partitions / total identified partitions × 100%.** Extra values in an already covered partition do not increase this coverage.
Boundary value analysis
- **BVA** targets the edges of ordered, contiguous partitions, where comparison and off-by-one defects are common. Use the specified data precision to identify neighboring values.
- **2-value BVA** exercises each boundary value and its nearest neighbor in the adjacent partition. For an integer interval 12 through 18, check 11, 12, 18 and 19.
- **3-value BVA** exercises each boundary value and both nearest neighbors. List boundaries for all adjacent partitions, form the required values, then deduplicate overlaps.
- Measure **boundary coverage** against the distinct items required by the chosen variant. Three-value checks are stronger because they also sample the same side of a boundary.
Decision tables
- **Conditions** describe inputs or circumstances; **actions** describe outcomes. Each rule column specifies a condition combination and its resulting actions.
- With n independent Boolean conditions, a full table has **2^n combinations**. Multi-valued conditions multiply their choice counts. Remove infeasible combinations only when justified.
- **Minimize** rules when a condition cannot affect the outcome, marking it as irrelevant. Rule coverage exercises each feasible rule in the selected table at least once.
State transition testing
- A **state** records a situation; an **event** triggers a possible transition; a **guard** controls whether it occurs; an **action** is its effect. History can change the response.
- **All-states coverage** visits every state. **Valid-transition coverage** exercises every valid transition; visiting all states alone does not guarantee this.
- **All-transitions coverage** also attempts invalid transitions from a state table. Test a single invalid transition per test where practical to reduce defect masking.
- For sequence coverage, follow allowed edges from the required start to the required end. A sequence of k transitions contains k + 1 state occurrences, including revisits.
Statement and branch coverage
- **Statement coverage = distinct executable statements exercised / total executable statements × 100%.** Comments and non-executable declarations are not coverage items.
- **Branch coverage = distinct branches exercised / total branches × 100%.** Count conditional and unconditional control-flow transfers; include both outcomes of binary decisions.
- **100% branch coverage implies 100% statement coverage; the reverse does not hold.** Neither proves all paths, condition combinations, requirements or defects have been covered.
- **Suite coverage uses a union**, not a sum: repeated coverage counts once. White-box measures reveal structural gaps but cannot reveal missing requirements by themselves.
Experience-based techniques
- **Error guessing** anticipates likely mistakes, defects and failures using experience and history. Fault attacks systematically turn lists of likely problems into targeted tests.
- **Exploratory testing** combines learning, design, execution and evaluation. Results guide subsequent tests; timeboxed sessions use a **test charter**, notes and a debrief.
- **Checklist-based testing** derives tests from directly checkable conditions. Detail affects repeatability; update checklists as risks and defect patterns change. These techniques complement systematic coverage.
Collaborative stories and acceptance
- The **three Cs** are **Card, Conversation, Confirmation**. A story often states: As a role, I want a capability, so that I gain a benefit.
- **Business, development and testing** collaborate to expose assumptions and create a shared understanding. **INVEST:** Independent, Negotiable, Valuable, Estimable, Small and Testable stories.
- **Acceptance criteria** define a story’s acceptance conditions, including positive, negative and non-functional behavior. Use scenario-oriented Given/When/Then examples or rule-oriented lists.
- Derive tests with clear preconditions, inputs, actions and expected results. Cover stated criteria, including rejected inputs and transaction rollback where specified; avoid inventing requirements.
Managing the test activities
Plans, criteria and Agile planning
- A **test plan** communicates scope, objectives, basis, stakeholders, approach, resources, budget, schedule, risks and communication. Tailor detail to context and explain policy deviations.
- **Entry criteria** are prerequisites for an activity: available test basis, prepared data and environment, suitable build quality or passed smoke tests.
- **Exit criteria** define completion: target coverage, execution results and acceptable unresolved defects or residual risk. The same condition can serve different gates depending on context.
- **Definition of Ready** supports starting work; **Definition of Done** supports completion. Time or budget limits may force stopping with explicit stakeholder acceptance of remaining risk.
- **Release planning** addresses broad test approach, testable stories and release risks. **Iteration planning** refines story risks, acceptance criteria, testing tasks and effort.
Estimate effort
- **Ratio-based estimation** applies relevant historical ratios. If development:test effort is 4:1, estimated testing effort is one quarter of development effort.
- **Extrapolation** projects from observed work. **Wideband Delphi/planning poker** uses independent estimates, discussion of differences and further rounds toward agreement.
- **Three-point estimation:** E = (a + 4m + b) / 6; SD = (b - a) / 6, where a is optimistic, m most likely and b pessimistic effort. SD expresses uncertainty, not a guaranteed range.
Prioritize and schedule tests
- **Risk-based prioritization** tests the greatest risks early. **Requirements-based prioritization** follows stakeholder importance. **Coverage-based prioritization** favors broader coverage.
- **Additional coverage** repeatedly selects the test that covers the most still-uncovered items. Recalculate after every selection; do not rank once by total coverage.
- Respect **dependencies**, required data, environment availability and resource constraints. Prerequisites may precede higher-priority tests; reduce configuration switches without breaking logical order.
Product and project risks
- **Risk level** depends on likelihood and impact, often multiplied for quantitative estimates. Identify risks, analyze them, choose responses and monitor changes and residual exposure.
- **Product risks** concern quality, such as incorrect calculations, data loss, vulnerabilities or poor usability. **Project risks** threaten delivery, such as shortages, delays, scope creep or unavailable environments.
- **Risk-based testing** adjusts scope, depth, techniques, skills, effort and priority to product risk. Responses include mitigation, acceptance, transfer and avoidance; executing tests cannot establish zero risk.
Monitoring, control and reports
- Monitor **progress, effort, cost, coverage, execution outcomes, defects and risk**. Use the results to replan, reprioritize, adjust resources or resolve obstacles.
- **Progress/status reports** describe the reporting period, deviations, impediments, metrics, changed risks and next steps. **Completion reports** summarize results, exit criteria, deviations, unresolved defects, residual risks and lessons.
- Adapt communication to the audience and timing. Automatically updated **dashboards** support distributed teams; **burndown charts** compare remaining work with available time.
Traceability, configuration and defects
- **Traceability** links the test basis, conditions, cases, results and defects. It supports coverage measurement, change impact analysis, audits and understandable reporting.
- **Configuration management** identifies and versions test objects, testware and environments. Baselines and change control enable reproducible tests and restoration of a known configuration.
- A **defect report** needs an identifier, concise title, build and environment, preconditions, exact steps, data, expected and actual results, reproducibility, evidence and relevant test links.
- **Severity** describes impact; **priority** describes urgency to address it. Track ownership and status through triage, fixing, confirmation and closure; an anomaly may originate in tests or the environment.
Test tools
Match the tool to the task
- **Management tools** organize tests, defects, traceability and reports. **Static tools** support reviews, coding standards and analysis; **design/implementation tools** help create cases, data and procedures.
- **Execution tools** run automated checks; **coverage tools** measure exercised items; **performance tools** generate workloads and measure behavior. Tool output still needs interpretation.
- **DevOps tools** support delivery pipelines, builds and CI/CD. **Virtual machines and containers** support repeatable environments and scalable deployment; collaboration tools support communication.
Automation benefits and risks
- **Benefits:** less repetitive effort, faster feedback, repeatable execution, fewer simple human errors, objective measurements and easier access to progress statistics.
- **Risks:** unrealistic expectations, underestimated setup and maintenance, inadequate skills, unsuitable tools, vendor dependency and unreliable scripts or environments.
- Choose automation for useful, repeatable checks and budget for upkeep. Automating an unchanged suite does not inherently increase coverage or guarantee lower total cost; retain human exploration.