Skip to contentমূল লেখায় যান

Chapter 07 · Fundamentalsচ্যাপ্টার 07 · Fundamentals

White-Box Techniques

Design tests from the code: statement, branch, and condition coverage.

9 min read9 মিনিটে পড়া যায়20 min read20 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 9 sources9টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Coverage climbs, tests add upকভারেজ বাড়ে, টেস্ট জোড়া লাগে

Run tests one by one and watch statement coverage climb from 67% to 100% on findSqrt.টেস্ট একে একে চালান আর দেখুন findSqrt-এ স্টেটমেন্ট কভারেজ 67% থেকে 100%-এ ওঠে।

2 min2 মিনিট7 steps7টি ধাপ
  • Coverageকভারেজ0%
  • Statements runচালানো স্টেটমেন্ট0 / 3
  • Tests usedব্যবহৃত টেস্ট0
  • Missedবাদ পড়া3
findSqrt(number)findSqrt(number)1if (number > 0)if (number > 0)2return Math.sqrt(number)return Math.sqrt(number)3return -1return -1Testটেস্টrunnerরানারStatements runচালানো স্টেটমেন্ট0%0 / 3Test queueটেস্ট কিউnumber -36number -36number 5number 5

You’ll learnআপনি শিখবেন

  • How statement coverage is countedস্টেটমেন্ট কভারেজ কীভাবে গোনা হয়
  • Why one test can leave a return unrunকেন একটি টেস্টে একটি return বাদ পড়তে পারে
  • How tests add up to 100%টেস্ট জুড়ে কীভাবে 100% হয়
  • Why 100% is still not bug-free100% হলেও কেন বাগমুক্ত নয়

Why White-Box Testing Matters

White Box testing technique is generally a testing technique which can be applied by writing test cases based on coding logic.

We can say it glassbox testing or clearbox testing technique.

Why whitebox testing is important?

  • Understand code logic: SDET can identify hidden bugs inside conditions, loops, validations, and business rules.
  • Design better test cases: Code understanding helps cover positive, negative, edge, and branch scenarios more effectively.
  • Improve automation quality: SDET can write stronger API, integration, and E2E automation by understanding the internal flow.
  • Find root cause faster: When a test fails, SDET can debug logs, code, database, and API responses instead of only reporting "it failed."
  • Test backend and integration properly: Many bugs happen between UI, API, database, queue, cache, and third-party services. White-box knowledge helps detect them.
  • Support developers better: SDET can explain defects with technical evidence, possible root cause, and clear reproduction steps.
  • Reduce production risk: Internal code-path coverage reduces the chance of hidden logic defects going to production.

Types of whitebox testing:

  1. Statement Testing: Checks whether each important line or statement of code is executed at least once.
  2. Branch / Decision Testing: Checks whether each decision point, like if-else, covers both true and false outcomes.
  3. Condition Testing: Checks individual conditions inside complex logic, especially when multiple conditions are combined.
  4. Unit Testing: Tests a single function, method, class, or component in isolation to verify its internal logic.
  5. Integration Testing: Tests how multiple modules, APIs, services, database, or components work together internally.

ISTQB counts every executable statement in statement testing, not only the important ones. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

ISTQB covers only statement testing and branch testing as white-box techniques in its Foundation syllabus, so condition testing is outside that syllabus. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

ISTQB treats unit testing and integration testing as test levels, not as types of white-box testing. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

White-box testing derives tests from the internal structure of a component or system. Source 1সোর্স 1 The glossary calls it a test approach that is based on that structure. Source 2সোর্স 2 The syllabus gives code, architecture, work flows, and data flows as examples of the structure. Source 1সোর্স 1 The glossary lists clear-box testing, glass-box testing, and structural testing as synonyms. Source 2সোর্স 2

The syllabus also calls these techniques structure-based techniques. Source 1সোর্স 1 The test cases depend on how the software is designed. So you can create them only after the design or the code exists. Source 1সোর্স 1

Black-boxWhite-box
Test basisThe specified behavior, without the internal structure Source 1সোর্স 1The internal structure and processing Source 1সোর্স 1
Other nameSpecification-based Source 1সোর্স 1Structure-based Source 1সোর্স 1
Main objectiveCheck the behavior against the specification Source 1সোর্স 1Cover the structure to an acceptable level Source 1সোর্স 1
If the code changes but the behavior staysThe test cases stay useful Source 1সোর্স 1The test cases depend on the design Source 1সোর্স 1

The value of white-box testing

  • Strength. The tests take the whole implementation into account. So they can find defects even when the specification is vague, outdated, or incomplete. Source 1সোর্স 1
  • Weakness. If the software does not implement a requirement, white-box testing may miss that defect of omission. Source 1সোর্স 1
  • Static use. You can apply white-box techniques without running the code, for example in dry runs of code. They suit code that is not ready to run, and pseudocode. Source 1সোর্স 1
  • A measure of coverage. Black-box testing alone gives no measure of the real code coverage. White-box coverage is an objective measure. It also shows which extra tests to add. Source 1সোর্স 1

The techniques in the syllabus

The syllabus covers two white-box techniques: statement testing and branch testing. Source 1সোর্স 1 It says other white-box techniques exist, for example for safety-critical systems. It does not discuss them. Source 1সোর্স 1

White-box testing is also one of four test types: functional, non-functional, black-box, and white-box. You can apply each test type at every test level. Source 1সোর্স 1

Name in the notesISTQB view
Statement testingA white-box technique of the syllabus. Source 1সোর্স 1
Branch / decision testingBranch testing is a white-box technique of the syllabus. Source 1সোর্স 1
Condition testingNot in the syllabus. See the Condition Testing topic.
Unit testingA test level. The syllabus gives "unit testing" as another name for component testing. Source 1সোর্স 1
Integration testingA test level. The syllabus splits it into component integration testing and system integration testing. Source 1সোর্স 1

So unit tests and integration tests are not kinds of white-box testing. They are test levels, and you can design their tests with white-box techniques.

সহজ English

White-box testing means you write test cases from the logic of the code. Other names are glass-box testing and clear-box testing.

Why it is important:

  • You can find hidden bugs in conditions, loops, validations, and business rules.
  • You can cover positive, negative, edge, and branch scenarios better.
  • You can write stronger API, integration, and E2E automation.
  • You can find the root cause of a failed test faster.
  • You can find bugs between UI, API, database, queue, cache, and third-party services.
  • You can give developers technical evidence and clear steps to reproduce.
  • Fewer hidden logic defects go to production.

The notes give five types: statement, branch or decision, condition, unit, and integration testing.

ISTQB differs on three points: it counts every executable statement, its Foundation syllabus has only statement and branch testing, and unit and integration testing are test levels.

