QA Interview Hub · Knowledge base · Quizzes · Українська

QA Fundamentals

Testing basics

principles, SDLC, STLC, levels

How do QA, QC and testing differ?

Per ISTQB, testing is a form of quality control (QC): a product-oriented, corrective approach, while QA is process-oriented and preventive. Testing finds defects and evaluates the quality of work products, and QA changes the process so that fewer defects appear. Debugging is separate: it finds the cause of a failure in the code and removes it, which is the developer's job.

QA Fundamentals · Testing basics

The same bug has been fixed three times and keeps coming back. Is that testing's job or QA's?

The vacancy says "QA Engineer" and the duties are: write test cases and file bugs. In the interview they ask how QA, QC and testing differ. The question is not terminology for its own sake: the answer shows whether the candidate sees the difference between "finding a defect" and "making sure defects do not appear". This lesson splits the three terms per ISTQB and shows where the line blurs in practice.

How it works

Per ISTQB CTFL 4.0, testing is a form of quality control (QC). QC is product-oriented and a corrective approach: it supports reaching the required level of quality. QA is process-oriented and a preventive approach: it is about implementing and improving processes that produce fewer defects. Testing is a set of activities to find defects and evaluate the quality of work products: requirements, design, code, the finished system.

Simplified model

QA: process, preventionstandards, retrospectives, reviewstest results hint at what to changeQC: product, correctioncontrol before release, exit criteriaTesting: the main form of QCtests, defects, evaluating work products
Figure 1. Two approaches per ISTQB: QA (process, preventive) and QC (product, corrective), whose main form is testing. A common simplified model nests them inside each other, but in ISTQB QA and QC are separate approaches.

Why the split makes sense. If a team only tests, it catches defects that have already appeared and pays for each one: a fix, a rerun, a delayed release. If it also works on the process, some defects never appear: unclear requirements are caught at review, and a typical mistake is closed by a checklist or a rule in the Definition of Done. These are two different levers, and neither replaces the other.

Example: one bug, three levels of reaction

Over a quarter, a discount rounding bug is found three times: the form shows 99.99 but 100.00 is charged. The reaction can be split by role:

LevelWhat exactly a QA Engineer does
TestingRuns discount cases with boundary amounts, records the mismatch, describes the steps to reproduce in a bug report.
QCChecks that the fix really closed the defect and does not let the release go while critical bugs remain open in the payments area.
QAAsks why this class of error repeats. Cause: the requirements have no rounding rule. Decision: a "rounding rule" field in the requirements template and an item in the Definition of Done.

The same bug in two approaches

Testing and QC only

Found, fixed, verified. Next month the same class of error shows up in another form.

Plus QA

The cause is found in the process and the requirements template and review are changed. The class of error becomes rarer, not just fixed.

Figure 2. Testing treats the effect, working on the process removes the cause. You need both.

Limits and alternatives

  • In vacancies "QA Engineer" almost always means a person who tests and has partial influence on the process. It is a role name, not the exact ISTQB definition. In the interview name both meanings: it shows you know the term and the practice.
  • The line between QC and QA is blurry in real teams: a retrospective, a review or automation can belong to both. It is more useful to ask "what are we doing: looking for a defect or changing the process" than to argue about a label.
  • Quality does not belong to one role. The whole team is responsible: the analyst writes clear requirements, the developer writes unit tests, the QA Engineer helps see risks and gives early feedback.

Testing and debugging

Another pair that is mixed up just as often. Testing finds a failure: it shows that the system behaves differently from what was expected. Debugging looks for the cause of that failure in the code and removes it, which is the developer's job. A tester helps with short reproduction steps and logs, but fixing the defect is not part of testing. After the fix the tester checks it again (confirmation testing) and looks at whether the neighbouring behaviour broke (regression testing).

Common mistakes

  • Treating QA, QC and testing as synonyms. In an interview this reads as "I see the job only as running test cases".
  • Saying "QA is responsible for quality". Then the rest of the team stops owning it and the tester becomes a gate before release.
  • Reducing testing to finding bugs. It also evaluates the quality of requirements and other artifacts and gives the team information for decisions.
  • Talking about QA without an example. A general "I improve processes" proves nothing. A concrete case, like the one above, does.

Check yourself

A team keeps finding bugs caused by unclear requirements for the date format. Which action here is testing and which is QA?

Answer

Testing: find the mismatch and describe the bug. QA: change the process so it does not repeat, for example add a date-format check to the requirements review and to the analyst checklist. The second action is what reduces such bugs in the future.

Can you do QA activities without running a single test? And test without doing any QA?

Answer

Yes to both. Root-cause analysis of defects or improving the requirements template needs no test runs, yet it is QA. And you can test without working on the process: that is how teams that only catch bugs at the end work. So the terms are not synonyms.

In an interview. Junior: Testing is finding defects and evaluating the quality of the product and artifacts. QC controls product quality, and testing is its main part. QA works on the process so defects do not appear. Middle/Senior: Per ISTQB testing is a form of QC, a product-oriented corrective approach, while QA is process-oriented and preventive. I tell them apart by actions: running cases or verifying a fix is QC, understanding why a class of error repeats and changing the requirements template or the Definition of Done is QA. The "QA Engineer" title in vacancies usually covers both.

