Testing fundamentals
What quality means, what QA, QC and testing are, and the principles behind every testing decision.
Software testing is the process of evaluating a product to find defects and to gain confidence that it does what users need. It can't prove that software is bug-free, but it can show where it isn't, and it gives the team the information needed to decide whether to release.
Quality is more than “no bugs”
A product can have zero known bugs and still be poor: slow, confusing or insecure. That's why quality is usually described through several characteristics.
| Characteristic | Question it answers | Example check |
|---|---|---|
| Functional suitability | Does it do the right things correctly? | Checkout calculates tax correctly |
| Performance | Is it fast and efficient enough? | Page loads in under 2 s on 4G |
| Usability | Can people use it easily? | A new user completes sign-up without help |
| Reliability | Does it keep working? | No data loss after a server restart |
| Security | Is data protected? | A user can't open another user's order |
| Compatibility | Does it work in its environment? | Works in the last two versions of major browsers |
| Maintainability | Can it be changed safely? | Code has tests and clear structure |
| Portability | Can it run elsewhere? | Installs on Windows and macOS |
QA, QC and testing
These three terms are often mixed up. Quality assurance (QA) is about the process: preventing defects through good practices such as reviews, standards and clear requirements. Quality control (QC) is about the product: checking that what was built meets the requirements. Testing is the main activity of QC: running the software, or examining its artifacts, to find problems.
Verification and validation
Verification asks “are we building the product right?” — does it match the specification? Validation asks “are we building the right product?” — does it actually solve the user's problem? A feature can pass verification perfectly and still fail validation because the specification itself was wrong.
Error, defect, failure
A person makes an error (a wrong assumption, a typo). The error leaves a defect (bug) in the code or documentation. When the defective code is executed under certain conditions, it causes a failure — visible wrong behaviour. Not every defect causes a failure: some sit in code that never runs.
Seven principles of testing
- Testing shows the presence of defects, not their absence. Passing tests reduce risk; they don't prove perfection.
- Exhaustive testing is impossible. We prioritise by risk instead of trying everything.
- Early testing saves time and money. Review requirements before code exists.
- Defects cluster. A few modules usually contain most bugs; look there harder.
- Tests wear out. Running the same tests again and again stops finding new bugs; update and vary them.
- Testing is context-dependent. A banking app and a mobile game need different approaches.
- Absence of errors is a fallacy. A bug-free product that doesn't meet user needs is still a failure.
Static and dynamic testing
Static testing examines artifacts without running the code: reviewing requirements, designs and code, or using static analysis tools. Dynamic testing executes the software. Static testing is cheap and finds problems early; dynamic testing finds problems that only appear at runtime. A healthy process uses both.