White-box testing gets its tests from the internal structure of a component or system Source 1সোর্স 1. The structure can be code, architecture, work flows, or data flows Source 1সোর্স 1. Other names are clear-box, glass-box, and structural testing Source 2সোর্স 2. The tests depend on the design, so you can write them only after the design or the code exists Source 1সোর্স 1. Their main objective is to cover the structure to an acceptable level Source 1সোর্স 1.

White-box tests can find defects even when the specification is vague, outdated, or incomplete. But they may miss the defect when the software does not implement a requirement Source 1সোর্স 1. You can use them without running the code. They also give an objective measure of code coverage Source 1সোর্স 1.

The syllabus has two white-box techniques: statement testing and branch testing Source 1সোর্স 1. Unit testing and integration testing are test levels, not kinds of white-box testing. You can design their tests with white-box techniques.

বাংলা ব্যাখ্যা

White-box testing হলো এমন একটি testing technique, যেখানে code-এর logic দেখে test case লেখা হয়। একে glass-box testing বা clear-box testing-ও বলা হয়।

White-box testing কেন গুরুত্বপূর্ণ:

  • SDET condition, loop, validation এবং business rule-এর ভেতরের লুকানো bug খুঁজে পান।
  • Code বুঝলে positive, negative, edge এবং branch scenario ভালোভাবে cover করা যায়।
  • Internal flow বুঝলে SDET আরও শক্ত API, integration এবং E2E automation লিখতে পারেন।
  • কোনো test fail করলে SDET শুধু "it failed" না বলে log, code, database এবং API response দেখে দ্রুত root cause খুঁজে পান।
  • UI, API, database, queue, cache এবং third-party service-এর মাঝে অনেক bug হয়। White-box জ্ঞান এগুলো ধরতে সাহায্য করে।
  • SDET technical evidence, সম্ভাব্য root cause এবং পরিষ্কার reproduction step দিয়ে developer-দের defect বোঝাতে পারেন।
  • Internal code-path coverage লুকানো logic defect production-এ যাওয়ার সম্ভাবনা কমায়।

Notes-এ পাঁচটি type আছে: statement testing, branch / decision testing, condition testing, unit testing এবং integration testing।

তিনটি বিষয়ে ISTQB ভিন্ন কথা বলে। ISTQB statement testing-এ শুধু গুরুত্বপূর্ণ নয়, প্রতিটি executable statement গোনে। ISTQB Foundation syllabus-এ white-box technique হিসেবে শুধু statement testing আর branch testing আছে। আর ISTQB unit testing ও integration testing-কে test level ধরে, white-box testing-এর type নয়।

White-box testing কোনো component বা system-এর internal structure থেকে test তৈরি করে Source 1সোর্স 1। Glossary একে সেই structure-এর ওপর ভিত্তি করা একটি test approach বলে Source 2সোর্স 2। Structure-এর উদাহরণ হলো code, architecture, work flow এবং data flow Source 1সোর্স 1। এর synonym হলো clear-box testing, glass-box testing এবং structural testing Source 2সোর্স 2।

Syllabus এগুলোকে structure-based technique-ও বলে। Test case software-এর design-এর ওপর নির্ভর করে, তাই design বা code তৈরি হওয়ার পরেই এগুলো বানানো যায় Source 1সোর্স 1।

Black-box testing specification-এর সঙ্গে behavior মিলিয়ে দেখে। White-box testing-এর মূল লক্ষ্য structure-কে একটি গ্রহণযোগ্য level পর্যন্ত cover করা Source 1সোর্স 1।

White-box test পুরো implementation বিবেচনা করে, তাই specification অস্পষ্ট, পুরনো বা অসম্পূর্ণ হলেও defect খুঁজে পেতে পারে। তবে software কোনো requirement implement না করলে সেই omission defect মিস হতে পারে Source 1সোর্স 1। Code না চালিয়েও, যেমন code-এর dry run-এ, white-box technique ব্যবহার করা যায়। White-box coverage একটি objective measure, যা দেখায় আর কোন test যোগ করতে হবে Source 1সোর্স 1।

Syllabus দুটি white-box technique cover করে: statement testing আর branch testing Source 1সোর্স 1। Unit testing আর integration testing হলো test level, white-box testing-এর type নয়। এদের test white-box technique দিয়ে design করা যায়।

Statement Coverage

Example 1:

function findSqrt(number){
    if(number>0){
        return Math.sqrt(number)
    }
    return -1
}
console.log(findSqrt(-36))

Example 2:

let age=18;
if(age>=0){
    if(age>=18 && age<=100){
        console.log("Voter");
    }
    else if(age>100){
        console.log("You are not allowed to give vote")
    }
    else{
        console.log("Not voter")
    }
}
else{
    console.log("Age can not be negative")
}

Statement coverage Rules for find out minimum test case

For nested conditions

statement coverage = Number of else + 1

For un-nested conditions

  • statement coverage = 2 (When else are there)
  • statement coverage = 1 (When no else are there)

This rule gives 1 test for findSqrt, calculateDiscount, and login, but 100 % ISTQB statement coverage needs 2, 3, and 3 tests, because each early return works like an else. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

Note 1: 100% statement coverage cannot guarantee bug free software

public static double division(int x, int y){
   return x/y;
}

In statement testing, the coverage items are the executable statements. Source 1সোর্স 1 The glossary defines statement coverage as the coverage of executable source statements. Source 3সোর্স 3

You measure the coverage as a percentage. Divide the number of statements that the tests execute by the number of executable statements in the code. Source 1সোর্স 1

statement coverage = executed statements / executable statements x 100 %

At 100 % statement coverage, every executable statement has run at least once. So each statement that holds a defect has run. The run may cause a failure that shows the defect. Source 1সোর্স 1

100 % statement coverage has two limits. Source 1সোর্স 1

  • A defect that depends on data can stay hidden. A division by zero is an example: it fails only when the denominator is zero.
  • It does not show that the tests exercised all the decision logic. Some branches can stay unexercised.

The tutorial's own method: find the minimum number of tests by reasoning

This method is the tutorial's own advice. The syllabus gives no rule to count tests.

  1. List the executable statements of the code.
  2. Find statements that cannot run in the same test. The two returns of an if that ends in return are an example.
  3. If k statements exclude each other, you need at least k tests.
  4. Pick k tests that also reach every other statement. Then k is the minimum.

Sample 1: findSqrt

function findSqrt(number){
    if(number>0){
        return Math.sqrt(number)
    }
    return -1
}
console.log(findSqrt(-36))

The function has three executable statements: the if, return Math.sqrt(number), and return -1. The first return ends the function. So the two returns never run in the same call. You need at least 2 tests.

TestnumberStatements that runStatement coverage
1-36the if, return -12 of 3 (67 %)
25the if, return Math.sqrt(number)2 of 3 (67 %)
1 and 2all three3 of 3 (100 %)

The minimum is 2 tests. The call findSqrt(-36) in the sample is test 1 alone. It leaves return Math.sqrt(number) unexercised.

Sample 2: the voter check