Name the 7 testing principles.

The seven principles: testing shows the presence of defects, not their absence; exhaustive testing is impossible; early testing saves time and money. Also, defects cluster together, tests wear out and need updating, testing depends on context, and the absence of defects does not make a product successful. So instead of "no bugs" one says what was checked and what was not.

QA Fundamentals · Testing basics

All tests are green. Can you tell the manager there are no bugs in the release?

Before a release a manager asks: "No bugs?". All tests passed, no new defects in two days. The honest answer is more complicated than "yes" or "no", and the seven ISTQB testing principles explain it. This is not a list to memorise: each principle answers a concrete situation from work. The lesson explains what each means in practice and which decisions follow from it.

How it works

The principles capture what is common to any testing, regardless of the product or the tool. They can be grouped by the question they answer.

What you can claim. Testing shows the presence of defects, not their absence (1): found bugs prove defects exist, while finding none does not prove there are none. So a report says "no critical defects found in the tested scope", not "there are no bugs". Absence-of-defects fallacy (7): a bug-free product that does not solve the user's problem is still a failure.

How much to test. Exhaustive testing is impossible (2). Look at a form with five fields of ten values each:

5 fields x 10 values = 10^5 = 100,000 combinations
1 second per case  ->  100,000 s, about 28 hours
(without step order, browsers and different data)

So cases are chosen by risk and test design techniques (equivalence classes, boundary values), not by the wish to "check everything".

Where and when to test. Early testing saves time and money (3): an inaccuracy in the requirements found at review costs a conversation, while the same inaccuracy in production costs a code fix, repeated tests, a release and sometimes user trust. Defects cluster together (4): a small share of modules produces most bugs, so tests go more densely where bugs already appeared, onto complex or recently changed logic.

Defect clustering

Share of defects found per module (illustrative)55%20%10%8%7%PaymentCartSearchProfileRest
Figure 1. A typical picture: one or two modules give most of the defects. The numbers are illustrative.

How long tests keep working. Tests wear out (5, formerly the "pesticide paradox"): an unchanged set of tests stops finding new bugs over time, because the product adapted to it and new defects sit where there are no tests. The set is refreshed: cases for new changes, different data, exploratory testing on top.

How to choose an approach. Testing is context dependent (6): for a bank transfer accuracy, security and audit matter, while for an ad landing page speed and rendering across browsers matter more. There is no single "right" plan for all products.

Example: what follows from the principles at work

A user says the new "Promo code" feature in the cart does not work. Here is how concrete actions come out of the principles:

PrincipleWhat a QA Engineer does
Early testingReads the promo code requirements before development starts: do discounts stack, what happens with an expired code.
Exhaustive is impossibleDoes not try every amount and code, but takes classes (valid, expired, unknown) and boundaries (minimum amount).
ClusteringAdds more cases in the cart and payment, where bugs already were, than on the "About us" page.
Tests wear outAfter several releases refreshes the regression set and adds cases for new promo code scenarios.
ContextFor a shop running a campaign, checks load on sale day.
Shows presenceIn the report writes what was checked and what was not, instead of "everything works".
Absence fallacyAsks product whether the promo code really solves buyers' problem or only works formally.

The cost of a fix grows

Cost of a fix by stage (qualitative)ReqsDesignCodeTestsProd
Figure 2. The bar heights are qualitative, not a measurement: the further from requirements, the more people and steps it takes to fix the same thing.

Limits and alternatives

  • The principles describe patterns, not laws with numbers. Defect clustering is often described by the 80/20 rule, but that is an estimate, not a guarantee: in a given product the proportion differs.
  • The principles do not give a ready plan. Context, risks and test design techniques are needed to turn them into cases.
  • Wording changes between ISTQB versions. In older sources "tests wear out" is still called the "pesticide paradox"; it helps to know both names in an interview.

Common mistakes

  • Saying "there are no bugs". Correct: "no critical defects found in the tested scope". The first phrase promises what testing cannot give.
  • Trying to cover everything. The number of cases grows and the return falls. Risk and techniques give more than volume.
  • Not changing the regression set for years. It stays green but finds less and less that is new.
  • Testing only after development. A bug in requirements gets more expensive with every step.

Check yourself

A regression set of 400 tests was not changed for two years. Everything is green, yet new bugs regularly appear in production. Which principle applies and what to do?

Answer

Tests wear out. The set checks what it already checked, and new changes go past it. Review coverage of new features, add cases for recent bugs, remove obsolete tests and introduce exploratory testing.

The product fully matches the specification, no defects were found, yet users do not use the new feature. Which principle and what conclusion?

Answer

Absence-of-defects fallacy. No bugs does not mean the product is good: the specification may not match needs. Conclusion: besides verification you need validation with users or product.

