Tutorials Hut

  • Testing Foundation

      Basics of Software Testing
       What is Software Testing?
       Objective of Testing
       Why is testing necessary?
       Common Terms used in Testing
       Verification Vs Validations
       QA Vs QC
       Debugging Vs Testing
       Seven Testing Principles
       SDLC Vs STLC
       Fundamentals of Test Process
       Software quality Factors
       Software Development Models
       Waterfall Model
       V models
       Iterative Model
       Test Levels
       Component Testing
       Integration Testing
       System Testing
       Acceptance Testing
       Strategies for Integration Testing
       Big Bang
       Stubs and Driver
       Top Down Testing
       Bottom Up Testing
       Test Types
       Functional Testing
       Non- Functional Testing
       Structural Testing
       Re-testing & Regression Testing
       Static AND Dynamic Techniques
       Static Technique
       Dynamic Technique
       Static Analysis by Tools
       White Box Techniques
       Statement Coverage Testing
       Branch Coverage Testing
       Decision Coverage Testing
       Path Coverage
       Black Box Techniques
       Equivalence Partitioning
       Boundary Value Analysis
       Decision Table testing
       State Transition testing
       Experience Based TestingTechniques
       Random Testing
       Exploratory Testing
       Error Guessing
       Functional Testing
       Integration Testing
       Unit Testing
       System Testing
       Smoke testing
       Sanity testing
       Regression Testing
       Usability Testing
       Security Testing
       User Acceptance Testing
       White Box & Black Box Testing
       Globalization & Localization Testing
       Non Functional Testing
       Compatibility testing
       Endurance testing
       Load testing
       Performance testing
       Recovery testing
       Scalability testing
       Stress testing
       Volume testing
       Test Planning and Estimation
       Test Planning
       Test Strategies Vs Test Plan
       Test Approaches
       Risk and Testing
       Product Risks
       Project Risks
       Defect Management
       Defect LifeCycle
       Severity Vs Priority
  • What is Branch Coverage Testing ?

    Branch Coverage is a white box testing method in which every outcome from a code module(statement or loop) is tested. The purpose of branch coverage is to ensure that each decision condition from every branch is executed at least once. It helps to measure fractions of independent code segments and to find out sections having no branches.

    Branch Coverage testing is important in ensuring that the software is robust and that all possible paths through the application are thoroughly tested. In this article, we will take a closer look at what branch coverage testing is, how it works, and why it is important.

    It uses a control flow graph to calculate the number of branches.

    Branch Coverage =  Total number of Branch Executed 
    / Total No of Branches

    Branch Coverage is sometimes also described as saying that each branch condition must have been true at least once and false at least once during testing.

    How Does Branch Coverage Testing Work?

    Branch coverage testing works by analysing the code in the software application and identifying all of the possible branches that can be executed. Tests are then created to ensure that each branches is executed at least once during the testing process. The results of the tests are then analysed to determine whether all of the branches of code have been executed.

    Why is Branch Coverage Testing Important?

    Branch coverage testing is important because it ensures that all possible scenarios in the software application are tested. This is important in ensuring that the software is robust and that there are no hidden defects that could cause problems in the future. By performing branch coverage testing, testers can ensure that the application is thoroughly tested and that it is ready for release to the public.

    Example:

    To learn branch coverage, let’s consider the below example

    Read A  
    Read B 
    IF A+B > 50 THEN  
    Print "Large"  
    ENDIF 
    If A+B<50 THEN  
    Print "Small"  
    ENDIF 

    Flow Chart of Above Code

    Branch Coverage Testing Decision Coverage testing Path Coverage Testing

    To calculate BranchCoverage, We have to find out the minimum number of paths so that all the edges are covered.

    First Case : traversing through “Yes “decision, the path is 1-2-4-5-6-8  but edges 3 and 7 are not covered in this path.

    Second Case :To cover the edges 3 & 7 as  these are not covered in first step, we have to traverse through “No” decision. In the case of “No” decision the path is 1-3-5-7,

    So by traveling through these two paths, all branches have covered.

    Hence BranchCoverage is 2.

    The main purpose of the Branch Coverage Testing is to make sure every functional test scenario has the ability to cover all the potential branching for functional looping statements.

    Branch Coverage Testing  is used to make sure that all the branches in the code are directed to the essential functional requirements mentioned in the application requirement specification provided by the client or the business stakeholders.

    This technique is also important in ensuring that the software meets regulatory compliance requirements. By using branch coverage testing, testers can ensure that the software is of high quality and meets all industry standards.

    Reference : click on this link

    Recommended Articles:  



  • Testing Foundation

      Basics of Software Testing
       What is Software Testing?
       Objective of Testing
       Why is testing necessary?
       Common Terms used in Testing
       Verification Vs Validations
       QA Vs QC
       Debugging Vs Testing
       Seven Testing Principles
       SDLC Vs STLC
       Fundamentals of Test Process
       Software quality Factors
       Software Development Models
       Waterfall Model
       V models
       Iterative Model
       Test Levels
       Component Testing
       Integration Testing
       System Testing
       Acceptance Testing
       Strategies for Integration Testing
       Big Bang
       Stubs and Driver
       Top Down Testing
       Bottom Up Testing
       Test Types
       Functional Testing
       Non- Functional Testing
       Structural Testing
       Re-testing & Regression Testing
       Static AND Dynamic Techniques
       Static Technique
       Dynamic Technique
       Static Analysis by Tools
       White Box Techniques
       Statement Coverage Testing
       Branch Coverage Testing
       Decision Coverage Testing
       Path Coverage
       Black Box Techniques
       Equivalence Partitioning
       Boundary Value Analysis
       Decision Table testing
       State Transition testing
       Experience Based TestingTechniques
       Random Testing
       Exploratory Testing
       Error Guessing
       Functional Testing
       Integration Testing
       Unit Testing
       System Testing
       Smoke testing
       Sanity testing
       Regression Testing
       Usability Testing
       Security Testing
       User Acceptance Testing
       White Box & Black Box Testing
       Globalization & Localization Testing
       Non Functional Testing
       Compatibility testing
       Endurance testing
       Load testing
       Performance testing
       Recovery testing
       Scalability testing
       Stress testing
       Volume testing
       Test Planning and Estimation
       Test Planning
       Test Strategies Vs Test Plan
       Test Approaches
       Risk and Testing
       Product Risks
       Project Risks
       Defect Management
       Defect LifeCycle
       Severity Vs Priority

















  • Leave a Reply

    Your email address will not be published. Required fields are marked *