February 28, 2021

Data Flow Testing in Software Testing | White Box Testing


This post is on Data Flow Testing. What is data flow testing? Data flow testing in software testing is white box testing. Data flow testing is also a structured testing methodology, based on your program's internal structure. Data flow testing focuses on variables' definition and use. A variable is a memory location that can store a value. A variable's value can be used in a condition or a calculation. Now, in a program, it is possible for the developer to use a variable that doesn't exist or update a variable's value by error. In data flow testing, you examine the variables in your program. View my Data Flow Testing tutorial for more details or read on.
Data flow testing strategies in software testing include:
1) Define Use Testing - DU Testing has some rules and metrics. It tests the paths of the Control Flow Graph (view my Path Testing tutorial to learn about Control Flow Graph) that have a variable defined or used.

2) Program Slices - Program slices strategy divides the program into executable sections, for a variable. You could then test a single program slice independently, for that variable.

Let us see the data flow testing example. This example program computes the Sum of some numbers. Here is the Control Flow Graph when the variable n gets a value of 0 (in Node 4).

If the variable n has a non-zero value, a different path is taken in the Control Flow Graph. The reason is that the while loop is also run. Here is the Control Flow Graph when the variable n gets a value of say, 100, the first time (in Node 4) and 0 the second time (in Node 8).
Let us now learn about Define Use Testing. A particular node in the Control Flow Graph can be either a Define Node or Use Node. A variable is given a value in a Define Node. Examples of Define Nodes are Node 2 (the variable i is given a value), Node 3 (the variable sum is given a value), Node 4 (the variable n is given a value) or Node 8 (again, the variable n is given a value). A variable's value is used in a Use Node. Examples of Use Nodes are Node 6 (the value of variable sum is used; also the value of variable n is used) or Node 7 (the value of variable i is used in the computation) or Node 10 (the value of variable i is used; also the value of variable sum is used in the print statement). Learn about P-use (Predicate Use) and C-use (Computation Use) here. In Define Use Testing, you should identify the Define Use nodes for each variable. I have explained how to find the Define nodes and Use nodes for variables i, n and sum here. In Define Use Testing, you should identify some paths according to your chosen Define Use Testing Metrics and test those paths to find bugs.
 
Moving on to Program Slices. This data flow testing strategy is useful when your program is large in size. You could identify a program slice (a set of statements) for a single variable, up to any statement in your program. I have explained how to identify program slices for variables i, n and sum here.

Using both Define Use Testing and Program Slices data flow testing techniques, here are four Define Use Paths (pink table below) to test for variable n. In Data Flow Testing, you could test these paths. Similarly, you could identify the paths to test for variable i and variable sum and test them too.

Want to learn Data Flow Testing in detail? Learn Data Flow Testing Metrics? Then please view the complete Data Flow Testing with Example Tutorial. Thank you.