let age=18;
if(age>=0){
    if(age>=18 && age<=100){
        console.log("Voter");
    }
    else if(age>100){
        console.log("You are not allowed to give vote")
    }
    else{
        console.log("Not voter")
    }
}
else{
    console.log("Age can not be negative")
}

The code has 8 executable statements: the let line, three if statements (the else if counts as an if), and four console.log calls. As written, the sample sets age to 18, so it runs only the first path: 4 of 8 statements (50 %). To run the other paths, change the value of age for each run.

TestagePathNew statements that run
118outer if true, voter if truethe let line, the outer if, the voter if, "Voter"
2101voter if false, age>100 truethe age>100 if, "You are not allowed to give vote"
310voter if false, age>100 false"Not voter"
4-1outer if false"Age can not be negative"

The four tests reach 8 of 8 statements (100 %). The four console.log calls exclude each other, because one run prints one message. So 4 tests is the minimum.

Sample 3: the division

public static double division(int x, int y){
   return x/y;
}

The method has one executable statement. One test, for example division(6, 3), reaches 100 % statement coverage. That test does not find the defect, because the method fails only when y is 0. Source 1সোর্স 1

Check the rules of the notes

The "My notes" version gives two rules to count tests. For nested conditions: the number of else plus 1. For un-nested conditions: 2 if there are else parts, and 1 if there are none.

SampleRule that appliesRule givesMinimum by reasoningResult
findSqrtun-nested, no else12Wrong
The voter checknested, 3 else parts (the outer else, the else if, the last else)44Right
divisionun-nested, no else11Right

This check is the tutorial's own. The syllabus gives no rule to count tests. The notes' rule gives 1 test for findSqrt, but findSqrt needs 2. The return inside the if ends the function, so return -1 runs only when the if is false. To use the rule, count each early return like an else, and treat the code as nested. Then the nested rule gives 1 + 1 = 2.

সহজ English

The notes show two code examples: a findSqrt function and a voter check that uses the value of age.

The notes give rules to find the minimum number of test cases for statement coverage:

  • For nested conditions: the number of else plus 1.
  • For un-nested conditions: 2 when there are else parts, and 1 when there is no else.

This rule gives 1 test for findSqrt, calculateDiscount, and login. But 100 % ISTQB statement coverage needs 2, 3, and 3 tests, because each early return works like an else.

Note 1: 100 % statement coverage cannot guarantee bug-free software. The example is a division(x, y) method that returns x/y.

In statement testing, you cover the executable statements. Statement coverage is the percentage of them that the tests run Source 1সোর্স 1. At 100 %, every executable statement has run at least once Source 1সোর্স 1. But a defect that depends on data can stay hidden, and some branches can stay unexercised Source 1সোর্স 1.

The tutorial's own method: if no two of k statements can run in the same test, you need at least k tests.

  • findSqrt: 3 statements. The two returns exclude each other, so the minimum is 2 tests.
  • The voter check: 8 statements. The four messages exclude each other, so the minimum is 4 tests.
  • division: 1 statement. One test reaches 100 %, but misses the defect when y is 0 Source 1সোর্স 1.

The notes' rule gives only 1 test for findSqrt. Count each early return like an else and treat the code as nested. Then the rule gives 2.

বাংলা ব্যাখ্যা

Notes-এ দুটি code উদাহরণ আছে: findSqrt function এবং age-এর মান দিয়ে একটি voter check।

Statement coverage-এর জন্য সবচেয়ে কম test case বের করার নিয়ম:

  • Nested condition-এর জন্য: else-এর সংখ্যা + 1।
  • Un-nested condition-এর জন্য: else থাকলে 2, আর else না থাকলে 1।

এই নিয়ম findSqrt, calculateDiscount এবং login-এর জন্য 1টি test দেয়। কিন্তু 100 % ISTQB statement coverage-এর জন্য লাগে যথাক্রমে 2, 3 এবং 3টি test, কারণ প্রতিটি early return একটি else-এর মতো কাজ করে।

Note 1: 100 % statement coverage bug-মুক্ত software-এর নিশ্চয়তা দিতে পারে না। উদাহরণ হলো একটি division(x, y) method, যা x/y return করে।

Statement testing-এ coverage item হলো executable statement Source 1সোর্স 1। Glossary statement coverage-কে executable source statement-এর coverage বলে Source 3সোর্স 3। Test যতগুলো statement চালায়, তাকে মোট executable statement দিয়ে ভাগ করে শতাংশে coverage মাপা হয় Source 1সোর্স 1।

100 % statement coverage মানে প্রতিটি executable statement অন্তত একবার চলেছে Source 1সোর্স 1। তবে এর দুটি সীমা আছে Source 1সোর্স 1: data-নির্ভর defect, যেমন শূন্য দিয়ে ভাগ, লুকিয়ে থাকতে পারে; আর কিছু branch test-এর বাইরে থেকে যেতে পারে।

Tutorial-এর নিজস্ব পদ্ধতি (syllabus-এ test গোনার কোনো নিয়ম নেই): k-টি statement-এর মধ্যে কোনো দুটি একই test-এ চলতে না পারলে অন্তত k-টি test লাগে।

  • findSqrt: 3টি statement। দুটি return একসঙ্গে চলে না, তাই কমপক্ষে 2টি test লাগে। শুধু findSqrt(-36) চালালে return Math.sqrt(number) বাদ থাকে।
  • Voter check: 8টি statement। চারটি console.log একসঙ্গে চলে না, তাই কমপক্ষে 4টি test লাগে (age 18, 101, 10 এবং -1)।
  • division: 1টি statement। division(6, 3)-এর মতো একটি test 100 % coverage দেয়, কিন্তু defect ধরে না, কারণ method শুধু y 0 হলে fail করে Source 1সোর্স 1।

Notes-এর নিয়ম findSqrt-এর জন্য 1টি test দেয়, যা ভুল। প্রতিটি early return-কে else ধরে code-কে nested ভাবলে নিয়ম 1 + 1 = 2 দেয়।

Branch Coverage

Note 2: 100% statement coverage cannot guarantee 100% decision/branch coverage

Example 1:

public static int makePositive(int number){
   if(number<0){
       number=number*(-1);
   }
   return number;
}

Example 2:

function phoneCall(phoneNumber = "999") {
  return `Calling ${phoneNumber}...`;
}

console.log(phoneCall("01712345678"));
// Output: Calling 01712345678...

console.log(phoneCall());
// Output: Calling 999...

Branch coverage Rules for find out minimum test case

For nested, Branch coverage (count of if+1)

For un-nested conditions

DC=2 always

The rule "DC=2 always" gives 2 tests for division, calculateDiscount, and login, but 100 % ISTQB branch coverage needs 1, 3, and 3 tests. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

