Software testing techniques Testing criteria based on data flow

Slides:



Advertisements
Similar presentations
Chapter 14 Testing Tactics
Advertisements

DATAFLOW TESTING DONE BY A.PRIYA, 08CSEE17, II- M.s.c [C.S].
Data Flow Coverage. Reading assignment L. A. Clarke, A. Podgurski, D. J. Richardson and Steven J. Zeil, "A Formal Evaluation of Data Flow Path Selection.
White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
CS412/413 Introduction to Compilers Radu Rugina Lecture 37: DU Chains and SSA Form 29 Apr 02.
West Virginia University SENG 530 Verification & Validation Slide 1 Part III: Execution – Based Verification and Validation Katerina Goseva - Popstojanova.
Data Flow Testing (DFT) Data flow testing is NOT the same as constructing Design Diagrams in the form of data-flow-diagrams (DFD) or E-R diagrams. It is.
The Application of Graph Criteria: Source Code  It is usually defined with the control flow graph (CFG)  Node coverage is used to execute every statement.
Unit Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 27, 2007.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 16, 1999.
1 Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
Software Testing and Quality Assurance
Software Testing and Quality Assurance White Box Testing.
Dependable Software Systems
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Constant Propagation. The constant propagation framework is different from all the data-flow problems discussed so far, in that It has an unbounded set.
Topics in Software Dynamic White-box Testing: Data-flow Testing
Topics in Software Dynamic White-box Testing Part 2: Data-flow Testing
Data Flow Testing Data flow testing(DFT) is NOT directly related to the design diagrams of data-flow-diagrams(DFD). It is a form of structural testing.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Data-Flow Analysis. Approaches Static Analysis Inspections Dependence analysis Symbolic execution Software Verification Data flow analysis Concurrency.
Path selection criteria Tor Stålhane & ‘Wande Daramola.
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
Software Testing (Part 2)
Data Flow Testing Chapter Data Flow Testing Testing All-Nodes and All-Edges in a control flow graph may miss significant test cases Testing All-Paths.
CMSC 345 Fall 2000 Unit Testing. The testing process.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Course Outline Traditional Static Program Analysis –Theory –Classic analysis and applications Points-to analysis, CHA, RTA –The Soot analysis framework.
White-Box Testing Techniques II Originals prepared by Stephen M. Thebaut, Ph.D. University of Florida Dataflow Testing.
Implementation-Based Testing Review Class 9 Implementation-based Testing CEN 5076 Class 10 – 11/07.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
White-Box Software Testing Methods Speaker: Jerry Gao Ph.D. San Jose State University URL:
Coverage Estimating the quality of a test suite. 2 Code Coverage A code coverage model calls out the parts of an implementation that must be exercised.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Overview Structural Testing Introduction – General Concepts
1 Graph Coverage (3). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section 2.2 ◦ Section
1 Software Testing & Quality Assurance Lecture 13 Created by: Paulo Alencar Modified by: Frank Xu.
Path selection criteria Tor Stålhane & Wande Daramola.
Control Flow Graphs : The if Statement 1 if (x < y) { y = 0; x = x + 1; } else { x = y; } x >= yx < y x = y y = 0 x = x + 1 if (x < y) { y = 0;
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
Data Flow Coverage Criteria
Software Dynamic White-box Testing Part 2: Data-flow Testing Lecture 7 Prof. Mostafa Abdel Aziem Mostafa.
Chapter 2 : Graph Coverage (part 2)
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
CS223: Software Engineering Lecture 26: Software Testing.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
Software Testing.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Paul Ammann & Jeff Offutt
Data Flow Testing.
Lab 8 Data-Flow Testing.
Structural testing, Path Testing
White-Box Testing.
STATIC TESTING. Topics to be covered I. Static Testing: 1. Structured Group Examinations- Reviews II. Static Analysis: 1.
White-Box Testing.
White-Box Testing Techniques II
CHAPTER 4 Test Design Techniques
Dataflow Testing G. Rothermel.
White-Box Testing Techniques II
White-Box Testing.
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
Control Structure Testing
Examining Variables on Flow Paths
White-Box Testing Techniques II
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Software testing techniques Testing criteria based on data flow Presentation on the seminar Kaunas University of Technology

What is data-flow testing? Data-flow testing is a white box testing technique that can be used to detect improper use of data values due to coding errors. Testing criteria based on data flow

Testing criteria based on data flow The General Idea A program unit accepts inputs, performs computations, assigns new values to variables, and returns results. One can visualize of “flow” of data values from one statement to another. A data value produced in one statement is expected to be used later. Testing criteria based on data flow

Data flow testing can be performed at two conceptual levels Static data flow testing Dynamic data flow testing Testing criteria based on data flow

Static data flow testing Identify potential defects, commonly known as data flow anomaly. Analyze source code. Do not execute code. Testing criteria based on data flow

Dynamic data flow testing Involves actual program execution. Bears similarity with control flow testing. Identify paths to execute them. Paths are identified based on data flow testing criteria. Testing criteria based on data flow

Testing criteria based on data flow Data Flow Anomaly Anomaly: It is an abnormal way of doing something. Example: The second definition of x overrides the first. x = f1(y); x = f2(z); Testing criteria based on data flow

Abnormal situations with using variable. Defined and then defined again Undefined but referenced Defined but not referenced Defined and destroyed Destroyed before definition Destroyed and then referenced Destroyed twice Testing criteria based on data flow

Testing criteria based on data flow Data Flow Graph A data flow graph is a directed graph constructed as follows. A sequence of definitions and uses is associated with each node of the graph. The entry nodes usually contains definitions of variables used in the program. The exit node has an undefinition of each local variable. Testing criteria based on data flow

Testing criteria based on data flow Data Flow Graph Public double calculateBill(int Usage) { double Bill = 0; if(Usage > 0) Bill = 40; if(Usage > 100) Bill = Bill + Usage – 10; return Bill } Testing criteria based on data flow

Seven data flow testing criteria All-defs All-c-uses All-p-uses All-p-uses/some-c-uses All-c-uses/some-p-uses All-uses All-du-paths Testing criteria based on data flow

Testing criteria based on data flow All-definition Every definition of every variable be covered by at least one use of that variable, be that use a computational use or a predicate use. In this strategy, there is path from every definition to at least one use of that definition. Testing criteria based on data flow

Testing criteria based on data flow All-c-uses In this testing strategy, for every variable, there is a path from every definition to every c-use of that definition. If there is a definition with no c-use following it, then it is dropped from contention. Testing criteria based on data flow

Testing criteria based on data flow All-p-uses In this testing strategy, for every variable, there is path from every definition to every p-use of that definition. If there is a definition with no p-use following it, then it is dropped from contention. Testing criteria based on data flow

All-p-uses/some-c-uses For every variable and every definition of that variable, include at least one path from the definition to every predicate use; if there are definitions of the variable that are not covered then add computational use test cases as required to cover every definition. In this testing strategy, for every variable, there is a path from every definition to every p-use of that definition. If there is a definition with no p-use following it, then a c-use of the definition is considered. Testing criteria based on data flow

All-c-uses/some-p-uses For every variable and every definition of that variable, include at least one path from the definition to every computational use; if there are definitions of the variable that are not covered then add predicate use test cases as required to cover every definition. In this testing strategy, for every variable, there is a path from every definition to every c-use of that definition. If there is a definition with no c-use following it, then a p-use of the definition is considered. Testing criteria based on data flow

Testing criteria based on data flow All-uses At least one path from every definition of every variable to every use of that can be reached by that definition. For every use of the variable, there is a path from the definition of that variable to the use. Testing criteria based on data flow

Testing criteria based on data flow All-du-paths Every du path from every definition of every variable to every use of that definition. It is the strongest data-flow testing strategy since it is a superset of all other data flow testing strategies. Moreover, this strategy requires greatest number of paths for testing. Testing criteria based on data flow

Testing criteria based on data flow Questions Is Data-flow testing a white box or black box testing technique? What are two data flow conceptual levels? Whitch of data flow testing criteria is the strongest testing strategy? Testing criteria based on data flow

Testing criteria based on data flow Thank you Testing criteria based on data flow