{"id":58,"date":"2025-06-07T14:16:00","date_gmt":"2025-06-07T14:16:00","guid":{"rendered":"https:\/\/qaplaybook.com\/?p=58"},"modified":"2025-06-07T14:16:01","modified_gmt":"2025-06-07T14:16:01","slug":"test-design-techniques-equivalence-partitioning","status":"publish","type":"post","link":"https:\/\/qaplaybook.com\/index.php\/2025\/06\/07\/test-design-techniques-equivalence-partitioning\/","title":{"rendered":"Test Design Techniques \u2013 Equivalence Partitioning"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\ud83c\udfaf What Is Equivalence Partitioning?<\/h3>\n\n\n\n<p><strong>Equivalence Partitioning<\/strong> (also called <strong>Equivalence Class Partitioning<\/strong>) is a <strong>black-box test design technique<\/strong> that helps you reduce the number of test cases <strong>without losing coverage<\/strong>.<\/p>\n\n\n\n<p>The main idea:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>If a group of inputs is expected to be treated the same by the system, test just one value from that group.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddea Why Use Equivalence Partitioning?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Saves time by avoiding repetitive tests<\/li>\n\n\n\n<li>Ensures balanced coverage of valid and invalid inputs<\/li>\n\n\n\n<li>Ideal for input validation, form fields, and boundary conditions<\/li>\n<\/ul>\n\n\n\n<p>It\u2019s one of the <strong>core techniques covered in the ISTQB Foundation Level syllabus<\/strong> and is used by both manual and automation testers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udde9 How It Works<\/h2>\n\n\n\n<p>You divide all possible inputs into <strong>partitions<\/strong> or <strong>classes<\/strong> that are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Valid<\/strong> (the system should accept)<\/li>\n\n\n\n<li><strong>Invalid<\/strong> (the system should reject)<\/li>\n<\/ul>\n\n\n\n<p>Then, you test <strong>one value from each class<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcca Example: Age Input Field<\/h3>\n\n\n\n<p>Suppose a form accepts age between <strong>18 and 60<\/strong> (inclusive).<br>Let\u2019s define the equivalence classes:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Input Type<\/th><th>Partition<\/th><th>Example Value<\/th><\/tr><\/thead><tbody><tr><td>Valid<\/td><td>18 to 60<\/td><td>30<\/td><\/tr><tr><td>Invalid<\/td><td>Less than 18<\/td><td>16<\/td><\/tr><tr><td>Invalid<\/td><td>Greater than 60<\/td><td>65<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2705 You only need <strong>three tests<\/strong> to cover all logic:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A valid age (<code>30<\/code>)<\/li>\n\n\n\n<li>An invalid low value (<code>16<\/code>)<\/li>\n\n\n\n<li>An invalid high value (<code>65<\/code>)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcbb Real-Life Use Case<\/h3>\n\n\n\n<p><strong>System:<\/strong> Online banking login<br><strong>Input:<\/strong> 6-digit numeric PIN<br><strong>Rule:<\/strong> Must be exactly 6 digits, only numbers<\/p>\n\n\n\n<p><strong>Equivalence Classes:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 Valid: 6-digit number \u2192 <code>123456<\/code><\/li>\n\n\n\n<li>\u274c Invalid: Less than 6 digits \u2192 <code>123<\/code><\/li>\n\n\n\n<li>\u274c Invalid: Letters included \u2192 <code>12AB56<\/code><\/li>\n\n\n\n<li>\u274c Invalid: Empty input \u2192 <code>\"\"<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcd0 How to Apply in Your Test Cases<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Understand the requirements<\/strong> \u2013 what input is expected?<\/li>\n\n\n\n<li><strong>Identify equivalence classes<\/strong> \u2013 both valid and invalid<\/li>\n\n\n\n<li><strong>Choose one value<\/strong> from each class<\/li>\n\n\n\n<li><strong>Write a test case<\/strong> for each value<\/li>\n\n\n\n<li>(Optional) Combine with <strong>Boundary Value Analysis<\/strong> for edge-case precision<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Benefits of Equivalence Partitioning<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reduces total number of test cases<\/li>\n\n\n\n<li>Improves testing efficiency<\/li>\n\n\n\n<li>Easy to apply for input fields and forms<\/li>\n\n\n\n<li>Helps identify gaps in requirements<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd01 Combine With: Boundary Value Analysis (BVA)<\/h2>\n\n\n\n<p>While Equivalence Partitioning tests the <em>middle<\/em> of partitions, <strong>Boundary Value Analysis<\/strong> focuses on the <em>edges<\/em> (like 17, 18, 60, 61 in the age example).<\/p>\n\n\n\n<p>\ud83d\udccc Use them <strong>together<\/strong> for thorough coverage.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcdd Sample Test Case Template<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Test Case ID<\/th><th>Input<\/th><th>Expected Result<\/th><th>Class Type<\/th><\/tr><\/thead><tbody><tr><td>TC001<\/td><td>30<\/td><td>Accepted<\/td><td>Valid<\/td><\/tr><tr><td>TC002<\/td><td>16<\/td><td>Rejected \u2013 Below Minimum<\/td><td>Invalid<\/td><\/tr><tr><td>TC003<\/td><td>65<\/td><td>Rejected \u2013 Above Maximum<\/td><td>Invalid<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcda Summary<\/h2>\n\n\n\n<p><strong>Equivalence Partitioning<\/strong> helps you:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Test smarter, not harder<\/li>\n\n\n\n<li>Catch input validation bugs early<\/li>\n\n\n\n<li>Create structured, maintainable test cases<\/li>\n<\/ul>\n\n\n\n<p>It\u2019s a <strong>must-know technique<\/strong> for anyone preparing for ISTQB or improving their manual\/automation test strategy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udfaf What Is Equivalence Partitioning? Equivalence Partitioning (also called Equivalence Class Partitioning) is a black-box test design technique that helps you reduce the number of test cases without losing coverage. The main idea: If a group of inputs is expected to be treated the same by the system, test just one value from that group. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-test-management","no-thumb"],"_links":{"self":[{"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":1,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qaplaybook.com\/index.php\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}