In an interview. Junior: Testing shows the presence of defects, not their absence. Exhaustive testing is impossible, so we prioritise. Test early. Defects cluster in a few modules. The same tests stop finding bugs over time, so they are refreshed. Testing depends on context. A bug-free product nobody needs is still a failure. Middle/Senior: I use the principles as arguments in a risk conversation: instead of "no bugs" I say what was checked and what was not, I pick cases by risk and test design techniques, test modules with a defect history more densely, refresh regression regularly and ask whether users need the feature at all.

How does verification differ from validation?

Verification confirms the product is built right, to the requirements, while validation confirms the right product is built, fit for users' needs. A product can fully match the specification and still be useless, so validation is strengthened with questions to requirements, demos and UAT. Both can be static or dynamic: the difference is the question asked, not whether code runs.

QA Fundamentals · Testing basics

The feature is built exactly to the spec, and users do not need it. Who missed the mistake?

A team implemented the delivery calculation exactly per the specification: free from 1000 UAH. All tests against the spec are green. After release buyers go to a competitor where delivery is free from 500. There is no defect in the code, yet the product does not solve the problem. Verification and validation describe exactly this difference: "built right" and "built the right thing".

How it works

Per ISTQB, verification confirms that the result meets the specified requirements: are we building the product right. Validation confirms that the result is fit for its intended use and meets stakeholders' needs: are we building the right product. Between the need and the product stands the specification, and it gives two different questions.

Two questions about one chain

NeedSpecProductverificationdoes the product match the spec?validationdoes the product meet the need?
Figure 1. Verification looks at the spec and the product, validation closes the chain back to the real need.

Why it is split this way. A mistake can sit in two places. If the requirements are right and the code deviated, that is a verification failure, found by tests against the requirements. If the code perfectly implements wrong requirements, verification is green but validation fails: tests against the spec will not see this, because they rely on the spec themselves. So running test cases alone is not enough: you also need feedback from those the product is for.

Example: delivery from 1000 UAH

One feature, two checks

Verification

Built right?

Amount 999 UAH: delivery is paid. 1000 UAH: free. The behaviour matches the spec, the test is green.

Validation

The right thing?

Buyers abandon a 700 UAH cart because a competitor gives free delivery from 500. The threshold in the spec does not match the market.

Figure 2. The product passed verification and failed validation: the mistake was in the requirements, not in the code.

Verification and validation in short

What we compareVerificationValidation
QuestionBuilt right?Built the right thing?
Checked againstRequirements, specificationThe user's need
ExamplesTest against the spec, code reviewUAT, demo, usability
What it findsDeviation from requirementsWrong, missing or unneeded requirements

How to tell them apart. If you check that the code does what is written, that is verification. If you check that what is written solves people's problem at all, that is validation. Acceptance criteria on each story give verification, while a conversation with stakeholders at requirements review and a demo at the end of the sprint give validation. In the ISTQB glossary, verification confirms that a work product fulfils its specification, and validation that it matches stakeholders' needs. In practice the two words are often used as synonyms of "testing", so in an interview it helps to name the difference in the question right away.

A test case will not find the delivery-threshold problem, since it checks that a requirement is fulfilled. It is found by those who understand the user: the product manager, the analyst, UX research, a demo for the business, UAT, conversion metrics. A QA Engineer who asks in the requirements review "why exactly 1000?" contributes to validation before any code.

ActivityWhat it mostly is
Code review, static analysisVerification: code against standards and requirements
Unit and system tests against the specificationVerification
UAT, demo to users, betaValidation
Usability testingValidation
Requirements review with the businessBoth: consistency of the document and fit to the need

Limits and alternatives

  • Do not confuse the pair "verification/validation" with the pair "static/dynamic". Verification can be static (review) or dynamic (a test against the spec). Validation can also be static: a requirements review with stakeholders. People often say "verification is static, validation is dynamic", which is only a typical tendency, not a rule.
  • The V-model shows verification and validation separately: each development level has a matching test level. Mnemonic: verification asks "right?", validation asks "the right thing?".
  • In Agile the line blurs: a demo every sprint and constant feedback make validation part of every iteration rather than a final stage.

Common mistakes

  • Assuming green tests against the spec mean success. They prove conformance to the spec, not the usefulness of the product.
  • Swapping the terms. Mnemonic: "building it right" is verification, "building the right thing" is validation.
  • Thinking validation starts only with UAT. Questions to the requirements, prototypes and demos give earlier validation and cheaper fixes.
  • Not asking "why". A requirement without a goal and a user gives no material for validation.

Check yourself

A developer implemented a price filter as the spec says, but users cannot find a product by range. Which check passed and which did not?

Answer

Verification passed: the behaviour matches the spec. Validation did not: the filter does not let people do what it exists for. The cause is likely in the requirements, so go back to the analyst and users, not only to the code.

Is it true that verification is always static and validation is always dynamic?

Answer

No. That is only a typical tendency. A test against the specification is dynamic verification, while a requirements review with stakeholders is static validation. The difference is in the question we answer, not in whether we run code.

