Introduction to Software Testing
Software testing checks that a product works as expected and finds problems before users do. Every serious software team relies on it.
On this page · 5 min · Beginner
On this page
- Learning objectives
- Explanation
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Beginner
- Updated
- Oct 29, 2026
Related tutorials
Learning objectives#
- Explain what testing is and why it is needed
- Distinguish error, defect and failure
- Describe a tester’s daily work
- Understand the cost of finding bugs late
Explanation#
Testing is evaluating software to find defects and to gain confidence that it meets requirements and user needs.
A person makes an error (mistake) → it introduces a defect (bug) in the code or document → when executed it may cause a failure (wrong behaviour seen by users).
Testers read requirements, design test cases, execute them, report bugs, retest fixes and communicate quality risks to the team.
The later a bug is found, the more it costs: a requirement mistake caught in review costs minutes; the same bug in production can cost customers and money.
Code example: Error → defect → failure#
Requirement: "Orders above ₹999 get free delivery."
Error Developer misreads it and writes: if (total > 1000) freeDelivery = true;
Defect The condition excludes totals from ₹999.01 to ₹1000.
Failure A customer with a ₹1000 cart is charged ₹49 delivery and complains.
Test that finds it: cart total = ₹1000 → expected: free delivery → actual: ₹49 charged
A single boundary test catches the defect before release instead of a customer finding it.
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- The requirement defines the expected behaviour.
- A human error creates a defect in the code.
- The defect causes a visible failure only for certain inputs.
- A well-chosen test input reveals it early.
Real-world use case#
An e-commerce QA engineer tests the checkout before each release so pricing and delivery rules are correct for every customer.
Common mistakes#
Good testing is planned: it is based on requirements, risks and proven design techniques.
Review requirements and designs early — the cheapest bugs to fix are the ones never coded.
Best practices#
- Understand the requirement before testing
- Think like a user and like an attacker
- Report clearly and politely
- Start testing activities early
Remember this#
Error (human) → defect (bug) → failure (visible).
Testing finds defects and builds confidence.
Earlier = cheaper.
Practice exercise#
Your task: For the rule “passwords must be 8–20 characters”, write three inputs you would test.
Show solution
7 characters (expect rejected), 8 characters (accepted), 21 characters (rejected)
Mini quiz#
What is a failure?
Want more? Practise all Manual Testing MCQs · Manual Testing interview questions
My notes#
Saved in this browser.