Branches. A branch moves control from one node of the control flow graph to another. The move is unconditional (straight-line code) or conditional (a decision outcome). Source 1সোর্স 1 The glossary defines branch coverage as the coverage of the branches of a control flow graph. Source 4সোর্স 4

Conditional branches. Conditional branches are typically the true or false outcome of an if...then decision. They can also be an outcome of a switch/case statement, or the choice to exit or continue a loop. Source 1সোর্স 1

Coverage. You measure the coverage as a percentage. Divide the number of branches that the tests exercise by the total number of branches. Source 1সোর্স 1

branch coverage = exercised branches / all branches x 100 %

100 % branch coverage. At 100 % branch coverage, the tests exercise all branches, both unconditional and conditional. Source 1সোর্স 1 This still may not find a defect that needs a specific path through the code. Source 1সোর্স 1

Subsumption. Branch coverage subsumes statement coverage. Any set of tests that reaches 100 % branch coverage also reaches 100 % statement coverage. The reverse is not true. Source 1সোর্স 1

Decision coverage. The glossary also defines decision coverage as the coverage of decision outcomes. Source 5সোর্স 5 The examples below count the true and the false outcome of each decision. This is the tutorial's own choice. If you also count the unconditional branches, the percentages change, but the minimum number of tests for these samples stays the same.

Sample 4: makePositive

public static int makePositive(int number){
   if(number<0){
       number=number*(-1);
   }
   return number;
}
TestnumberDecision outcomeStatement coverageDecision outcomes covered
1-5true3 of 3 (100 %)1 of 2 (50 %)
25false2 of 3 (67 %)1 of 2 (50 %)
1 and 2both3 of 3 (100 %)2 of 2 (100 %)

Test 1 alone reaches 100 % statement coverage, but only 50 % of the decision outcomes. This is the case that the syllabus describes: statement coverage can be full while branch coverage is not. Source 1সোর্স 1 The true and the false outcome exclude each other in one run. So the minimum is 2 tests.

Sample 5: phoneCall

function phoneCall(phoneNumber = "999") {
  return `Calling ${phoneNumber}...`;
}

console.log(phoneCall("01712345678"));
// Output: Calling 01712345678...

console.log(phoneCall());
// Output: Calling 999...

The function has one executable statement, the return. One call reaches 100 % statement coverage.

Default value as a decision. The syllabus names if, switch/case, and loops as typical decisions. Source 1সোর্স 1 A default value is not on that list. This tutorial counts it as a decision, because the code takes a different path when the caller gives no argument. That reading is the tutorial's own. With it, the function has 2 paths. The two console.log calls of the sample are the minimum set of 2 tests.

Sample 2 again: the voter check

The voter check from the previous topic has 3 decisions with 6 outcomes. The four tests of that topic cover all of them.

TestageOuter if (age>=0)Voter ifage>100 if
118truetruenot reached
2101truefalsetrue
310truefalsefalse
4-1falsenot reachednot reached

The outcomes "outer if false", "voter if true", "age>100 true", and "age>100 false" exclude each other. Each one ends the run with a different message. So the minimum is 4 tests.

Check the rules of the notes

The "My notes" version gives two rules to count tests. For nested conditions: the number of if plus 1. For un-nested conditions: always 2.

SampleRule that appliesRule givesMinimum by reasoningResult
findSqrtun-nested22Right
The voter checknested, 3 if parts (the if, the inner if, the else if)44Right
makePositiveun-nested22Right
phoneCallun-nested, with the default value as a decision22Right
divisionun-nested21Wrong

This check is the tutorial's own. The rule "DC=2 always" gives 2 tests for division. But division has no decision, so it has only unconditional branches. One test reaches 100 % branch coverage. The rule fits only code that has at least one decision. The Unit Testing and Integration Testing in Code topics show two more samples where the rule fails.

সহজ English

Note 2: 100 % statement coverage cannot guarantee 100 % decision or branch coverage.

The notes show two examples: a makePositive method with one if, and a phoneCall function with the default phone number "999".

The notes give rules to find the minimum number of test cases for branch coverage:

  • For nested conditions: the number of if plus 1.
  • For un-nested conditions: DC=2, always.

The rule "DC=2 always" gives 2 tests for division, calculateDiscount, and login. But 100 % ISTQB branch coverage needs 1, 3, and 3 tests.

A branch moves control from one node of the control flow graph to another. It is unconditional (straight-line code) or conditional, for example the true or false outcome of an if Source 1সোর্স 1. Branch coverage is the percentage of all branches that the tests exercise Source 1সোর্স 1. 100 % branch coverage also gives 100 % statement coverage, but not the reverse Source 1সোর্স 1. It can still miss a defect that needs a specific path Source 1সোর্স 1.

The tutorial's samples count the true and false outcome of each decision:

  • makePositive: the test with -5 runs all statements, but covers 1 of 2 outcomes. The minimum is 2 tests.
  • phoneCall: the tutorial counts the default value as a decision. The minimum is 2 tests.
  • The voter check: 3 decisions, 6 outcomes, minimum 4 tests.

division has no decision, so 1 test reaches 100 % branch coverage, not 2.

বাংলা ব্যাখ্যা

Note 2: 100 % statement coverage থাকলেই 100 % decision/branch coverage-এর নিশ্চয়তা নেই।

Notes-এ দুটি উদাহরণ আছে: একটি if সহ makePositive method, আর default phone number "999" সহ phoneCall function।

Branch coverage-এর জন্য সবচেয়ে কম test case বের করার নিয়ম:

  • Nested condition-এর জন্য: if-এর সংখ্যা + 1।
  • Un-nested condition-এর জন্য: সবসময় DC=2।

"DC=2 always" নিয়ম division, calculateDiscount এবং login-এর জন্য 2টি test দেয়। কিন্তু 100 % ISTQB branch coverage-এর জন্য লাগে যথাক্রমে 1, 3 এবং 3টি test।

Branch হলো control flow graph-এর এক node থেকে আরেক node-এ control যাওয়া। এটি unconditional (straight-line code) বা conditional (একটি decision outcome) হতে পারে Source 1সোর্স 1। Glossary branch coverage-কে control flow graph-এর branch-গুলোর coverage বলে Source 4সোর্স 4। Conditional branch সাধারণত if...then decision-এর true বা false outcome; এটি switch/case-এর outcome, অথবা loop থেকে বের হওয়া বা চালিয়ে যাওয়ার সিদ্ধান্তও হতে পারে Source 1সোর্স 1।

Test যতগুলো branch exercise করে, তাকে মোট branch দিয়ে ভাগ করে শতাংশে coverage মাপা হয় Source 1সোর্স 1। 100 % branch coverage থাকলে 100 % statement coverage-ও থাকে, কিন্তু উল্টোটা সত্য নয় Source 1সোর্স 1। তবু নির্দিষ্ট path দরকার এমন defect ধরা না-ও পড়তে পারে Source 1সোর্স 1।