In an interview. Junior: Verification answers whether we build the product right, that is whether it matches the specification. Validation answers whether we build the right product, that is whether it solves the user's problem. A product can fully match the requirements and still be useless. Middle/Senior: I do not tie them to static or dynamic: these are different questions. Tests against the spec give verification, and I strengthen validation with questions to the requirements at review, demos for the business and UAT. Example: free delivery from 1000 UAH was implemented exactly per spec, but the threshold did not match the market, which was a validation failure.

What are SDLC and STLC?

SDLC is the life cycle of developing a product from requirements to maintenance, and STLC is the sequence of testing activities inside it. A common STLC model has six steps: requirements analysis, planning, test design, environment setup, execution and closure, each with entry and exit criteria. STLC is not a stage after coding: requirements analysis and test design start earlier, and in Agile they repeat in every iteration.

QA Fundamentals · Testing basics

Does testing start only when development is done? Then why do they ask about STLC?

A newcomer pictures a tester's job like this: developers finished, a build arrived, I test. In a real team, by that moment the QA Engineer has already read the requirements, asked about risks, written cases and prepared data. That is why two terms exist: SDLC describes how a product is born, STLC describes what testing does in the meantime. The lesson shows how they connect and why STLC is not a "stage after code".

How it works

SDLC (Software Development Life Cycle) is the development life cycle: requirements, design, development, testing, release, maintenance. It is organised by a model: sequential (Waterfall, V-model), iterative or incremental. Agile is not another model in this row but a set of values and practices applied to iterative development.

STLC (Software Testing Life Cycle) is the sequence of testing activities inside SDLC. A common model has six steps: requirements analysis, planning, test design, environment setup, execution with defect reports, closure with a report. Each step has entry and exit criteria: when it can start and when it counts as done.

What testing does at each stage

SDLCSTLCRequirementsAnalyse reqsDesignPlan, test designDevelopmentEnvironment, dataTestingExecute, defectsReleaseReport, lessons
Figure 1. STLC runs in parallel with SDLC: requirements analysis and planning start long before the first build.

Why STLC is not "after code". The earlier testing gets the requirements, the earlier it finds contradictions in them, and the cheaper they are to fix. Test design and data preparation do not depend on finished code: they can be done while developers write. What remains for the execution stage is what really needs a build.

Where testing sits in time

Sequential model

Phases follow one another. Testing waits for finished development, and feedback about requirements arrives late.

Iterative, Agile

A short cycle of requirements, development, test, release repeats every sprint. STLC happens in miniature in each iteration.

Figure 2. SDLC models change not the set of testing activities but how early and how many times they happen.

In ISTQB CTFL 4.0 the same chain is called the test process, and the groups of activities there are different: planning, monitoring and control, analysis, design, implementation, execution, completion. They can run iteratively or in parallel and not necessarily in sequence. For an interview it helps to know both versions: the six-step "STLC" from vacancies and the seven ISTQB activity groups.

Example: a "Promo code" story in a sprint

The task: the user enters a promo code in the cart and gets a discount. Here is what testing does while the story moves:

STLC stepConcrete action
Requirements analysisQuestions to the analyst at grooming: do discounts stack, what about a code valid until midnight, is delivery counted.
PlanningWhat is in scope (cart, payment), what is not (admin), which risks (rounding), who tests and when.
Test designCases by classes and boundaries: valid, expired, unknown code, minimum amount. Prepare accounts and codes.
EnvironmentA build on the test environment, test promo codes, a payment sandbox.
ExecutionRun cases, bug reports, recheck fixes, regression of the cart.
ClosureA report: what passed, what is open, what remains by risk. Lessons go to the retrospective.

Entry and exit criteria are fixed at planning. A minimal example:

Entry: requirements agreed, build on the test environment,
       test promo codes created
Exit:  all P1 cases passed, no open critical/major defects,
       cart regression is green

Limits and alternatives

  • The six-step STLC is a teaching model, not a standard. In a team the set of steps depends on the process: where there is no separate "environment setup" stage, the pipeline plays its role.
  • In Agile STLC does not disappear but compresses: requirements analysis is grooming, planning is sprint planning, closure is the retrospective and the demo.
  • Testers do not do every step. DevOps often prepares the environment and data depends on the backend. Responsibility for a step and its execution may belong to different people.

Common mistakes

  • Testing only after development. Requirements let you find defects before code, and without that testing merely catches expensively what could have been prevented.
  • Not fixing entry and exit criteria. Then "ready for testing" and "can release" mean different things to different people.
  • Confusing SDLC with Scrum or Agile. SDLC is the general cycle, Scrum and Waterfall are ways to organise it.
  • Skipping closure. Without a report and lessons the same problems return in the next release.

Check yourself

The build is not ready yet, development is in progress. Which STLC steps can a tester already do?

Answer

Requirements analysis, planning and test design, plus data preparation. They depend on the requirements, not on the code. Test execution on the build stays for later, but these early steps are what make it fast.

Why does nobody in Agile say testing is a "stage after development"?

Answer

Because the cycle of requirements, development, test repeats every sprint, and STLC runs in each iteration in parallel with development: questions to requirements at grooming, cases before the story is ready, regression every time. There is no separate stage at the end.