44 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Thanks for sharing this beautiful information. Keep sharing your views
    Eplatform Tech Tech is your one stop solution for all your business workflow automation by accelerating the power of cloud at every level.

    ReplyDelete
  3. Thank you so much for this nice information. Hope so many people will get aware of this and useful as well. And please keep update like this.

    Indium Software

    ReplyDelete
  4. Awesome post Keep sharing this kind of information!point of sale software

    ReplyDelete
  5. wow! amazing blog I really like it thanks for sharing.
    Software Development in Noida

    ReplyDelete
  6. Thank you for sharing this informative and valuable content here.

    Warehouse Control System

    ReplyDelete
  7. Flexible and scalable, bespoke software increases business output and reduces costs in the long run. As a result, it brings high ground to your enterprise. Hire Software Development Services from Dark Bears for the growth of your business.

    ReplyDelete
  8. Thank You for this wonderful and much required information Best Custom Application Development in USA

    ReplyDelete
  9. Nice Article thanks for share your information kindly refer our website to learn advance software solutions

    software development company in chennai

    ReplyDelete
  10. Thank you for sharing an interesting and very useful article. I believe this is useful. Thank you.
    Software Development in Noida

    ReplyDelete
  11. Amazing post! Your given information is really informative and useful. Thanks for sharing your blog post. For SaaS subscription management platform you can visit our website for such a Best and professional services.

    ReplyDelete
  12. I really enjoyed a lot while reading your blog. This blog is great for learning purpose. Thanks for sharing and many thanks.
    Java Training in Bangalore

    ReplyDelete
  13. Nice blog..clearly explained…Thankyou so much for your wonderful information…Looking for the best testing and performance tools in Hyderabad contact cyanous software solutions now.

    Best testing and performance tools in Hyderabad
    Best software & web development company in Hyderabad

    ReplyDelete
  14. I am really thankful to the blog owner for helping us by giving valuable inputs.Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…Visit here for Software testing services and Test automation Services .

    ReplyDelete
  15. Good Blog Content and Cleared Explanations about the Data Flow Testing in Software Testing, White Box Testing Values.
    Python course Training in Bangalore
    python training institute in Bangalore

    ReplyDelete
  16. Amazing post! Your given information is really informative and useful. Thanks for sharing your blog post. For subscription billing software you can visit our website for such a Best and professional services.

    ReplyDelete
  17. Thank you for sharing this blog.
    Software development is very important for businesses as it helps them distinguish from competitors and become more competitive. If you want to stand out in the competition contact the best software company Jaipur.
    Dark Bears also have a professional Digital marketing team that will help your business/services/product to be at the TOP on search engines.

    ReplyDelete
  18. Thanks for the excellent article, I enjoyed reading it! You will find out if you are ready to operate a supermarket. Because suffescom solutions living in a time of high contagion, the task of establishing a trustworthy security system like in-app development and any other services is essential to allowing clients to buy products from your app without being worried about being taken advantage of maximum result.

    ReplyDelete
  19. This post is so interactive and informative.keep update more information...
    selenium Automated Testing Main Features
    selenium IDE basics

    ReplyDelete
  20. Thanks you and excellent and good to see the best software training courses for freshers and experience candidates to upgade the next level in an Software Industries Technologies,

    Android Training in Bangalore
    Android course in Bangalore
    AngularJS Training in Bangalore
    AngularJS Course in Bangalore
    AngularJS Training Institutes in Bangalore

    ReplyDelete
  21. Great post on data flow testing! Please keep sharing in the same descriptive way.

    Top 7 software testing trends to look out for in 2021

    ReplyDelete
  22. Get the top offshore software development services from Iyrix

    ReplyDelete
  23. Your blog has all the information I was looking for for a long time. I want to thank you for sharing such important information with us. I will share your blog with my friends. I wish you to keep sharing such important blogs with us in the future also. Apart from this, if you ever needManual And Automation Testing, then you can get all the information by clicking on the given link.

    ReplyDelete


  24. Nice post. I was checking constantly this blog and I am impressed! Extremely helpful information specially software testing I care for such info a lot.
    Android App Development Company, New York USA
    Best Software Testing Company in New York, USA

    ReplyDelete
  25. thanks for sharing DeskFlex is one of the easiest-to-use online Conference Room Scheduling Software around. It also enables you to book desks if you’re implementing hot-desking or office hoteling, for a more agile workplace. And you can use it for parking spaces and more.

    ReplyDelete
  26. Thank you for sharing such a useful article. It will be useful to those who are looking for knowledge. Continue to share your knowledge with others through posts like these, and keep posting on
    Big Data Solutions 
    Advanced Data Analytics Services
    Data Modernization Solutions
    AI & ML Service Provider

    ReplyDelete
  27. Thank you for giving this useful information in this article. It's a fantastic article. I'll be waiting for your next update. I also have some useful information about the Best Custom Software Development Company in India, which I believe will be of great use to you.

    ReplyDelete
  28. Thank you for sharing such a useful article. I had a great time. This article was fantastic to read. Continue to publish more articles on

    Data Engineering Services 

    Data Analytics Solutions

    Data Modernization Solutions

    AI & ML Service Provider

    ReplyDelete
  29. Wow admin! An amazing way to help people. You have shared a very useful post I really love it keep going on, thanks for sharing such a wonderful post with us. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Visit here for Product engineering Services.

    ReplyDelete
  30. I am really very happy to visit your blog. Directly I am found which I truly need. please visit our website for more information
    Software Testing Services

    ReplyDelete
  31. I am really very happy to visit your blog. Directly I am found which I truly need. please visit our website for more information
    Quality Engineering Services in USA

    ReplyDelete
  32. This Post is very nice and you can do more work on your blog too.
    Software Automation Implementation Partners  

    ReplyDelete

Note: Only a member of this blog may post a comment.