Tutorial-এর নিজস্ব পছন্দে উদাহরণগুলো প্রতিটি decision-এর true ও false outcome গোনে।

  • makePositive: -5 দিয়ে test সব statement চালায়, কিন্তু 2টির মধ্যে মাত্র 1টি outcome cover করে। কমপক্ষে 2টি test লাগে।
  • phoneCall: tutorial নিজের ব্যাখ্যায় default value-কে decision ধরে, তাই কমপক্ষে 2টি test লাগে।
  • Voter check: 3টি decision, 6টি outcome; কমপক্ষে 4টি test লাগে।

"DC=2 always" নিয়ম division-এর জন্য ভুল। এতে কোনো decision নেই, তাই 1টি test-এই 100 % branch coverage হয়।

Condition Testing

Condition Testing: Checks individual conditions inside complex logic, especially when multiple conditions are combined.

ISTQB does not include condition testing in its Foundation syllabus, which covers only statement testing and branch testing as white-box techniques. Switch to the ISTQB version at the top of the page to see the ISTQB definition.

The Foundation syllabus does not cover condition testing. Its section on white-box techniques names only statement testing and branch testing. Source 1সোর্স 1

Glossary. The glossary does define the term. Condition testing is a white-box technique in which the test conditions are outcomes of atomic conditions. Source 6সোর্স 6 The glossary shows the term only for a specialist syllabus (Automotive Software Tester), not for the Foundation syllabus. Source 6সোর্স 6 An atomic condition is a condition that has no logical operators. Source 7সোর্স 7

Atomic conditions. In age>=18 && age<=100, the operator && joins two atomic conditions: age>=18 and age<=100. Each atomic condition has two outcomes, true and false.

The tutorial's own explanation

The worked examples below are the tutorial's own analysis, not ISTQB text. In JavaScript, && and || skip the right side when the left side already gives the result. A skipped condition has no outcome in that test. The tables mark it "not evaluated".

The voter check

The voter check has four atomic conditions: age>=0, age>=18, age<=100, and age>100. The four statement tests of the Statement Coverage topic cover all 8 outcomes.

Testageage>=0age>=18age<=100age>100
118truetruetruenot evaluated
2101truetruefalsetrue
310truefalsenot evaluatedfalse
4-1falsenot evaluatednot evaluatednot evaluated

The outcomes "age>=0 false", "age>=18 false", "age<=100 true", and "age>100 true" need four different ranges of age. So 4 tests is the minimum. For this sample, condition outcomes need no more tests than branches.

A case where branch coverage is not enough

The second if of calculateDiscount (the full function is in the Unit Testing topic) has a compound decision.

if (discountPercent < 0 || discountPercent > 100) {
  return "Invalid discount";
}

Two values of discountPercent give 100 % decision coverage for this if: one value that makes it true, and one that makes it false. But 2 values leave one atomic outcome unexercised.

discountPercentdiscountPercent < 0discountPercent > 100Decision
120falsetruetrue
10falsefalsefalse
-5truenot evaluatedtrue

The values 120 and 10 reach 2 of 2 decision outcomes, but only 3 of 4 atomic outcomes. The outcome "discountPercent < 0 true" needs a third value such as -5. A defect in the check for a negative discount can hide from a test set that has 100 % branch coverage.

সহজ English

Condition testing checks each condition inside complex logic, mainly when several conditions are combined.

ISTQB does not include condition testing in its Foundation syllabus. That syllabus covers only statement testing and branch testing as white-box techniques.

The Foundation syllabus does not cover condition testing. It names only statement testing and branch testing as white-box techniques Source 1সোর্স 1.

The glossary defines the term. In condition testing, the test conditions are the outcomes of atomic conditions Source 6সোর্স 6. The glossary shows the term only for a specialist syllabus, Automotive Software Tester Source 6সোর্স 6. An atomic condition has no logical operators Source 7সোর্স 7. For example, age>=18 && age<=100 joins two atomic conditions.

The examples are the tutorial's own analysis, not ISTQB text.

  • The voter check has 4 atomic conditions with 8 outcomes. The 4 statement tests cover all of them.
  • In calculateDiscount, the values 120 and 10 cover both decision outcomes of discountPercent < 0 || discountPercent > 100, but never make discountPercent < 0 true. A third value such as -5 is necessary. So a defect in the negative check can hide at 100 % branch coverage.

বাংলা ব্যাখ্যা

Condition Testing: জটিল logic-এর ভেতরের প্রতিটি condition আলাদাভাবে check করে, বিশেষ করে যখন একাধিক condition একসঙ্গে থাকে।

ISTQB তার Foundation syllabus-এ condition testing রাখেনি। সেখানে white-box technique হিসেবে শুধু statement testing আর branch testing আছে।

Foundation syllabus condition testing cover করে না। এর white-box technique অংশে শুধু statement testing আর branch testing আছে Source 1সোর্স 1।

তবে glossary শব্দটির definition দেয়: condition testing একটি white-box technique, যেখানে test condition হলো atomic condition-এর outcome Source 6সোর্স 6। Glossary শব্দটি শুধু একটি specialist syllabus (Automotive Software Tester)-এর জন্য দেখায়, Foundation syllabus-এর জন্য নয় Source 6সোর্স 6। Atomic condition হলো এমন condition, যাতে কোনো logical operator নেই Source 7সোর্স 7। যেমন age>=18 && age<=100-এ && দুটি atomic condition জোড়া দেয়: age>=18 আর age<=100। প্রতিটির দুটি outcome: true আর false।

নিচের উদাহরণগুলো tutorial-এর নিজস্ব বিশ্লেষণ, ISTQB-এর লেখা নয়। JavaScript-এ বাঁ দিক থেকেই ফল জানা গেলে && আর || ডান দিক skip করে। Skip হওয়া condition-এর সেই test-এ কোনো outcome থাকে না।

  • Voter check-এ 4টি atomic condition আছে। Statement Coverage topic-এর 4টি test এদের 8টি outcome-ই cover করে, আর 4টি test-ই সর্বনিম্ন।
  • calculateDiscount-এর discountPercent < 0 || discountPercent > 100 decision-এ 120 আর 10 দুটি decision outcome-ই cover করে, কিন্তু 4টির মধ্যে মাত্র 3টি atomic outcome। "discountPercent < 0 true" পেতে -5-এর মতো তৃতীয় একটি মান লাগে। তাই 100 % branch coverage থাকলেও negative discount check-এর defect লুকিয়ে থাকতে পারে।

Unit Testing

Unit testing ensures to pass a function with several datasets.

function calculateDiscount(price, discountPercent) {
  if (price <= 0) {
    return "Invalid price";
  }

  if (discountPercent < 0 || discountPercent > 100) {
    return "Invalid discount";
  }

  const discountAmount = (price * discountPercent) / 100;
  return price - discountAmount;
}

Example unit test cases:

console.log(calculateDiscount(1000, 10));
// Expected output: 900