In an interview. Junior: SDLC is the product development life cycle from requirements to maintenance. STLC is the testing life cycle inside it: requirements analysis, planning, test design, environment setup, execution and closure with a report. Middle/Senior: STLC is not a stage after code: requirements analysis and test design start earlier. In ISTQB it is the test process with activity groups of planning, monitoring and control, analysis, design, implementation, execution and completion, which can be iterative. In Agile I go through these steps in every sprint and fix entry and exit criteria at planning.

What test levels are there?

The test levels are component (unit), integration, system and acceptance: each covers a larger part of the system and looks for its own class of defects. Developers write unit tests, integration tests check how components interact, system tests check the whole system against requirements, and acceptance tests judge readiness for the business. A defect is sought at the lowest level where it is visible, as higher levels cost more.

QA Fundamentals · Testing basics

The discount is calculated correctly, yet the cart does not show it. Which level should have caught this?

The discount function has unit tests and they pass. The cart was tested too. Yet a user in production sees the full price: the cart module called the calculation with the wrong amount format. Neither test set was wrong, the error lived at the seam. Test levels exist so that each class of error is searched where it is cheapest. The lesson covers the four levels, what each looks at and why one "big test" does not replace them.

How it works

A test level is a group of activities that are organised and managed together and relate to one scope of the system. The scope grows from part to whole:

Levels by scope

Componentfunction, classIntegrationmodules, API, DBSystemwhole systemAcceptancereadiness
Figure 1. The four levels usually named in interviews. ISTQB CTFL 4.0 describes five: component, component integration, system, system integration and acceptance.
  • Component (unit) checks a single function or class, usually in isolation with dependencies replaced. Developers write it. It is fast and points exactly at the place of failure.
  • Integration checks interaction: module with module, service with database, API with a queue. In ISTQB CTFL 4.0 these are two separate levels: component integration (interaction of components inside the system) and system integration (interfaces with external systems and services), which comes after system testing.
  • System checks the system as a whole against requirements: end-to-end scenarios, non-functional properties. The main zone of a QA Engineer.
  • Acceptance answers whether the product is ready for the business or the customer: UAT, operational, contractual and regulatory acceptance, alpha and beta.

Why there are several levels. An error in a function gives a clear red test in a second, an error at a seam needs two parts of the system, and an error in a business process shows only on the whole. The higher the level, the slower, costlier and harder it is to find the cause of a failure. So lower levels should find most defects, and higher ones only what is visible only there.

Example: payment with a promo code on every level

LevelWhat is checked in the scenarioTypical performer
ComponentThe discount function: 1000 with a 10% code gives 900, zero amount and negative percentage are handled.Developer
IntegrationThe cart calls the discount API with the right amount format and the result is stored in the order database.Developer, QA Engineer
SystemFrom the catalogue to payment in the UI: the code is entered, the discount shows in the total, the order is created.QA Engineer
AcceptanceThe business checks that the discount rules match the campaign and accepts the feature.Business, customer

The mismatch from the start of the lesson is found by integration testing: that is where the amount format between the cart and the discount service is checked. A system test could also see it, but diagnosis would take longer.

The test pyramid

E2EfewAPI, integrationmoreUnitthe most, fast and cheap
Figure 2. The pyramid is about the balance of automation: the higher, the slower, costlier and more brittle, so there are few such tests.

Limits and alternatives

  • A level answers "where", while a type of testing (functional, performance, security) answers "what". Different types can run on each level: a unit test is functional, while load is usually measured at the system level.
  • The pyramid is a guide, not a law. For UI-heavy products a "trophy" with a larger share of integration tests is sometimes recommended. The principle is the same: most checks should sit where they are cheap and precise.
  • Levels are not always clearly separated: in microservices the difference between integration and system depends on what you call the system. Agree on terms in the team.

Common mistakes

  • Relying only on e2e. Tests are slow and flaky, and a failure does not show the cause. This is the "inverted pyramid".
  • Assuming developers' unit tests replace system tests. They do not see errors at seams and in scenarios.
  • Confusing system and acceptance. System checks requirements, acceptance answers whether the product is ready for the business.
  • Duplicating checks on every level. What a unit test covers is not repeated by a dozen e2e tests: that only costs more.

Check yourself

The orders service stores the amount in cents, while the payments service expects hryvnias. Unit tests of both services are green. At which level is this found and why not earlier?

Answer

At integration level. Each unit test checks its own part in isolation, with its own assumptions about the format. The mismatch is visible only where the services really exchange data.

How does system testing differ from acceptance testing?

Answer

System testing checks the whole system against requirements and is run by the team. Acceptance testing answers whether the product is ready for the business or the customer: UAT, operational readiness, contractual or regulatory compliance. Its goal is a decision to accept, not finding every defect.

