EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login
Home Software Development Software Development Tutorials Software Testing Tutorial Control Flow Testing
Secondary Sidebar
Software Testing Tutorial
  • Types of Testing
    • Adhoc Testing
    • Types of System Testing
    • Manual Testing Types
    • Unit Testing Types
    • Unit Testing Benefits
    • Agile Testing
    • What is Agile Testing
    • Acceptance Testing
    • Stress Testing Types
    • Alpha and Beta Testing
    • Application Testing
    • Automation Testing
    • Automation Testing Advantages
    • Benchmark Testing
    • Black Box Testing
    • Domain Testing
    • Dynamic Testing
    • Ecommerce Testing
    • Fuzz Testing
    • Gray Box Testing
    • GUI Testing
    • Installation Testing
    • Interface Testing
    • Interoperability Testing
    • Mainframe Testing
    • Manual Testing
    • Mutation Testing
    • Monkey Testing
    • Negative Testing
    • Penetration Testing
    • Penetration testing phases
    • Penetration testing framework
    • Protocol Testing
    • Recovery Testing
    • Regression Testing
    • Mobile Penetration Testing
    • Accessibility Testing
    • Sanity Testing
    • Scalability Testing
    • Security Testing
    • Spike Testing
    • Stability Testing
    • State Transition Testing
    • Static Testing
    • Gatling Load Testing
    • System Integration Testing
    • Structural Testing
    • Locust Load Testing
    • System Testing
    • Control Flow Testing
    • Unit Testing
    • Cypress testing
    • Volume Testing
    • Web Testing Application
    • What is Exploratory Testing
    • What is Stress Testing
    • What is Usability Testing
    • White Box Testing
    • Types of White Box Testing
    • Compatibility Testing?
    • Use Case Testing
    • Beta Testing
    • Integration Testing
    • Non Functional Testing
    • Non Functional Testing Types
    • What is Functional Testing
    • Functional testing types
    • Cookie Testing
    • Alpha Testing
    • Boundary Value Testing
    • Equivalence Class Testing
    • Glass Box Testing
    • SOA Testing
    • Smoke Testing
    • Visual Testing
    • Visual Paradigm
    • Model-Based Testing
  • Basics
    • What is Software Testing
    • Careers in Software Testing
    • Defect Life Cycle in Software Testing
    • Bug Life Cycle
    • Levels of Software Testing
    • Software Testing Life Cycle
    • Software Tester Work
    • Software Testing Principles
    • Software Testing Services
    • Testing Methodologies
    • Test Approaches
    • Grey Box Testing
    • Types of Software Testing
    • What is a Bug in Software Testing
    • Benefits of Automation Testing
    • What is Automation Testing?
    • Types of Automation
    • Typical Journey of a Software Tester
    • Automation Testing Process
    • Mobile Automation Testing
    • Automation Testing Life Cycle
    • Software Quality Assurance
    • Software Quality Assurance
    • What is Test Environment?
    • Verification and Validation Testing
  • Testing techniques
    • Software Testing Methodologies
    • Black Box Testing Techniques
    • Static Testing Techniques
    • Test Case Design Techniques
    • What is Static Analysis
  • Testing tools
    • Manual Testing Tools
    • Visual Testing Tools
    • Automation Testing Tools
    • Functional Testing Tools
    • GUI Testing Tools
    • Penetration Testing Tools
    • Performance Testing Tools
    • SOA Testing Tools
    • Accessibility Testing Tools
    • What is QTP
    • Regression Testing Tools
    • Security Testing Tools
    • Test Management Tools
    • Defect Management Tools
    • Code Coverage Tools
    • Test Coverage Tools
    • Defect Tracking Tools
    • Continuous Integration Tools
    • Install Bugzilla
    • Test data generation tool
    • Unit Testing Tools
    • Web Testing Tools
    • Stress Testing Tools
    • Performance Monitoring Tools
    • Mobile Testing Tools
    • Responsive Testing Tool
    • Cross Browser Testing Tools
    • Risk Based Testing
    • Database Testing Tools
    • WinRunner
    • What is Squish?
    • CubicTest
    • What is WinRM?
    • Bugzilla Tool
    • Code review tools
    • Penetration Testing Open Source Tools
  • Advance
    • Cyclomatic Complexity
    • Decision Table Testing
    • Decision Tree Algorithm
    • What is Continuous Integration
    • Mantis Bug Tracker
    • Equivalence Partitioning
    • Gantt Chart Software
    • Acceptance Testing Types
    • Load testing tools
    • Install TestNG
    • Install Unity
    • Defect Management Process
    • Test Plan Template
    • Testing Interview Questions
    • Testing of Mobile application
    • What is Test Automation Frameworks
    • Test Automation Framework
    • Application of Automation
    • Test Automation Process
    • Automation Testing Roles and Responsibilities
    • What is Instruction Cycle?
    • What is Cucumber?
    • 15 Best Popular Bug Reporting Tools
    • What is Automated Testing?
    • Software Maintenance Types
    • Types of Penetration Testing
    • Software Reliability
    • Best Gantt Chart Software
    • Code Coverage
    • Branch Coverage
    • Decision Coverage
    • Statement Coverage
    • What is Test Case
    • Types of Test Case
    • What is Test Scenario
    • Formal Review
    • Alpha Beta Pruning
    • What is Cyclomatic Complexity?
    • Test Coverage
    • How to Write Test Case
    • Testing Documentation
    • Performance Testing Life Cycle
    • Test Harness
    • Test Strategy
    • Software Incident Management
    • What is Debugging
    • What is Defect?
    • Listeners in TestNG
  • Inteview Questions
    • Automation Testing Interview Questions
    • Manual Testing Interview Questions
    • ISTQB Interview Questions
    • Cucumber Interview Questions
    • Software Testing Interview Questions
    • Penetration Testing Interview Questions