console.log(calculateDiscount(500, 20));
// Expected output: 400

console.log(calculateDiscount(0, 10));
// Expected output: Invalid price

console.log(calculateDiscount(1000, 120));
// Expected output: Invalid discount

Component testing. The syllabus calls this level component testing, also known as unit testing. It tests components in isolation. Source 1সোর্স 1 It often needs special support, for example a test harness or a unit test framework. Source 1সোর্স 1 Developers normally run it in their development environments. Source 1সোর্স 1

Glossary. The glossary defines unit testing as a test level that evaluates the smallest part of code that you can test in isolation. Source 8সোর্স 8

A level, not a technique. Unit testing is a level, not a technique. You choose the techniques. You can apply white-box testing at any test level. Source 1সোর্স 1 So you can design unit tests from the statements and branches of the code. Source 1সোর্স 1

Sample 6: calculateDiscount

function calculateDiscount(price, discountPercent) {
  if (price <= 0) {
    return "Invalid price";
  }

  if (discountPercent < 0 || discountPercent > 100) {
    return "Invalid discount";
  }

  const discountAmount = (price * discountPercent) / 100;
  return price - discountAmount;
}

The function has 6 executable statements, 4 decision outcomes (2 for each if), and 3 atomic conditions (6 outcomes). The three return statements exclude each other.

The notes give 4 unit test cases. This table shows what each one reaches.

TestCallExpectedStatements (of 6)Decision outcomes (of 4)Atomic outcomes (of 6)
1calculateDiscount(1000, 10)900423
2calculateDiscount(500, 20)4004 (no new)2 (no new)3 (no new)
3calculateDiscount(0, 10)Invalid price211
4calculateDiscount(1000, 120)Invalid discount323
All four6 of 6 (100 %)4 of 4 (100 %)5 of 6 (83 %)

The four tests reach 100 % statement coverage and 100 % decision outcome coverage. Test 2 adds no coverage. No test makes discountPercent < 0 true, so the atomic outcomes stay at 5 of 6.

The minimum test sets (by reasoning)

The "My notes" version gives two rules to count tests.

CoverageMinimumWhyExample set
Statement3The three return statements exclude each other.(0, 10), (1000, 120), (1000, 10)
Branch (decision outcomes)3The outcomes "first if true", "second if true", and "second if false" exclude each other.the same three
Atomic condition outcomes4Add a value below 0. A test with discountPercent < 0 true skips discountPercent > 100, so the false outcome of that condition needs another test.the three above and (1000, -5)

This check is the tutorial's own. The notes' rule for un-nested code gives 1 test for statement coverage and 2 tests for branch coverage, but calculateDiscount needs 3 for each. The two if statements are in a row, but each ends in return, so each one works like an else. Count each early return like an else, and treat the code as nested. Then the nested rules match: for statements, 2 else plus 1 give 3. For branches, 2 if plus 1 give 3.

White-box tests may miss a requirement that the code does not implement. Source 1সোর্স 1

The tutorial's own advice

Coverage shows which code the tests run. It does not show that the expected results are right. Add black-box tests to the white-box tests. Use boundary value analysis. For this function, test price 0 and 1, and discountPercent -1, 0, 100, and 101. These values find a wrong operator, for example < coded instead of <=.

সহজ English

Unit testing makes sure that a function passes with several sets of data.

The notes show a calculateDiscount(price, discountPercent) function. It returns "Invalid price" when price is 0 or less. It returns "Invalid discount" when discountPercent is below 0 or above 100. In other cases, it returns the price minus the discount.

The notes give four unit test cases:

  • calculateDiscount(1000, 10) expects 900.
  • calculateDiscount(500, 20) expects 400.
  • calculateDiscount(0, 10) expects "Invalid price".
  • calculateDiscount(1000, 120) expects "Invalid discount".

The syllabus calls this level component testing, or unit testing. It tests components in isolation, often with a test harness or a unit test framework Source 1সোর্স 1. The glossary says that it evaluates the smallest part of code that you can test in isolation Source 8সোর্স 8. Unit testing is a level, not a technique. So you can design unit tests from the statements and branches of the code Source 1সোর্স 1.

The notes' four tests give calculateDiscount 100 % statement and decision outcome coverage. No test makes discountPercent < 0 true, so the atomic outcomes stay at 5 of 6.

The three returns exclude each other, so statements and branches each need at least 3 tests, not 1 and 2 as the notes' rule says. Atomic outcomes need 4.

White-box tests may miss a requirement that the code does not implement Source 1সোর্স 1. The tutorial's own advice: add black-box boundary value tests too.

বাংলা ব্যাখ্যা

Unit testing নিশ্চিত করে যে একটি function বিভিন্ন dataset দিয়ে pass করে।

Notes-এ একটি calculateDiscount(price, discountPercent) function আছে। price 0 বা তার কম হলে এটি "Invalid price" return করে। discountPercent 0-এর কম বা 100-এর বেশি হলে "Invalid discount" return করে। অন্য ক্ষেত্রে price থেকে discount বাদ দিয়ে বাকি মান return করে।

উদাহরণ unit test case:

  • calculateDiscount(1000, 10): expected output 900।
  • calculateDiscount(500, 20): expected output 400।
  • calculateDiscount(0, 10): expected output "Invalid price"।
  • calculateDiscount(1000, 120): expected output "Invalid discount"।

Syllabus এই level-কে component testing বলে, যার আরেক নাম unit testing। এটি component-গুলোকে আলাদাভাবে (in isolation) test করে। প্রায়ই এর জন্য test harness বা unit test framework-এর মতো বিশেষ সহায়তা লাগে। সাধারণত developer-রা নিজেদের development environment-এ এটি চালান Source 1সোর্স 1। Glossary অনুযায়ী unit testing হলো এমন একটি test level, যা code-এর সবচেয়ে ছোট অংশ যাচাই করে, যেটি আলাদাভাবে test করা যায় Source 8সোর্স 8।

Unit testing একটি level, technique নয়। White-box testing যেকোনো test level-এ ব্যবহার করা যায়, তাই code-এর statement ও branch থেকে unit test design করা যায় Source 1সোর্স 1।

Notes-এর 4টি test মিলে calculateDiscount-এর 100 % statement coverage আর 100 % decision outcome coverage দেয়। Test 2 নতুন কোনো coverage যোগ করে না। কোনো test discountPercent < 0-কে true করে না, তাই atomic outcome 6টির মধ্যে 5টি থাকে।

তিনটি return একসঙ্গে চলে না, তাই statement ও branch coverage-এর জন্য কমপক্ষে 3টি test লাগে। Atomic outcome-এর জন্য লাগে 4টি, যেমন (1000, -5) যোগ করে। Notes-এর un-nested নিয়ম 1 আর 2 দেয়, যা ভুল।

