Black-Box Techniques
Design tests from the specification: partitions, boundaries, decision tables, and states.
4 min read4 মিনিটে পড়া যায়13 min read13 মিনিটে পড়া যায় · 6 sections6টি সেকশন · 6 sources6টি সোর্স · updated Oct 2026আপডেট: Oct 2026
Boundary values catch the off-by-oneবাউন্ডারি মান off-by-one ধরে ফেলে
Split a field into partitions, test its boundaries with 2-value then 3-value BVA, and see a wrong condition slip past or get caught.একটা ফিল্ডকে পার্টিশনে ভাগ করুন, 2-value আর 3-value BVA দিয়ে বাউন্ডারি টেস্ট করুন, আর দেখুন ভুল শর্ত পার পেয়ে যায় নাকি ধরা পড়ে।
You’ll learnআপনি শিখবেন
- How partitions give one test eachপার্টিশন কীভাবে প্রতিটায় একটা টেস্ট দেয়
- Which values are boundary valuesকোন মানগুলো বাউন্ডারি মান
- 2-value vs 3-value BVA2-value বনাম 3-value BVA
- Why the neighbour x = 9 finds the bugপ্রতিবেশী x = 9 কেন বাগ ধরে
Test Techniques Overview
Test Techniques are called as Test methods.
There are mainly 3 types of test techniques:
1. Blackbox or specification based testing:
Testing the software based on requirements without knowing the internal code structure.
Example: For a login page, tester checks whether valid username/password allows login and invalid credentials show an error.
2. Whitebox or clearbox or structural or glassbox testing
Testing the software by understanding the internal code, logic, conditions, loops, and structure.
Example: Developer/tester checks the login function code to verify all if-else conditions for valid user, invalid password, blocked user, and empty fields are tested.
3. Experienced based testing:
Testing based on tester's experience, intuition, domain knowledge, and past defect patterns.
Example: Tester checks if the password field accepts spaces, copy-paste, emojis, very long input, or SQL injection because similar bugs were found before.
Blackbox Testing Methods
Black-box test techniques, also called specification-based techniques, focus on the specified behavior of the software, not its internal structure. This means test cases don't depend on how the software is built. If the behavior remains the same, the test cases are still useful even if the implementation changes.
Blackbox has 4 types of test techniques:
- Equivalence Partitioning
- Boundary Value Analysis (BVA)
- Decision Table Testing
- State Transition Testing
Testers use test techniques in two activities. Source 1সোর্স 1 In test analysis, a technique helps to decide what to test. Source 1সোর্স 1 In test design, it helps to decide how to test. Source 1সোর্স 1 A technique gives the tester a systematic way to build a set of test cases that is small but enough. Source 1সোর্স 1 The glossary describes a test technique as a procedure that defines test conditions, designs test cases, and specifies test data. Source 2সোর্স 2
The syllabus sorts test techniques into three groups. Source 1সোর্স 1
| Group | Based on | Other name | What follows |
|---|---|---|---|
| Black-box | The specified behavior of the test object, without its internal structure Source 1সোর্স 1 | Specification-based Source 1সোর্স 1 | After a change of the implementation, the test cases still work if the required behavior is the same. Source 1সোর্স 1 |
| White-box | The internal structure and processing of the test object Source 1সোর্স 1 | Structure-based Source 1সোর্স 1 | Testers can create the test cases only after the design or the implementation exists. Source 1সোর্স 1 |
| Experience-based | The knowledge and experience of the testers Source 1সোর্স 1 | None given | The results depend heavily on the skill of the tester. The group complements the other two. Source 1সোর্স 1 |
The syllabus names four black-box techniques: equivalence partitioning, boundary value analysis, decision table testing, and state transition testing. Source 1সোর্স 1 The next topics cover them in this order.
The ISTQB syllabus and glossary do not define the term "test method".
The tutorial's own explanation
The notes use "test method" as another name for "test technique". ISTQB uses "test technique". Use that name when you talk about ISTQB.
সহজ English
Test techniques are also called test methods. There are 3 main types:
- Black-box (specification-based). You test from the requirements, without knowledge of the internal code. Example: a valid login works, and wrong credentials show an error.
- White-box (also clear-box, structural, or glass-box). You test with knowledge of the code, logic, conditions, loops, and structure. Example: tests cover every
if-elsecondition of the login function, such as a blocked user or empty fields. - Experience-based. You test from your experience, intuition, domain knowledge, and past defect patterns. Example: you try emojis, very long input, or SQL injection in the password field, because of similar past bugs.
Black-box tests do not depend on how the software is built. They stay useful after a code change, if the behavior stays the same.
Black-box has 4 techniques: Equivalence Partitioning, Boundary Value Analysis (BVA), Decision Table Testing, and State Transition Testing.
A test technique helps to decide what to test (test analysis) and how to test (test design). It gives a systematic way to make a small but sufficient set of test cases Source 1সোর্স 1. The glossary says a test technique defines test conditions, designs test cases, and specifies test data Source 2সোর্স 2.
The syllabus has three groups Source 1সোর্স 1:
- Black-box (specification-based) uses the specified behavior, not the internal structure. The tests survive code changes if the required behavior stays.
- White-box (structure-based) uses the internal structure. These tests need the design or the code first.
- Experience-based uses tester knowledge and experience. The results depend heavily on skill.
The four black-box techniques are equivalence partitioning, boundary value analysis, decision table testing, and state transition testing Source 1সোর্স 1.
The ISTQB syllabus and glossary do not define the term "test method". In the tutorial's own explanation, it means "test technique".
বাংলা ব্যাখ্যা
Test technique-কে test method-ও বলা হয়। Test technique মূলত 3 ধরনের:
- Black-box বা specification-based testing: internal code structure না জেনে requirement অনুযায়ী test করা। উদাহরণ: login page-এ সঠিক username/password দিলে login হয়, আর ভুল credential দিলে error দেখায় কি না।
- White-box (clear-box, structural বা glass-box নামেও পরিচিত): internal code, logic, condition, loop আর structure বুঝে test করা। উদাহরণ: login function-এর valid user, invalid password, blocked user আর empty field-এর সব
if-elsecondition test হয়েছে কি না। - Experience-based testing: tester-এর অভিজ্ঞতা, intuition, domain knowledge আর আগের defect pattern-এর ভিত্তিতে test করা। উদাহরণ: আগে একই রকম bug পাওয়া গেছে বলে password field-এ space, copy-paste, emoji, লম্বা input বা SQL injection নেয় কি না দেখা।
Black-box technique software-এর specified behavior দেখে, internal structure নয়। Behavior একই থাকলে implementation বদলালেও test case কাজে লাগে।
Black-box-এর 4টি technique: Equivalence Partitioning, Boundary Value Analysis (BVA), Decision Table Testing এবং State Transition Testing।
Tester-রা দুটি কাজে test technique ব্যবহার করেন: test analysis-এ কী test করবেন, আর test design-এ কীভাবে test করবেন, তা ঠিক করতে Source 1সোর্স 1। Technique একটি systematic উপায় দেয়, যাতে ছোট কিন্তু যথেষ্ট test case-এর set তৈরি হয় Source 1সোর্স 1। Glossary অনুযায়ী test technique এমন একটি procedure, যা test condition ঠিক করে, test case design করে এবং test data নির্দিষ্ট করে Source 2সোর্স 2।
Syllabus test technique-কে তিনটি group-এ ভাগ করে Source 1সোর্স 1:
- Black-box (specification-based): internal structure ছাড়া specified behavior-এর ভিত্তিতে। Implementation বদলালেও required behavior একই থাকলে test case কাজ করে।
- White-box (structure-based): internal structure আর processing-এর ভিত্তিতে। Design বা implementation তৈরি হওয়ার পরেই test case বানানো যায়।
- Experience-based: tester-দের knowledge আর experience-এর ভিত্তিতে। ফলাফল tester-এর দক্ষতার ওপর অনেক নির্ভর করে। এটি বাকি দুটির পরিপূরক।
চারটি black-box technique হলো equivalence partitioning, boundary value analysis, decision table testing এবং state transition testing Source 1সোর্স 1। পরের topic-গুলো এই ক্রমে আসে।
ISTQB syllabus ও glossary "test method" term-টি define করে না। Tutorial-এর নিজের ব্যাখ্যা: notes-এ এর মানে "test technique"। ISTQB-এর ক্ষেত্রে "test technique" নামটি ব্যবহার করুন।
Equivalence Partitioning
Scenario: A software system accepts birthday of members only from 18 to 100 years.
| Invalid | valid | invalid |
|---|---|---|
| <18 | 18-100 | >100 |
Equivalence partitioning (EP) divides data into partitions. Source 1সোর্স 1 It expects the test object to process all elements of one partition in the same way. Source 1সোর্স 1 If a test with one value of a partition finds a defect, a test with any other value of that partition should find it too. Source 1সোর্স 1 So one test for each partition is enough. Source 1সোর্স 1 The glossary says the same: one representative member of each partition is exercised. Source 3সোর্স 3
You can find partitions for any data element of the test object. Source 1সোর্স 1 Examples are inputs, outputs, internal values, interface parameters, configuration items, and values that depend on time. Source 1সোর্স 1 The partitions must not overlap. Source 1সোর্স 1 Each partition must contain at least one value. Source 1সোর্স 1
A valid partition holds valid values. An invalid partition holds invalid values. Source 1সোর্স 1 Teams and organizations can define "valid" and "invalid" in different ways. Source 1সোর্স 1
The coverage items of EP are the partitions. Source 1সোর্স 1 To reach 100% coverage, the test cases must exercise every identified partition, the invalid ones too. Source 1সোর্স 1 The coverage is the number of partitions that at least one test case exercises, divided by the number of identified partitions. Source 1সোর্স 1
Worked answer for the 18 to 100 example. The rules above come from the syllabus. The numbers below are the tutorial's own working. Assume that the age is a whole number.
| Partition | Values | Valid or invalid | Test value |
|---|---|---|---|
| 1 | 17 or less | Invalid | 10 |
| 2 | 18 to 100 | Valid | 50 |
| 3 | 101 or more | Invalid | 120 |
- The example has 3 partitions.
- The 3 test values 10, 50, and 120 exercise 3 partitions.
- The coverage is 3 / 3 = 100%.
- If the tester uses only the value 50, the coverage is 1 / 3 = 33.3%.
- If the tester uses the values 10 and 50, the coverage is 2 / 3 = 66.7%.
The tutorial's own advice
The two invalid partitions can hide more cases. If the specification treats negative numbers or text in a different way, add one partition for each way.
সহজ English
Scenario: A software system accepts the birthday of members only if the age is from 18 to 100 years.
So the ages fall into three groups:
- Less than 18: invalid.
- 18 to 100: valid.
- More than 100: invalid.
Equivalence partitioning (EP) splits data into partitions. EP expects the test object to treat all values of a partition the same way. If one value finds a defect, any other value of it should too. So one test for each partition is enough Source 1সোর্স 1. The glossary says the same Source 3সোর্স 3.
Any data element, such as an input or an output, can have partitions. They must not overlap, and none can be empty. A partition is valid or invalid Source 1সোর্স 1.
Coverage is the partitions used divided by the partitions found. 100% needs every partition, also the invalid ones Source 1সোর্স 1.
The tutorial's own working, for whole-number ages: 17 or less (invalid), 18 to 100 (valid), 101 or more (invalid). The values 10, 50, and 120 give 3 / 3 = 100%. Only 50 gives 33.3%. 10 and 50 give 66.7%.
The tutorial also advises extra partitions if the specification treats negative numbers or text differently.
বাংলা ব্যাখ্যা
Scenario: একটি software system শুধু 18 থেকে 100 বছর বয়সী member-দের birthday গ্রহণ করে।
তাই বয়সগুলো তিনটি ভাগে পড়ে:
- 18-এর কম: invalid।
- 18 থেকে 100: valid।
- 100-এর বেশি: invalid।
Equivalence partitioning (EP) data-কে partition-এ ভাগ করে। ধরা হয়, test object একটি partition-এর সব element একইভাবে process করে। তাই একটি value দিয়ে defect পাওয়া গেলে সেই partition-এর অন্য যেকোনো value দিয়েও তা পাওয়া উচিত, আর প্রতিটি partition-এর জন্য একটি test যথেষ্ট Source 1সোর্স 1। Glossary-ও বলে, প্রতিটি partition-এর একটি representative member test করা হয় Source 3সোর্স 3।
Input, output, internal value, interface parameter, configuration item বা সময়-নির্ভর value, যেকোনো data element-এর partition হতে পারে। Partition overlap করবে না, আর প্রতিটিতে অন্তত একটি value থাকবে। Partition valid বা invalid হয়, আর team-ভেদে এর definition আলাদা হতে পারে Source 1সোর্স 1।
100% coverage-এর জন্য invalid-সহ প্রতিটি partition exercise করতে হবে। অন্তত একটি test case যতগুলো partition exercise করে, তার সংখ্যাকে চিহ্নিত মোট partition-এর সংখ্যা দিয়ে ভাগ করলে coverage পাওয়া যায় Source 1সোর্স 1।
Tutorial-এর নিজের হিসাব (বয়স পূর্ণ সংখ্যা ধরে): 17 বা কম (invalid, test value 10), 18 থেকে 100 (valid, 50), 101 বা বেশি (invalid, 120)। এই 3টি value দিলে 3 / 3 = 100%। শুধু 50 দিলে 33.3%। 10 ও 50 দিলে 66.7%।
Tutorial-এর নিজের পরামর্শ: specification যদি negative number বা text আলাদাভাবে handle করে, তবে প্রতিটি ধরনের জন্য একটি partition যোগ করুন।
Boundary Value Analysis
2 types of BVA:
- 2BVA: 17,18,100,101 (min-1, min, max, max+1)
- 3BVA: 17,18,19,99,100,101 (min-1, min, min+1, max-1, max, max+1)
The 3BVA line takes only 18 and 100 as boundary values, but ISTQB also counts 17 and 101 as boundary values, so 3-value BVA has 8 values and not 6. Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Boundary value analysis (BVA) exercises the boundaries of equivalence partitions. Source 1সোর্স 1 The glossary says the test conditions are boundary values. Source 4সোর্স 4 BVA works only for ordered partitions. Source 1সোর্স 1 The minimum and the maximum of a partition are its boundary values. Source 1সোর্স 1 If two elements belong to one partition, all elements between them belong to it too. Source 1সোর্স 1
Developers make more errors at boundaries. Source 1সোর্স 1 BVA finds boundaries that are misplaced above or below the intended position, and boundaries that are missing. Source 1সোর্স 1
The syllabus covers two versions of BVA. They differ in the number of coverage items for each boundary. Source 1সোর্স 1
| Version | Coverage items for each boundary | Coverage is |
|---|---|---|
| 2-value | The boundary value and its closest neighbor in the adjacent partition Source 1সোর্স 1 | Boundary values exercised, divided by boundary values identified Source 1সোর্স 1 |
| 3-value | The boundary value and both of its neighbors Source 1সোর্স 1 | Boundary values and neighbors exercised, divided by all identified boundary values and neighbors Source 1সোর্স 1 |
In 3-value BVA, some coverage items can be values that are not boundary values. Source 1সোর্স 1 3-value BVA is more rigorous than 2-value BVA. Source 1সোর্স 1
The syllabus gives an example. The decision "if (x ≤ 10)" is wrongly coded as "if (x = 10)". The 2-value test data x = 10 and x = 11 cannot find the defect. The 3-value test data x = 9 is likely to find it. Source 1সোর্স 1
Worked answer for the 18 to 100 example. The rules come from the syllabus. The numbers are the tutorial's own working. The three partitions are "17 or less", "18 to 100", and "101 or more". The partition "17 or less" has no stated lower end, so only its maximum 17 is a boundary value.
The boundary values are 17 (maximum of the first partition), 18 and 100 (minimum and maximum of the second), and 101 (minimum of the third). That is 4 boundary values.
| Boundary value | 2-value test values | 3-value test values |
|---|---|---|
| 17 | 17, 18 | 16, 17, 18 |
| 18 | 17, 18 | 17, 18, 19 |
| 100 | 100, 101 | 99, 100, 101 |
| 101 | 100, 101 | 100, 101, 102 |
- 2-value BVA lists 4 × 2 = 8 values. Each value appears twice, so 8 / 2 = 4 different values: 17, 18, 100, and 101.
- 3-value BVA lists 4 × 3 = 12 values. The values 17, 18, 100, and 101 appear twice each. So 12 − 4 = 8 different values remain: 16, 17, 18, 19, 99, 100, 101, and 102.
- If the tester runs only the 4 values of the 2-value set, the 3-value coverage is 4 / 8 = 50%.
- The 2BVA list of the notes has the same 4 values. The 3BVA list of the notes has 6 values and leaves out 16 and 102.
সহজ English
There are 2 types of BVA:
- 2BVA: 17, 18, 100, 101 (min-1, min, max, max+1).
- 3BVA: 17, 18, 19, 99, 100, 101 (min-1, min, min+1, max-1, max, max+1).
Be careful: the 3BVA line takes only 18 and 100 as boundary values. ISTQB also counts 17 and 101 as boundary values, so 3-value BVA has 8 values, not 6. Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Boundary value analysis (BVA) tests the boundaries of ordered equivalence partitions Source 1সোর্স 1. Its test conditions are boundary values Source 4সোর্স 4. The boundary values of a partition are its minimum and maximum Source 1সোর্স 1.
BVA finds misplaced and missing boundaries, where developers make more errors Source 1সোর্স 1.
- 2-value BVA tests each boundary value and its closest neighbor in the adjacent partition Source 1সোর্স 1.
- 3-value BVA tests each boundary value and both of its neighbors. It is more rigorous Source 1সোর্স 1.
Example: "if (x ≤ 10)" is wrongly coded as "if (x = 10)". The 2-value data 10 and 11 miss it, but the 3-value data 9 likely finds it Source 1সোর্স 1.
The tutorial's own working for 18 to 100: 2-value BVA tests 17, 18, 100, and 101. 3-value BVA tests 8 values: 16 to 19 and 99 to 102. So the 2-value set gives 50% 3-value coverage. The 3BVA list of the notes leaves out 16 and 102.
বাংলা ব্যাখ্যা
BVA-এর 2টি ধরন:
- 2BVA: 17, 18, 100, 101 (min-1, min, max, max+1)।
- 3BVA: 17, 18, 19, 99, 100, 101 (min-1, min, min+1, max-1, max, max+1)।
সতর্ক থাকুন: 3BVA লাইনে শুধু 18 ও 100-কে boundary value ধরা হয়েছে। কিন্তু ISTQB 17 ও 101-কেও boundary value ধরে, তাই 3-value BVA-তে value 6টি নয়, 8টি। ISTQB definition দেখতে page-এর ওপরে ISTQB version-এ যান।
Boundary value analysis (BVA) equivalence partition-এর boundary exercise করে Source 1সোর্স 1। Glossary অনুযায়ী এর test condition হলো boundary value Source 4সোর্স 4। BVA শুধু ordered partition-এ কাজ করে। একটি partition-এর minimum ও maximum হলো তার boundary value Source 1সোর্স 1।
Developer-রা boundary-তে বেশি ভুল করেন। BVA ভুল জায়গায় সরে যাওয়া boundary আর অনুপস্থিত boundary খুঁজে পায় Source 1সোর্স 1।
2-value BVA-তে প্রতিটি boundary-র জন্য boundary value আর পাশের partition-এর সবচেয়ে কাছের neighbor test হয়। 3-value BVA-তে boundary value আর তার দুই পাশের neighbor। 3-value BVA বেশি rigorous Source 1সোর্স 1।
Syllabus-এর উদাহরণ: "if (x ≤ 10)" ভুল করে "if (x = 10)" লেখা হয়েছে। 2-value test data x = 10 ও x = 11 এই defect ধরতে পারে না, কিন্তু 3-value test data x = 9 সম্ভবত ধরবে Source 1সোর্স 1।
Tutorial-এর নিজের হিসাব (18 থেকে 100): boundary value 4টি: 17, 18, 100 ও 101। 2-value BVA-তে ভিন্ন value এই 4টি। 3-value BVA-তে ভিন্ন value 8টি: 16, 17, 18, 19, 99, 100, 101, 102। শুধু 2-value-এর 4টি value চালালে 3-value coverage 4 / 8 = 50%। Notes-এর 3BVA list-এ 16 ও 102 বাদ পড়েছে।
Equivalence Partitioning in a Complex Case
A bank offers Gold and Premium savings accounts for 1 and 3 years for each plan. The Gold savings account offers 5% interest for 1 year and 7% interest for 3 years, while the Premium savings account offers 7% interest for 1 year and 9% interest for 3 years. To avail of the Gold savings account, one must deposit a minimum of 1 lakh taka, and to avail of the Premium savings account, a deposit of 3 lakh taka is required.
A person deposited 1 lakh taka to purchase a Gold savings account for 3 years, and after 6 months, he deposited an additional 3 lakh taka to purchase a Premium savings account for 1 year.
How many test cases are covered by this scenario, expressed as a percentage?
ISTQB measures the coverage of equivalence partitioning as the partitions exercised divided by the partitions identified, not as "test cases covered". Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Many test items have more than one input, so they have more than one set of partitions. Source 1সোর্স 1 A test case then covers partitions from different sets. Source 1সোর্স 1 The simplest coverage criterion for this case is Each Choice coverage. Source 1সোর্স 1 Each Choice coverage needs test cases that exercise each partition of each set at least once. Source 1সোর্স 1 It does not look at combinations of partitions. Source 1সোর্স 1
Worked answer for the bank example. The rules above come from the syllabus. The sets of partitions and all numbers below are the tutorial's own working. The notes do not state the expected answer.
The rates of interest are outputs. The inputs are the plan, the tenure, and the deposit.
| Set | Partitions |
|---|---|
| Plan | Gold; Premium |
| Tenure | 1 year; 3 years |
| Deposit compared with the minimum of the plan | Below the minimum (invalid); at or above the minimum (valid) |
The scenario has two purchases. Purchase 1 is Gold, 3 years, 1 lakh taka. Purchase 2 is Premium, 1 year, 3 lakh taka.
| Partition | Exercised by the scenario |
|---|---|
| Gold | Yes, purchase 1 |
| Premium | Yes, purchase 2 |
| 1 year | Yes, purchase 2 |
| 3 years | Yes, purchase 1 |
| Deposit at or above the minimum | Yes: 100,000 ≥ 100,000 (purchase 1) and 300,000 ≥ 300,000 (purchase 2) |
| Deposit below the minimum | No |
- Total partitions: 2 + 2 + 2 = 6.
- Exercised partitions: 5.
- Coverage of all 6 partitions: 5 / 6 = 83.3%.
- Each Choice coverage of plan and tenure only: 4 / 4 = 100%.
Now count the combinations of plan and tenure. This count is not a coverage criterion of the CTFL syllabus. The syllabus gives Each Choice as the simplest criterion and names no criterion for all combinations. Source 1সোর্স 1
| Combination | Expected rate | In the scenario |
|---|---|---|
| Gold, 1 year | 5% | No |
| Gold, 3 years | 7% | Yes |
| Premium, 1 year | 7% | Yes |
| Premium, 3 years | 9% | No |
- Combinations: 2 × 2 = 4.
- Combinations in the scenario: 2.
- Coverage of the combinations: 2 / 4 = 50%.
The scenario checks the rate 7% two times. It never checks the rates 5% and 9%. A defect in those two combinations stays hidden.
The deposits 1 lakh and 3 lakh sit exactly on the minimum of each plan. This is a boundary value. The scenario does not test the value just below it, so it cannot find a wrong minimum. If the amounts are whole taka, those values are 99,999 and 299,999.
If your test case means "a combination of plan and tenure", the answer to the question of the notes is 2 / 4 = 50%. If it means "a partition", the answer is 5 / 6 = 83.3% for all six partitions. This is the tutorial's own reading.
সহজ English
A bank offers two savings accounts, Gold and Premium. Each plan runs for 1 year or 3 years.
- Gold: 5% interest for 1 year and 7% for 3 years. It needs a deposit of at least 1 lakh taka.
- Premium: 7% interest for 1 year and 9% for 3 years. It needs a deposit of 3 lakh taka.
A person deposits 1 lakh taka for a Gold account for 3 years. After 6 months, the person deposits 3 lakh taka more for a Premium account for 1 year.
The question: what percentage of test cases does this scenario cover?
Be careful: ISTQB measures the coverage of equivalence partitioning as the partitions exercised divided by the partitions identified, not as "test cases covered". Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Many test items have more than one input, so they have more than one set of partitions. The simplest rule for this is Each Choice coverage: tests must use each partition of each set at least once. It ignores combinations Source 1সোর্স 1.
The tutorial's own working: the inputs are plan (Gold, Premium), tenure (1 year, 3 years), and deposit (below the minimum, which is invalid, or at or above it, which is valid). That is 6 partitions. The two purchases use 5, because no deposit is below the minimum: 5 / 6 = 83.3%.
The scenario uses 2 of the 4 combinations of plan and tenure: 2 / 4 = 50%. The syllabus names no coverage rule for all combinations Source 1সোর্স 1. The rates 5% and 9% are never checked.
Both deposits are exactly on the minimum. The value just below is not tested, so a wrong minimum stays hidden.
বাংলা ব্যাখ্যা
একটি bank দুটি savings account দেয়: Gold ও Premium। প্রতিটি plan 1 বছর ও 3 বছরের জন্য।
- Gold: 1 বছরে 5% আর 3 বছরে 7% interest। Gold account নিতে কমপক্ষে 1 লাখ টাকা জমা দিতে হয়।
- Premium: 1 বছরে 7% আর 3 বছরে 9% interest। Premium account নিতে 3 লাখ টাকা জমা দিতে হয়।
একজন ব্যক্তি 3 বছরের Gold account কিনতে 1 লাখ টাকা জমা দিলেন। 6 মাস পরে তিনি 1 বছরের Premium account কিনতে আরও 3 লাখ টাকা জমা দিলেন।
প্রশ্ন: এই scenario কত শতাংশ test case cover করে?
সতর্ক থাকুন: ISTQB equivalence partitioning-এর coverage মাপে exercise করা partition-এর সংখ্যাকে চিহ্নিত partition-এর সংখ্যা দিয়ে ভাগ করে; "কতগুলো test case cover হলো" হিসেবে নয়। ISTQB definition দেখতে page-এর ওপরে ISTQB version-এ যান।
অনেক test item-এর একাধিক input থাকে, তাই partition-এর set-ও একাধিক, আর একটি test case বিভিন্ন set-এর partition cover করে। সবচেয়ে সহজ coverage criterion হলো Each Choice coverage: প্রতিটি set-এর প্রতিটি partition অন্তত একবার exercise করতে হবে। এটি combination দেখে না Source 1সোর্স 1।
Tutorial-এর নিজের হিসাব (notes-এ প্রত্যাশিত উত্তর নেই): input হলো plan (Gold, Premium), tenure (1 বছর, 3 বছর) আর deposit (minimum-এর কম, invalid; অথবা minimum বা বেশি, valid)। মোট 6টি partition। কোনো deposit minimum-এর কম নয়, তাই দুটি purchase 5টি partition exercise করে: 5 / 6 = 83.3%। শুধু plan ও tenure-এর Each Choice coverage 4 / 4 = 100%।
Plan ও tenure-এর 4টি combination-এর মধ্যে scenario-তে আছে 2টি: 2 / 4 = 50%। Syllabus সব combination-এর জন্য কোনো coverage criterion দেয় না Source 1সোর্স 1। Scenario 7% rate দুবার check করে, কিন্তু 5% ও 9% কখনো নয়, তাই ওই দুই combination-এর defect লুকিয়ে থাকে।
দুটি deposit-ই ঠিক minimum-এ, অর্থাৎ boundary value-তে। ঠিক নিচের value (পূর্ণ টাকায় 99,999 ও 299,999) test হয় না, তাই ভুল minimum ধরা পড়ে না।
Tutorial-এর নিজের reading: test case মানে combination হলে উত্তর 50%, partition হলে 83.3%।
Decision Table Testing
Decision Table Testing:
Scenario: You have to test a login page.
| Conditions | T1 | T2 | T3 | T4 |
|---|---|---|---|---|
| T | T | F | F | |
| Password | T | F | T | F |
| Output | x | - | N/A |
The Output row uses "-" and "N/A", which the ISTQB syllabus defines only for conditions, so rules T3 and T4 do not show if the action occurs. Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Decision tables test requirements that say how different combinations of conditions give different outcomes. Source 1সোর্স 1 A decision table is an effective way to record complex logic, such as business rules. Source 1সোর্স 1 The glossary says the test conditions are the combinations of conditions and the resulting actions in the table. Source 5সোর্স 5
The conditions and the actions of the system form the rows of the table. Source 1সোর্স 1 Each column is a decision rule. Source 1সোর্স 1 A rule is a unique combination of conditions with its actions. Source 1সোর্স 1 A limited-entry table shows the values as true or false. Source 1সোর্স 1 An extended-entry table can also use many values, such as ranges or partitions. Source 1সোর্স 1
| Notation | Used for | Meaning |
|---|---|---|
| T | Condition | The condition is satisfied. Source 1সোর্স 1 |
| F | Condition | The condition is not satisfied. Source 1সোর্স 1 |
| – | Condition | The condition does not change the outcome. Source 1সোর্স 1 |
| N/A | Condition | The condition is infeasible for this rule. Source 1সোর্স 1 |
| X | Action | The action occurs. Source 1সোর্স 1 |
| Blank | Action | The action does not occur. Source 1সোর্স 1 |
A full decision table has a column for every combination of conditions. Source 1সোর্স 1 You can delete the columns with infeasible combinations. Source 1সোর্স 1 You can also merge columns in which some conditions do not change the outcome. Source 1সোর্স 1 The syllabus does not cover minimization algorithms. Source 1সোর্স 1
The coverage items are the columns with feasible combinations. Source 1সোর্স 1 The coverage is the number of exercised columns, divided by the number of feasible columns. Source 1সোর্স 1
The technique finds all combinations of conditions in a systematic way. Source 1সোর্স 1 It also helps to find gaps and contradictions in the requirements. Source 1সোর্স 1 The number of rules grows exponentially as you add conditions. Source 1সোর্স 1 For many conditions, use a minimized table or a risk-based approach. Source 1সোর্স 1
The login example, in the tutorial's own version. The table in the notes has a gap and a notation problem. The syllabus defines "–" and "N/A" for conditions only. Source 1সোর্স 1 "N/A" marks an infeasible rule. Source 1সোর্স 1 All four rules of this table are feasible. Rules T3 and T4 also show no action, so the table does not say if the user logs in. The table below gives each rule an action. It assumes that a failed login shows an error message. The syllabus does not give this table.
| Rule 1 | Rule 2 | Rule 3 | Rule 4 | |
|---|---|---|---|---|
| Condition: email is correct | T | T | F | F |
| Condition: password is correct | T | F | T | F |
| Action: user logs in | X | |||
| Action: error message is shown | X | X | X |
- The table has 2 conditions, so it has 2 × 2 = 4 combinations and 4 rules.
- All 4 combinations are feasible.
- 4 test cases, one for each rule, give 4 / 4 = 100% coverage.
Suppose a wrong email always gives the same error, whatever the password is. Then the password is irrelevant for Rules 3 and 4. Merge them into one rule: email F, password "–".
| Rule 1 | Rule 2 | Rule 3 (merged) | |
|---|---|---|---|
| Condition: email is correct | T | T | F |
| Condition: password is correct | T | F | – |
| Action: user logs in | X | ||
| Action: error message is shown | X | X |
- The minimized table has 3 rules, so 3 test cases give 3 / 3 = 100% coverage.
- A table with 3 conditions has 2 × 2 × 2 = 8 rules.
সহজ English
Decision Table Testing. Scenario: you must test a login page. The table has 4 test columns:
- T1: email T, password T. Output: x.
- T2: email T, password F. Output: blank.
- T3: email F, password T. Output: "-".
- T4: email F, password F. Output: "N/A".
Be careful: the Output row uses "-" and "N/A". The ISTQB syllabus defines these only for conditions. So rules T3 and T4 do not show if the action occurs. Switch to the ISTQB version at the top of the page to see the ISTQB definition.
Decision tables test requirements where different combinations of conditions give different outcomes, such as business rules Source 1সোর্স 1. The test conditions are the combinations of conditions and the resulting actions Source 5সোর্স 5.
Rows are conditions and actions. Each column is a rule. For a condition, T means satisfied, F means not satisfied, "–" means no effect on the outcome, and N/A means infeasible. For an action, X means it occurs and blank means it does not Source 1সোর্স 1.
Coverage is the exercised columns divided by the feasible columns. The number of rules grows exponentially with each new condition Source 1সোর্স 1.
The tutorial's own login table: all 4 rules are feasible. Rule 1 logs the user in. Rules 2, 3, and 4 show an error message. 4 tests give 4 / 4 = 100%. If a wrong email always gives the same error, merge Rules 3 and 4, and 3 tests give 100%.
বাংলা ব্যাখ্যা
Decision Table Testing. Scenario: আপনাকে একটি login page test করতে হবে। Table-এ 4টি test column আছে:
- T1: email T, password T। Output: x।
- T2: email T, password F। Output: ফাঁকা।
- T3: email F, password T। Output: "-"।
- T4: email F, password F। Output: "N/A"।
সতর্ক থাকুন: Output row-তে "-" ও "N/A" ব্যবহার করা হয়েছে, কিন্তু ISTQB syllabus এগুলো শুধু condition-এর জন্য define করে। তাই T3 ও T4 rule-এ action ঘটে কি না বোঝা যায় না। ISTQB definition দেখতে page-এর ওপরে ISTQB version-এ যান।
Decision table সেই requirement test করে, যেখানে condition-এর ভিন্ন combination ভিন্ন outcome দেয়, যেমন business rule Source 1সোর্স 1। Glossary অনুযায়ী test condition হলো condition-এর combination আর তার ফলে ঘটা action Source 5সোর্স 5।
Row হলো condition ও action। প্রতিটি column একটি rule: condition-এর একটি unique combination আর তার action। Condition-এ T মানে satisfied, F মানে satisfied নয়, "–" মানে outcome বদলায় না, N/A মানে infeasible। Action-এ X মানে ঘটে, ফাঁকা মানে ঘটে না Source 1সোর্স 1।
Infeasible column মুছে ফেলা যায়, আর যেখানে কিছু condition outcome বদলায় না সেই column merge করা যায়। Exercise করা column-এর সংখ্যাকে feasible column-এর সংখ্যা দিয়ে ভাগ করলে coverage পাওয়া যায়। Rule-এর সংখ্যা condition যোগ করার সাথে exponentially বাড়ে। অনেক condition থাকলে minimized table বা risk-based approach নিন Source 1সোর্স 1।
Tutorial-এর নিজের login table (ধরা হয়েছে, failed login error দেখায়): 4টি rule-ই feasible। Rule 1-এ user login করেন; Rule 2, 3 ও 4-এ error message দেখায়। 4টি test case দিলে 4 / 4 = 100%। ভুল email সবসময় একই error দিলে Rule 3 ও 4 merge করে একটি rule হয়: email F, password "–"। তখন 3টি test case দিলে 3 / 3 = 100%।
State Transition Testing
State Transition is a test design technique where we test how a system moves from one state to another based on specific actions, inputs, or events.
Open the image in full sizeছবিটি পূর্ণ আকারে খুলুনExample: In a login system, a user account may move through different states:
Active → Locked → Unlocked
A state diagram shows the possible states of a system and its valid state transitions. Source 1সোর্স 1 An event starts a transition. Source 1সোর্স 1 A guard condition can qualify the event. Source 1সোর্স 1 The model assumes that transitions are instantaneous. Source 1সোর্স 1 A transition can cause the software to take an action. Source 1সোর্স 1 The common label is event [guard condition] / action. Source 1সোর্স 1 You can omit the guard condition and the action if they do not exist or do not matter to the tester. Source 1সোর্স 1 The glossary says the test conditions are state transitions or sequences of them. Source 6সোর্স 6
A state table models the same behavior as a state diagram. Source 1সোর্স 1 Its rows are the states. Its columns are the events, with their guard conditions if any. Source 1সোর্স 1 Each cell holds the target state and the resulting actions, if any. Source 1সোর্স 1 An empty cell is an invalid transition, so the state table shows invalid transitions and the state diagram does not. Source 1সোর্স 1
A test case is usually a sequence of events. The events cause state changes in a row, and actions when needed. Source 1সোর্স 1 One test case usually covers several transitions. Source 1সোর্স 1
| Coverage criterion | Coverage items | Coverage is |
|---|---|---|
| All states | The states Source 1সোর্স 1 | Exercised states, divided by all states Source 1সোর্স 1 |
| Valid transitions (0-switch) | The single valid transitions Source 1সোর্স 1 | Exercised valid transitions, divided by all valid transitions Source 1সোর্স 1 |
| All transitions | All transitions of the state table, valid and invalid Source 1সোর্স 1 | Valid and invalid transitions exercised or attempted, divided by all transitions Source 1সোর্স 1 |
Valid transitions coverage is stronger than all states coverage. Source 1সোর্স 1 Test cases can reach all states without exercising all transitions. Source 1সোর্স 1 Valid transitions coverage is the most used criterion. Source 1সোর্স 1 Full valid transitions coverage gives full all states coverage. Source 1সোর্স 1 Full all transitions coverage gives both. It should be a minimum for mission-critical and safety-critical software. Source 1সোর্স 1
To test invalid transitions, test only one invalid transition in a test case. This avoids defect masking. Source 1সোর্স 1
Worked answer for the PIN example. The rules above come from the syllabus. The counts below are the tutorial's own working, read from the diagram above. This tutorial takes Start as the initial marker, not as a state.
The states are 1st try, 2nd try, 3rd try, Access granted, and Account blocked. The events are "correct PIN" and "incorrect PIN". The state table is below. The two end states have no outgoing transitions, so their cells are empty.
| State | Correct PIN | Incorrect PIN |
|---|---|---|
| 1st try | Access granted | 2nd try |
| 2nd try | Access granted | 3rd try |
| 3rd try | Access granted | Account blocked |
| Access granted | ||
| Account blocked |
- States: 5.
- Valid transitions: 6 (the 6 filled cells).
- All cells: 5 states × 2 events = 10.
- Invalid transitions: 10 − 6 = 4 (the 4 empty cells).
These four test cases reach full valid transitions coverage.
| Test case | Events | Valid transitions exercised |
|---|---|---|
| A | Correct | 1st try → Access granted |
| B | Incorrect, correct | 1st try → 2nd try; 2nd try → Access granted |
| C | Incorrect, incorrect, correct | 1st try → 2nd try; 2nd try → 3rd try; 3rd try → Access granted |
| D | Incorrect, incorrect, incorrect | 1st try → 2nd try; 2nd try → 3rd try; 3rd try → Account blocked |
- Valid transitions coverage with A to D: 6 / 6 = 100%.
- All states coverage needs fewer tests. Test case C exercises 4 states: 1st try, 2nd try, 3rd try, and Access granted. That is 4 / 5 = 80%.
- Test cases C and D together exercise all 5 states: 5 / 5 = 100%.
- All transitions coverage with A to D: 6 / 10 = 60%.
- The 4 invalid transitions need 4 more test cases, one invalid transition in each. A plan with 4 + 4 = 8 test cases gives 10 / 10 = 100%.
সহজ English
State transition is a test design technique. You test how a system moves from one state to another after specific actions, inputs, or events.
The diagram of a PIN entry shows this. From Start, the user is at the 1st try. An incorrect PIN moves the user to the 2nd try, and then to the 3rd try. A correct PIN at any try leads to Access Granted. An incorrect PIN at the 3rd try leads to Account Blocked.
Another example: in a login system, a user account can move through these states: Active → Locked → Unlocked.
A state diagram shows the states of a system and its valid transitions. An event, maybe with a guard condition, starts a transition. A transition can cause an action. The common label is event [guard condition] / action Source 1সোর্স 1. The test conditions are state transitions or sequences of them Source 6সোর্স 6.
A state table shows the same behavior. An empty cell is an invalid transition, so the table shows invalid transitions Source 1সোর্স 1.
- All states: tests reach every state Source 1সোর্স 1.
- Valid transitions (0-switch): tests use every valid transition. It is the most used Source 1সোর্স 1.
- All transitions: tests use or try every transition. It should be a minimum for mission-critical and safety-critical software Source 1সোর্স 1.
Test one invalid transition per test case, to avoid defect masking Source 1সোর্স 1.
The tutorial's own count for the PIN example: 5 states, 6 valid and 4 invalid transitions. Four test cases give 100% valid transitions coverage, but 60% all transitions coverage.
বাংলা ব্যাখ্যা
State Transition একটি test design technique। এতে test করা হয়, নির্দিষ্ট action, input বা event-এর ফলে একটি system কীভাবে এক state থেকে আরেক state-এ যায়।
PIN entry-এর diagram এটি দেখায়। Start থেকে user 1st try-তে থাকেন। ভুল PIN দিলে তিনি 2nd try-তে যান, তারপর 3rd try-তে। যেকোনো try-তে সঠিক PIN দিলে Access Granted হয়। 3rd try-তে ভুল PIN দিলে Account Blocked হয়।
আরেকটি উদাহরণ: একটি login system-এ user account বিভিন্ন state-এর মধ্য দিয়ে যেতে পারে: Active → Locked → Unlocked।
State diagram একটি system-এর সম্ভাব্য state আর valid state transition দেখায়। Event transition শুরু করে, আর guard condition সেই event-কে শর্তযুক্ত করতে পারে। Transition-এর ফলে software একটি action নিতে পারে। সাধারণ label হলো event [guard condition] / action Source 1সোর্স 1। Glossary অনুযায়ী test condition হলো state transition বা তাদের sequence Source 6সোর্স 6।
State table একই behavior দেখায়: row হলো state, column হলো event। ফাঁকা cell মানে invalid transition, তাই state table invalid transition দেখায়, state diagram দেখায় না Source 1সোর্স 1।
Coverage criterion তিনটি: all states, valid transitions (0-switch), আর valid ও invalid মিলিয়ে all transitions। Valid transitions coverage সবচেয়ে বেশি ব্যবহৃত, আর পুরোটা হলে all states coverage-ও পুরো হয়। Mission-critical ও safety-critical software-এ all transitions coverage ন্যূনতম হওয়া উচিত Source 1সোর্স 1। Defect masking এড়াতে একটি test case-এ শুধু একটি invalid transition test করুন Source 1সোর্স 1।
Tutorial-এর নিজের হিসাব (PIN উদাহরণ): state 5টি, valid transition 6টি, invalid transition 4টি। চারটি test case দিলে valid transitions coverage 6 / 6 = 100%, কিন্তু all transitions coverage 6 / 10 = 60%। প্রতিটিতে একটি invalid transition নিয়ে আরও 4টি test case যোগ করলে 10 / 10 = 100%।