Related Courses

Software Testing Course

Penetration Training Course

TestNG Training Course

Control Flow Testing

By Prosenjit MandalProsenjit Mandal

Control Flow Testing

Introduction to Control Flow Testing

Control flow testing is a software testing technique that uses the control flow technique and it is represented as white box testing. Control flow testing is a testing strategy in a structured manner that depicts the execution order of the statements or instructions given. It is used to develop test cases of a program, where the tester selects a large portion of the program to test and to set the testing path. The whole test cases are represented in the form of a control flow graph like node, edge, and are mostly used in unit testing.

Uses of Control Flow Testing

Control flow testing is one of the white box testing approaches that go through a series of program codes and executes the test cases and another approach is to execute data flow.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

There are various uses of control flow testing which I am going to discuss now:

  • Control flow testing is used for unit testing purposes whose approach is to identify the execution path and depending upon those paths unit cases are written for that and execution is done using program codes.
  • Control flow graphs are created through testing purposes that represents the overall flow of the program, the paths through analysis can be done and various test cases that emerge out from the paths.
  • The control flow graph through testing covers every node and edge of the graph that helps in satisfying the structured data in testing purpose and guarantees proper testing code coverage.

Explain the Notation of Control Flow Testing

Four nodes are used in control flow testing. They are:

1. Node: In the control flow graph, nodes play an important role in creating a path of procedures. The nodes help in representing the sequence of procedures or statements and the order in which it should come. The sequence of order of instructions can be known through the help of the testing team.

In the control flow graph, the nodes represent the set of program statements. There are overall five different types of nodes and in a graph, there is an entry node as well as an exit node.

Control Flow Testing fowchart

This is a control flow graph diagram.

In this diagram, we can see that there is a starting/entry node of the graph. The next process is to assign the nth value and after that, the decision node will have the responsibility to decide the next process whether the value of n is greater than or less than 18. If the value of n is greater or equal to 18 then the process will execute as eligible and if the value of n is less than 18 then the process will execute as non-eligible. In the end, it will pass on to the junction node that is the last node to stop the entire process.

2. Edge: In the control flow graph, an edge is represented as direction arrows in which the nodes are connected to which nodes.

The edge is responsible for connecting the first node until the end node. In the above diagram, it is visible where the arrows are going in linking the nodes and in what direction.

All in One Software Development Bundle(600+ Courses, 50+ projects)
Python TutorialC SharpJavaJavaScript
C Plus PlusSoftware TestingSQLKali Linux
Price
View Courses
600+ Online Courses | 50+ projects | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (86,268 ratings)

3. Decision Node: In the control flow graph, the decision node is one of the most important forms of the node that depicts at which node the process will follow depending upon conditional values.

It is a conditional statement that creates two or more control statements like if or switch statements. In the above example, the decision node takes care of the process that will go next depending upon the value of n. If the value of n is greater than or equal to 18 then the eligible process will execute, otherwise, if the value is less than 18, then the non-eligible process will execute.

4. Junction node: In a control flow graph, the junction node is the point where at least three nodes meet.

Advantages and Disadvantages of Control Flow testing

The advantages and disadvantages are as follows:

Advantages

Below are the advantages;

  • It is a unit testing that uses control flow graphs, pointing as nodes and edges that represent sequences of procedures to execute.
  • In unit testing, major defects can occur. But with the help of testing all the major and minor defects are thoroughly analyzed and tested during the testing phase by the testers and more than half of the defects are determined using it.
  • The control flow testing is also responsible for determining at least one-third of the overall defect in the entire program that helps in analyzing and doing the test cases better.
  • The testing can be done both manually or in a fully automated manner since the control flow graph that represents the sequence of instructions to be executed can be done by using hand i.e. in manual mode and also can be achieved by using software applications i.e. in a fully automated manner.
  • The testing is represented using paths that cover all the nodes and edges, satisfy the overall testing criteria resulting in optimizing the test coverage of the program.

Disadvantages

The disadvantages are:

  • The missing paths is very difficult to find in the entire control flow graph if the graph is huge in size and the entire program and model are controlled by the same person.
  • It is not able to catch all the mistakes during the instantiation of a variable.
  • The mistakes caught during specification cannot be caught all the time during testing.
  • Any mistakes or mismatches, if happen, in the interface is very difficult to catch during testing.
  • It was also unable to focus on the links where a variable got the value and where the values are exactly used.

Conclusion

The control flow testing has been the greatest approach for any unit testing purposes, with the help of control flow graph, it can provide all the valuable information in solving and executing instructions based on conditions given and making it easy using loop statements.

Recommended Articles

This is a guide to Control Flow Testing. Here we discuss the uses of Control Flow Testing along with the advantage and disadvantages. You may also look at the following articles to learn more –

  1. Locust Load Testing
  2. Risk Based Testing
  3. Jira Testing Tool
  4. Structural Testing
Popular Course in this category
Software Testing Training (11 Courses, 2 Projects)
  11 Online Courses |  2 Hands-on Projects |  65+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Penetration Testing Training Program (2 Courses)4.9
TestNG Training (4 Courses, 2 Project)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Software Development Course

C# Programming, Conditional Constructs, Loops, Arrays, OOPS Concept

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more