White-box test code-এ implement না হওয়া requirement মিস করতে পারে Source 1সোর্স 1। Tutorial-এর নিজস্ব পরামর্শ: black-box test-ও যোগ করুন, যেমন boundary value analysis দিয়ে price 0 ও 1, এবং discountPercent -1, 0, 100 ও 101।

Integration Testing in Code

Integration Testing means testing whether two or more modules, components, APIs, services, or systems work together correctly.

Here is a simple integration testing example with code.

Suppose we have two modules:

  1. userService → finds user from database
  2. authService → uses userService to login user

1. User Service

// userService.js

const users = [
  {
    id: 1,
    email: "user@example.com",
    password: "123456",
  },
];

function findUserByEmail(email) {
  return users.find((user) => user.email === email);
}

module.exports = { findUserByEmail };

2. Auth Service

// authService.js

const { findUserByEmail } = require("./userService");

function login(email, password) {
  const user = findUserByEmail(email);

  if (!user) {
    return "User not found";
  }

  if (user.password !== password) {
    return "Invalid password";
  }

  return "Login successful";
}

module.exports = { login };

3. Integration Test

// auth.integration.test.js

const { login } = require("./authService");

test("should login successfully with valid email and password", () => {
  const result = login("user@example.com", "123456");

  expect(result).toBe("Login successful");
});

test("should return invalid password for wrong password", () => {
  const result = login("user@example.com", "wrongpass");

  expect(result).toBe("Invalid password");
});

test("should return user not found for unknown email", () => {
  const result = login("unknown@test.com", "123456");

  expect(result).toBe("User not found");
});

Component integration testing focuses on the interfaces and the interactions between components. Source 1সোর্স 1 The glossary defines it as the integration testing of components. Source 9সোর্স 9 It depends heavily on the integration strategy: bottom-up, top-down, or big-bang. Source 1সোর্স 1

System integration testing is a different level. It tests the interfaces that connect your system to other systems and to external services. Source 1সোর্স 1 It needs suitable test environments. They should preferably resemble the operational environment. Source 1সোর্স 1

What you connectISTQB level
Two modules or classes of one programComponent integration testing Source 1সোর্স 1
Your system and another system or an external serviceSystem integration testing Source 1সোর্স 1

Sample 7: userService and authService

// userService.js

const users = [
  {
    id: 1,
    email: "user@example.com",
    password: "123456",
  },
];

function findUserByEmail(email) {
  return users.find((user) => user.email === email);
}

module.exports = { findUserByEmail };
// authService.js

const { findUserByEmail } = require("./userService");

function login(email, password) {
  const user = findUserByEmail(email);

  if (!user) {
    return "User not found";
  }

  if (user.password !== password) {
    return "Invalid password";
  }

  return "Login successful";
}

module.exports = { login };
// auth.integration.test.js

const { login } = require("./authService");

test("should login successfully with valid email and password", () => {
  const result = login("user@example.com", "123456");

  expect(result).toBe("Login successful");
});

test("should return invalid password for wrong password", () => {
  const result = login("user@example.com", "wrongpass");

  expect(result).toBe("Invalid password");
});

test("should return user not found for unknown email", () => {
  const result = login("unknown@test.com", "123456");

  expect(result).toBe("User not found");
});

The two modules run in one program, and the user list is an array in memory. So this sample is a component integration test. It would be a system integration test if findUserByEmail called another system, for example an external user directory service.

The white-box view of the sample

The three tests follow the three exits of login. The function has 6 executable statements and 4 decision outcomes.

The "My notes" version gives two rules to count tests.

TestCallResultStatements (of 6)Decision outcomes (of 4)
1login("user@example.com", "123456")Login successful42
2login("user@example.com", "wrongpass")Invalid password42
3login("unknown@test.com", "123456")User not found31
All three6 of 6 (100 %)4 of 4 (100 %)

The three return statements exclude each other. So the minimum is 3 tests for statement coverage and for branch coverage. The three tests of the notes are this minimum set. They also use both results of the interface between the modules: a user is found, and no user is found.

This check is the tutorial's own. The notes' rule for un-nested code gives 1 test for statement coverage and 2 tests for branch coverage, but login needs 3 for each. Both if statements end in return, so each one works like an else. Count each early return like an else, and treat the code as nested. Then the nested rules match: 2 plus 1 give 3 for statements and for branches.

সহজ English

Integration testing checks that two or more modules, components, APIs, services, or systems work together correctly.

The notes give a simple example with two modules:

  1. userService finds a user in the database.
  2. authService uses userService to log in a user. Its login function returns "User not found", "Invalid password", or "Login successful".

The integration test has three tests:

  • A valid email and password expect "Login successful".
  • A wrong password expects "Invalid password".
  • An unknown email expects "User not found".

Component integration testing tests the interfaces and the interactions between components Source 1সোর্স 1. It depends heavily on the integration strategy: bottom-up, top-down, or big-bang Source 1সোর্স 1.

System integration testing is a different level. It tests the interfaces between your system and other systems or external services Source 1সোর্স 1.

In the sample, the two modules run in one program, and the user list is in memory. So it is a component integration test. It would be a system integration test if findUserByEmail called another system.

login has 6 statements and 4 decision outcomes. Its three returns exclude each other, so the minimum is 3 tests for statement coverage and for branch coverage. The three tests of the notes are this minimum set. They also use both results of the interface: a user is found, and no user is found. The notes' rule gives 1 and 2, which is wrong.

বাংলা ব্যাখ্যা

Integration Testing মানে দুই বা তার বেশি module, component, API, service বা system একসঙ্গে ঠিকভাবে কাজ করে কিনা, তা test করা।

Notes-এ code সহ একটি সহজ উদাহরণ আছে, যেখানে দুটি module:

  1. userService: database থেকে user খুঁজে বের করে।
  2. authService: user-কে login করাতে userService ব্যবহার করে। এর login function "User not found", "Invalid password" অথবা "Login successful" return করে।

Integration test-এ তিনটি test আছে:

  • সঠিক email ও password দিলে "Login successful" আশা করা হয়।
  • ভুল password দিলে "Invalid password" আশা করা হয়।
  • অজানা email দিলে "User not found" আশা করা হয়।

Component integration testing component-গুলোর মধ্যকার interface আর interaction-এর ওপর জোর দেয় Source 1সোর্স 1। Glossary একে component-এর integration testing বলে Source 9সোর্স 9। এটি integration strategy-র ওপর অনেক নির্ভর করে: bottom-up, top-down বা big-bang Source 1সোর্স 1।

System integration testing আলাদা একটি level। এটি আপনার system-কে অন্য system ও external service-এর সঙ্গে যুক্ত করা interface test করে। এর জন্য উপযুক্ত test environment লাগে, যা সম্ভব হলে operational environment-এর মতো হওয়া উচিত Source 1সোর্স 1।

