How Do You Write Good Test Cases with Examples?
Good test cases have one purpose, exact data, clear steps and a verifiable result. See the format, examples and weak versus strong wording.
48 posts about Software Testing: questions with answers, tutorials and articles, newest first.
Good test cases have one purpose, exact data, clear steps and a verifiable result. See the format, examples and weak versus strong wording.
A test plan states what will be tested, how, by whom and when it is done. See the key sections, a step list and a ready example to adapt.
Mutation testing changes your code on purpose and checks whether the tests notice. Learn how the mutation score exposes weak assertions that coverage hides.
Statement, branch and path coverage measure different things and need different numbers of tests. Compare them on one function and see how to measure them.
Error guessing uses experience and past defects to design tests for likely faults. See a checklist of common error patterns and a worked example.
Exploratory testing designs and runs tests at the same time, guided by a charter. Learn how to run a session, take notes and use heuristics.
Pairwise testing covers every pair of parameter values at least once, so a small suite finds most interaction bugs. See a worked example and a Python generator.
State transition testing derives tests from a model of states, events and transitions. See state tables, coverage levels and a login lockout example.
Decision table testing maps every combination of conditions to an expected action. Build the table, merge equal rules and derive one test per column.
Boundary value analysis tests the values at and around the limits of a range, where off-by-one bugs live. See the methods and a worked example with pytest.
Equivalence partitioning splits inputs into groups that behave alike and tests one value per group. See the steps, a worked example and its limits.
Manual and automated testing each fit different jobs. Compare costs and strengths, see a Playwright example and use a checklist to decide what to automate.
The testing pyramid says to write many fast unit tests, fewer integration tests and very few end-to-end tests. Learn why that shape gives faster, steadier feedback.
Functional testing checks what software does and non-functional testing checks how well it does it. See the main types, examples and how to plan both.
Learn how black box testing checks behaviour from the outside while white box testing uses the code, with examples, a comparison table and advice on mixing both.
The four levels of software testing are unit, integration, system and acceptance. See what each checks, who runs it and how the test pyramid fits in.
Verification checks you build the product right, validation checks you build the right product. Compare methods, timing and examples side by side.
The STLC organises testing into six phases from requirement analysis to cycle closure. See each phase, its outputs and its entry and exit criteria.
QA prevents defects through process, QC detects them in the product, and testing is the execution based technique of QC. Compare them with examples.
The seven ISTQB principles of software testing explained simply, with practical meaning for each and a checklist for your test plan.