In an interview. Junior: The levels are component, integration, system and acceptance testing. Developers write unit tests, integration testing checks how components interact, system testing checks the whole system against requirements, and acceptance testing answers whether the product is ready for the business. Middle/Senior: A level answers "where" and a type answers "what". The pyramid says there should be more checks where they are fast and precise: many unit, fewer integration, few e2e. I look for each class of defect at the lowest level where it is visible instead of duplicating checks on top. Example: an amount format mismatch between the cart and the discount service is found by an integration test.

How does static testing differ from dynamic testing?

Static testing checks work products without running code, while dynamic testing runs the system and compares behaviour with the expected one. Static testing finds a defect in a requirement or code directly and earlier, while dynamic testing observes a failure that must then be traced to a defect. Neither replaces the other: performance, races and behaviour on real data show only at run time.

QA Fundamentals · Testing basics

There is no code yet, and you have already found a bug. Is that even testing?

At grooming you read the requirements and notice: on the registration screen the password is up to 20 characters, on the change-password screen up to 64. There is no build, no test has run, and a defect is already found. That is static testing. Vacancies often ask to "validate requirements and provide early feedback", and this is exactly it. The lesson explains how static differs from dynamic, what each finds and why one does not replace the other.

How it works

The difference is one thing: is the program run. Static testing checks work products without executing code: requirements, mock-ups, test cases, the code itself. This means reviews (from informal to inspection) and static analysis by tools. Dynamic testing runs the system with input data and compares behaviour with the expected.

To see why they find different things you need the chain: a person makes an error, it leaves a defect (bug) in an artifact, and only when the code is executed can the defect show up as a failure.

What each approach sees

ErrorDefectFailurea person errssits in an artifactseen at run timestaticreads the artifactdynamicruns the code
Figure 1. Static finds the defect itself, dynamic observes a failure and the defect still has to be found by analysis.

Hence the advantage of static: it finds the defect directly, without a long analysis of a failure, and does it earlier, when the fix is cheap. The drawback: it does not see behaviour that arises only at run time (races, performance, interaction with real data). Dynamic sees behaviour, but only on the scenarios run, and leaves the path from failure to defect to the developer.

The difference in the price of a finding shows on the example we go through below: contradicting password limits on two screens.

The same defect, two moments of discovery

Static, at grooming

Different password limits are seen in the text of the requirements. The fix: one sentence, one conversation, one line in the spec.

Dynamic, on a build

The bug is seen as a failure: a 40-character password is accepted on change and login then fails. You must find the cause, fix code and tests.

Figure 2. Both approaches would find the problem, but a defect in text is cheaper than a failure in a build.

Example: a contradiction in password requirements

A requirements review needs no code. Here are two fragments found side by side:

Registration:    password 8 to 20 characters
Change password: password 8 to 64 characters

The reviewer asks: which limit is right, and what happens to a user who registered with a 20-character password and then changed it to 40? If this is not found now, the defect goes into code, then into test cases, and someone finds it as a failure in production or through a bug report "cannot log in after changing password". To make the review systematic and not accidental, a checklist is used:

[ ] The requirement is unambiguous: no two readings
[ ] The requirement is testable: a number, limit or criterion
[ ] It does not contradict others (screens, API, documents)
[ ] Negative cases and errors are described
[ ] There is an acceptance criterion

ISTQB review types differ in formality: informal (a colleague looks without a process), walkthrough (the author leads participants through the document), technical review (experts look for discrepancies and assess decisions), inspection (the most formal: roles, metrics, checklists). Static analysis works on code automatically: linters, type checking and security tools find unreachable code, undefined variables or dangerous patterns without running the program.

Limits and alternatives

  • Static does not replace dynamic. It will not show whether a page is fast, whether it breaks under simultaneous actions or whether code fits real data.
  • Dynamic does not replace static. A bug in requirements that was missed at review lands in code, and a test written from those requirements will not notice it.
  • Reviews need time and agreement. Without a checklist and clear roles they turn into "take a look, is everything fine".
  • Automatic static analysis gives false positives. Rules are tuned for the project, because noise teaches the team to ignore results.

Common mistakes

  • Treating only running the program as testing. Reviewing requirements and mock-ups is testing too, and often the most profitable.
  • Reading requirements for a "general impression". Without a checklist only obvious errors are found.
  • Confusing static analysis with dynamic. A linter does not run code and a test does: different tools with different findings.
  • Not recording review findings. Defects in documents are also filed and closed, or they get forgotten.

Check yourself

A linter reports an unused variable in code nobody has run yet. Is that static or dynamic testing? Was a defect or a failure found?

Answer

Static: the code was not executed. A defect in the code was found, not a failure, because a failure happens only at execution. Such findings are cheap and come before the first run.

What does dynamic testing add that even a perfect requirements review will not give?

Answer

Observation of real behaviour: performance, module interaction, races, behaviour on real data and environment. These appear only at execution, so a review will not show them.

In an interview. Junior: Static testing is done without running the program: reviews of requirements, design and code, and static analysis. Dynamic testing runs the system and checks behaviour. Static finds defects directly and earlier. Middle/Senior: Static sees a defect in an artifact, dynamic observes a failure and then the defect still has to be found by analysis. So I join requirements reviews with a checklist: ambiguity, testability, contradictions, negative cases. Example: different password limits on two screens were found at grooming, not on a build. Dynamic is still needed, because only it shows performance and interaction.