Sample-এ দুটি module একই program-এ চলে, আর user list memory-তে থাকা একটি array। তাই এটি component integration test। findUserByEmail যদি অন্য কোনো system, যেমন একটি external user directory service, call করত, তাহলে এটি system integration test হতো।

login-এ 6টি executable statement আর 4টি decision outcome আছে। তিনটি return একসঙ্গে চলে না, তাই statement ও branch coverage-এর জন্য কমপক্ষে 3টি test লাগে। Notes-এর তিনটি test-ই এই সর্বনিম্ন set। এগুলো module-এর মধ্যকার interface-এর দুটি ফলই ব্যবহার করে: user পাওয়া যায়, আর user পাওয়া যায় না। Notes-এর un-nested নিয়ম 1 আর 2 দেয়, যা ভুল।

White-Box Review Checklist

  • Is the business logic implemented correctly?
  • Are all conditions (if/else, switch cases, loops) properly covered?
  • Has boundary value testing (minimum/maximum limits) been performed?
  • Are null, empty, and undefined cases handled properly?
  • Is proper exception handling implemented?
  • Does the system handle invalid input without crashing?
  • Is data validation applied?
  • Are error messages meaningful and user-friendly?

You can use white-box techniques without running the code. The syllabus names dry runs of code as an example. Source 1সোর্স 1 Source code is one of the work products that static testing can examine. Source 1সোর্স 1 Static testing finds defects directly. It may more easily find defects on paths that tests rarely execute or can hardly reach. Source 1সোর্স 1

In a review, each reviewer works alone first. A reviewer may use a technique such as checklist-based reviewing. Source 1সোর্স 1 So a code review checklist is a checklist for static testing.

The syllabus gives rules for the checklists of checklist-based testing. Source 1সোর্স 1

  • Leave out items that a tool can check automatically, items that suit entry or exit criteria better, and items that are too general.
  • Items are often questions. A reviewer can check each item separately and directly.
  • Update the checklist from defect analysis, and keep it short.

The tutorial's own review of the checklist

This tutorial uses the same rules for a review checklist. The table is the tutorial's own check of the notes' list against those rules.

Item of the notesCheck
Is the business logic implemented correctly?Too general. Write one question for each business rule.
Are all conditions (if/else, switch cases, loops) properly covered?A coverage tool can measure this. Use the tool instead.
Has boundary value testing (minimum/maximum limits) been performed?Fine. One direct question.
Are null, empty, and undefined cases handled properly?Fine. One direct question.
Is proper exception handling implemented?Fine, if the team agrees what "proper" means.
Does the system handle invalid input without crashing?Fine. Test one invalid input for each field.
Is data validation applied?Fine. One direct question.
Are error messages meaningful and user-friendly?Fine, if the team agrees what "meaningful" means.

সহজ English

Ask these questions in a white-box review:

  • Is the business logic correct?
  • Are all conditions (if/else, switch cases, loops) covered?
  • Did you do boundary value testing (minimum and maximum limits)?
  • Does the code handle null, empty, and undefined cases correctly?
  • Is there correct exception handling?
  • Does the system handle invalid input and not crash?
  • Is there data validation?
  • Are the error messages meaningful and easy for the user?

You can use white-box techniques without running the code, for example in dry runs Source 1সোর্স 1. Static testing can examine source code, and it finds defects directly Source 1সোর্স 1.

In a review, each reviewer first works alone, and can use checklist-based reviewing Source 1সোর্স 1. So a code review checklist is a static testing checklist.

The syllabus gives checklist rules Source 1সোর্স 1:

  • Leave out items that a tool can check, items that fit better as entry or exit criteria, and items that are too general.
  • Items are often questions that a reviewer can check one by one.
  • Update the checklist from defect analysis, and keep it short.

The tutorial's own check of the notes' list: "business logic" is too general, so write one question for each business rule. A coverage tool can measure the "conditions" item. The others are fine. "Proper" and "meaningful" need a meaning that the team agrees on.

বাংলা ব্যাখ্যা

  • Business logic কি সঠিকভাবে implement করা হয়েছে?
  • সব condition (if/else, switch case, loop) কি ঠিকভাবে cover করা হয়েছে?
  • Boundary value testing (minimum/maximum limit) কি করা হয়েছে?
  • Null, empty এবং undefined case কি ঠিকভাবে handle করা হয়েছে?
  • সঠিক exception handling কি implement করা হয়েছে?
  • System কি crash না করে invalid input handle করে?
  • Data validation কি প্রয়োগ করা হয়েছে?
  • Error message কি অর্থবহ এবং user-friendly?

Code না চালিয়েও white-box technique ব্যবহার করা যায়; syllabus উদাহরণ হিসেবে code-এর dry run-এর কথা বলে Source 1সোর্স 1। Static testing যেসব work product পরীক্ষা করতে পারে, source code তার একটি Source 1সোর্স 1। Static testing সরাসরি defect খুঁজে পায়, এবং যেসব path-এ test কম চলে বা পৌঁছানো কঠিন, সেখানকার defect আরও সহজে ধরতে পারে Source 1সোর্স 1।

Review-তে প্রত্যেক reviewer প্রথমে একা কাজ করেন, এবং checklist-based reviewing-এর মতো technique ব্যবহার করতে পারেন Source 1সোর্স 1। তাই code review checklist হলো static testing-এর একটি checklist।

Checklist-এর জন্য syllabus কিছু নিয়ম দেয় Source 1সোর্স 1:

  • যেসব item tool দিয়ে automatically check করা যায়, যেগুলো entry বা exit criteria হিসেবে বেশি মানায়, আর যেগুলো খুব general, সেগুলো বাদ দিন।
  • Item প্রায়ই প্রশ্ন আকারে থাকে, যা reviewer একটি একটি করে check করতে পারেন।
  • Defect analysis থেকে checklist update করুন, এবং এটি ছোট রাখুন।

Notes-এর তালিকার জন্য Tutorial-এর নিজস্ব যাচাই: "business logic" প্রশ্নটি খুব general, তাই প্রতিটি business rule-এর জন্য একটি করে প্রশ্ন লিখুন। "Conditions" item coverage tool দিয়ে মাপা যায়, তাই tool ব্যবহার করুন। বাকি item-গুলো ঠিক আছে; তবে "proper" আর "meaningful" মানে কী, তা নিয়ে team-কে একমত হতে হবে।

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    Certified Tester Foundation Level Syllabus v4.0.1

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  2. [2]
    ISTQB Glossary: white-box testing

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  3. [3]
    ISTQB Glossary: statement coverage

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  4. [4]
    ISTQB Glossary: branch coverage

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  5. [5]
    ISTQB Glossary: decision coverage

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  6. [6]
    ISTQB Glossary: condition testing

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  7. [7]
    ISTQB Glossary: atomic condition

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  8. [8]
    ISTQB Glossary: unit testing

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  9. [9]
    ISTQB Glossary: component integration testing

    ISTQB · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

Topicsটপিকসমূহ