Unit, integration and e2e tests: what is the difference?

A unit test checks one function in isolation, an integration test checks the seams between components, and e2e runs a full user scenario. The wider the scope, the slower and costlier the test and the less precisely a failure shows its cause, so unit tests are the most numerous and e2e is kept for critical paths. The pyramid is a guide, not a law.

QA Fundamentals · Testing basics

All unit tests are green, and the user cannot apply a promo code. Where should this bug have been caught?

The project has a thousand unit tests, a hundred integration tests and five e2e tests. After the release the promo code is not applied. The developer says the discount function is tested, QA says there is no e2e test for the promo code, and the tech lead asks at which level this should have been caught and why exactly there. This lesson compares the three kinds of automated checks, shows what each of them sees and explains why one big suite does not replace the others.

How it works and why. The three kinds differ in scope, that is, in how much of the system takes part in the check. A unit test (component testing in ISTQB terms) checks one function or class in isolation: dependencies are replaced with stubs, so the test is fast and points exactly at the place of failure. An integration test checks how several components interact through their interfaces: a service and a database, a front end and an API, our code and someone else's service. An e2e test runs a full user scenario on a deployed system, usually through the interface. In the ISTQB CTFL 4.0 syllabus "e2e" is not a separate level: such scenarios usually belong to system testing (end-to-end scenarios with external systems also to system integration testing), and in practice the word e2e is used for any end-to-end test.

The wider the scope, the longer a test runs, the more factors can break it and the less precisely a failure points at the cause. Hence the test pyramid: most checks are placed where they are cheap and precise, and only a few end-to-end scenarios for critical paths are left at the top.

Unit, integration and e2e in short

KindWhat it checksSpeed and precision
UnitOne function or class, dependencies stubbedMilliseconds, a failure points at a line of code
IntegrationA seam between components: API and DB, service and neighbourSeconds, a failure points at the seam
E2EA full user scenario on a deployed systemSeconds to minutes, a failure says "something in the chain"

Example: a promo code that is not applied. One scenario, three possible causes, and each is found by its own kind of test:

CauseWho finds itWhy exactly this one
The discount function returns 990 instead of 900 for an amount of 1000 and a 10 % codeUnitThe error is in the logic itself, no other parts are needed
The cart sends the code in a promo field, while the discount service expects promoCode and answers "no discount"IntegrationEach side is right by its own assumption, the error is only at the seam
An overlay in the UI covers the "Apply" button in the browserE2EThe failure shows only in the real interface on a deployed system

No kind replaces the rest: unit tests pass even when the button is unreachable, and an e2e test can fail with no hint of the actual cause. A sensible mix is this: the discount logic is covered exhaustively by unit tests, the exchange format between services by a few integration tests, and one scenario "from the cart to payment with a promo code" is left in e2e.

Limits and alternatives. The pyramid is a guide, not a law: for applications where almost all logic sits in integration with a database or third-party APIs, teams use another ratio (often drawn as a "trophy" with a larger share of integration tests). The borders between the kinds depend on what a team counts as a component and as a system, so the names are worth agreeing. A unit test with a stubbed database and a test with a real database in a container belong to different kinds, even though teams often give both the same name, "unit" or "integration". The quality of e2e tests depends on stable locators and controlled data, otherwise such tests become a source of flakiness.

Common mistakes.

  • Covering everything with e2e only (an "inverted pyramid"): the suite is slow, flaky and a failure is hard to localise.
  • Believing that high unit coverage guarantees the system works: unit tests do not see seams and scenarios.
  • Mocking every neighbour and calling it an integration test: then the seam is not checked.
  • Duplicating the same check at all levels: it costs more without new findings.
  • Calling any UI test e2e: it is end-to-end only when it covers the whole user path.

Check yourself

The order service stores the amount in cents, while the payment service expects the main currency unit. Unit tests of both services are green. Which kind of test finds the mismatch most cheaply?

Answer

An integration test: it checks the data exchange between the two services with the real (or contract) format. Unit tests check each service against its own assumptions, and an e2e test would find it later and with no pointer to the cause.

A team has 300 e2e tests and almost no unit tests. What follows from this and what should be done?

Answer

The pyramid is inverted: the suite is slow, flaky and failures are hard to diagnose. Logic and edge cases move down to the unit level, the exchange format between components to the integration level, and only critical scenarios stay in e2e. Do not delete e2e tests without a replacement: first check that the lower levels cover the same things.

In an interview. Junior: A unit test checks one function in isolation, an integration test checks how components interact, and an e2e test runs a full user scenario through the system. Unit tests are the most numerous and e2e the fewest, because they are slow and expensive. Middle/Senior: I choose the kind of test by where the error can live: logic goes to unit, seams and exchange formats to integration, the critical user path to e2e. In ISTQB terms unit is component testing, and e2e is only a way of testing the system level. I treat the pyramid as a guide: the ratio depends on the product, but an inverted pyramid where everything rests on e2e gives a slow and flaky suite.

What are the objectives of testing?

The objectives of testing are to find defects, assess quality, reduce risk, confirm requirements and inform the release decision. The objective depends on the context: component testing aims at finding failures and coverage, acceptance testing at confidence that the system works as expected. Testing only shows the presence of defects, so a report states what is covered and what is not.

QA Fundamentals · Testing basics

The test plan says "find all the bugs". Why is that a poor objective for testing?

A manager asks to write "find all the bugs" into the test plan as the objective. The tester writes it, the run finishes, and after the release users find bugs. The interview question "what are the objectives of testing" looks like something to memorise, but behind it is another one: what exactly do you consider the result of your work. This lesson lays out the objectives per ISTQB CTFL 4.0, shows why there are several, and how they change with the context.

How it works

ISTQB CTFL 4.0 lists the typical objectives of testing. They are easier to remember grouped by the question each one answers:

QuestionObjectiveExample of an action
What is broken?Trigger failures and find defectsBoundary amounts in a fee calculation
Is it well described?Evaluate work products: requirements, user stories, design, codeReviewing requirements before development starts
Does it meet the requirements?Verify that specified requirements are fulfilled, including contractual, legal and regulatory ones; ensure the required coverageEvery requirement has at least one case
Is it what is needed?Validate that the test object is complete and works as stakeholders expectRunning a scenario together with the customer
How risky is it?Reduce the risk of inadequate qualityMore checks where a failure costs more
What to decide?Give stakeholders information for informed decisions and build confidence in the qualityA report before the "ship or not" decision

Why there are several. Testing does not improve the product by itself: a developer fixes the defect and a person decides on the release. That is why the thread running through all the objectives is information. Finding defects is only one way to get it, while checking requirements and assessing risk give other parts of the picture. A team that knows only about finding bugs reports the number of defects found, while a team that knows all the objectives answers the questions the business actually brings.

The objectives depend on the context. At component level the main ones are to find as many failures as possible, so that defects are found and fixed as early as possible, and to increase code coverage. In acceptance testing the main ones are to confirm that the system works as expected and satisfies the requirements, and to give confidence that it can be accepted. In a regulated field, compliance with a law or a contract becomes an explicit objective.

Example: from "find all the bugs" to release objectives

Before: one phrase that can be neither achieved nor verified. After: four objectives, each of which can be proved or disproved.

Before:
  Test objective: find all the bugs.

After (a release with a changed fee calculation):
  1. Find defects in the fee calculation: equivalence classes
     and boundary amounts, two currencies.
  2. Confirm requirements REQ-12..18: each has a case, the result
     for each is known.
  3. Assess the residual risk in payments and report before the
     "ship or not" decision: what is covered, what is not, what is open.
  4. Review the requirements for ambiguity before development starts.

Why this version is right and the first is not. "Find all the bugs" contradicts the principle that exhaustive testing is impossible: an objective that cannot be reached gives no completion criterion. The new objectives are tied to a result visible in the report and to the decision that follows from it.

Limits and alternatives

  • Testing and debugging are different activities. Testing shows a failure, debugging finds the cause in the code and fixes it. So "fix the bugs" is not an objective of testing.
  • The objectives of testing are not the same as the goals of QA as a process approach. In ISTQB, testing is part of quality control, while defect prevention belongs to the process as a whole.
  • Not all objectives matter equally in every project. In a startup with frequent releases, fast feedback and risk come first, in a banking product it is compliance and the evidence trail.

Common mistakes

  • The objective "find all the bugs". It is unreachable, and the absence of the goal in the report reads as "we did not do enough". Consequence: pressure on a number instead of on information.
  • The objective "prove that it works". Testing shows the presence of defects, not their absence. Consequence: cases are chosen to succeed, and bugs remain.
  • Measuring testing by the number of bugs found. Consequence: trivia is inflated, or the absence of findings is not reported, although it is information too.
  • Forgetting the objectives before testing starts. Without them there is no completion criterion: testing goes on until the time runs out.

Check yourself

A report says: "All 120 cases passed, there are no critical bugs". Which objectives does it really cover and which not?

Answer

It covers verification of the requirements within those cases and gives information for the decision. It does not prove that there are no defects and says nothing about risk where there are no cases. It is more honest to write what is covered, what is not and what the residual risk is, instead of "there are no bugs".

How do the main objectives of component testing and acceptance testing differ?

Answer

In component testing the main ones are to find as many failures as early as possible and to increase code coverage, because fixing is cheapest here. In acceptance testing they are to confirm that the system works as stakeholders expect and to give confidence for accepting it. So the same testing has different objectives depending on the level and context.

In an interview. Junior: The objectives of testing are to find defects, assess quality and reduce risk, confirm that the requirements are met and give information for the release decision. Middle/Senior: I add that the objectives depend on the context: at component level it is finding failures and coverage, in acceptance it is confidence and compliance. I do not promise to "find all the bugs", I formulate verifiable release objectives and show in the report what is covered, what is not and what the residual risk is.