Department of CS and Mathematics, University of Pitesti State-based Testing is Functional Testing ! Florentin Ipate, Raluca Lefticaru University of Pitesti,

Slides:



Advertisements
Similar presentations
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Advertisements

Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Lecture # 2 : Process Models
1 On the Limitations of Finite State Models as Sources of Tests for Access Control and Authentication Aditya Mathur Professor of Computer Science Purdue.
Renaat Verbruggen1 Advanced Coverage Metrics for Object-Oriented Software (notes based on IPL copyright material on Cantata, please see full document white.
Software Testing and Quality Assurance
1 Software Testing and Quality Assurance Lecture 21 – Class Testing Basics (Chapter 5, A Practical Guide to Testing Object- Oriented Software)
1 Application of Metamorphic Testing to Supervised Classifiers Xiaoyuan Xie, Tsong Yueh Chen Swinburne University of Technology Christian Murphy, Gail.
Automatic System Testing of Programs without Test Oracles
1 Today Another approach to “coverage” Cover “everything” – within a well-defined, feasible limit Bounded Exhaustive Testing.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Software Testing and Quality Assurance
Department of CIS University of Pennsylvania 1/31/2001 Specification-based Protocol Testing Hyoung Seok Hong Oleg Sokolsky CSE 642.
SEBASE 2007 Testing from Finite State Machines R. M. Hierons Brunel University, UK
Parameterizing Random Test Data According to Equivalence Classes Chris Murphy, Gail Kaiser, Marta Arias Columbia University.
Chapter 18 Testing Conventional Applications
Introduction to Software Testing Chapter 9.1 Syntax-based Testing Paul Ammann & Jeff Offutt
Clustering analysis workshop Clustering analysis workshop CITM, Lab 3 18, Oct 2014 Facilitator: Hosam Al-Samarraie, PhD.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
AMOST Experimental Comparison of Code-Based and Model-Based Test Prioritization Bogdan Korel Computer Science Department Illinois Institute of Technology.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Introduction to Software Testing
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
ISSTA 2002, Rome, Italy 1 Investigating the Use of Analysis Contracts to Support Fault Isolation in Object-Oriented Code Lionel Briand, Yvan Labiche, Hong.
Requirements-based Test Generation for Functional Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 1 W. Eric Wong Department.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
Test Drivers and Stubs More Unit Testing Test Drivers and Stubs CEN 5076 Class 11 – 11/14.
Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt
By, Venkateswara Reddy. Tallapu Reddy. 1.Introduction. 2.What is X-Machine Testing..?? 3.Methods of X-Machine Testing. 4.Variants of X- Machine. 5.Stream.
Agile Test-based Modeling 資工 聶順成. Outline  Introduction : Modeling meets Programming  Agile Modeling: Using Models in Agile Projects  Model-based.
Testing Object-Oriented Software (an Overview) Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 12.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Software testing techniques Spring 2009 Csci565: Theory and Practice of Software Testing1.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Mutation Testing G. Rothermel. Fault-Based Testing White-box and black-box testing techniques use coverage of code or requirements as a “proxy” for designing.
Formal Methods and Testing: Possible Attributes for Success A. J. Cowling Department of Computer Science University of Sheffield.
MULTI-INTERVAL DISCRETIZATION OF CONTINUOUS VALUED ATTRIBUTES FOR CLASSIFICATION LEARNING KIRANKUMAR K. TAMBALKAR.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Benchmarking Effectiveness for Object-Oriented Unit Testing Anthony J H Simons and Christopher D Thomson.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
Collections Using Generics in Collections. 2 Chapter Objectives Define the concept and terminology related to collections Explore the basic structure.
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
Mutation Testing Breaking the application to test it.
Further Investigations into the Development and Evaluation of Reading Techniques for Object-Oriented Code Inspection Alastair Dunsmore, Marc Roper and.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 23, 1999.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
Generating Automated Tests from Behavior Models
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Syntax-based Testing CS 4501 / 6501 Software Testing
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
It is great that we automate our tests, but why are they so bad?
Chapter 20 Object-Oriented Analysis and Design
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Mathematical Background 1
Cs212: Data Structures Computer Science Department Lecture 6: Stacks.
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
Presentation transcript:

Department of CS and Mathematics, University of Pitesti State-based Testing is Functional Testing ! Florentin Ipate, Raluca Lefticaru University of Pitesti, Romania TAIC PART 2007

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Background Over the last years we have developed specification based test generation techniques proven to determine system correctness under certain “design for test” conditions. State-based specifications – stream X-machine (SXM). Industrial evidence of the power and practicality of these techniques. Joint research with the Verification & Testing Research Group of the University of Sheffield, UK (Mike Holcombe).

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Class testing State based languages (e.g. UML statecharts) are widely used to model class behaviour. New challenge: extend our SXM based techniques to class testing. Gather empirical evidence about their effectiveness.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Empirical evidence Empirical studies show that state-based testing is more effective than random testing but it is not likely to be sufficient unless the state diagram is straightforward. They advocate the use of functional methods to complement state-based testing. Our experiments (in which we evaluated our own SXM based techniques) also back these findings.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Questions Why ? Can functional testing and state-based testing be separated ?

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Our answers The modest fault detection of state-based class testing is actually due to the inappropriate state diagram used. Functional testing of a class can be reduced to state-based testing, provided that the right state model is produced.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 How is a state diagram constructed ? Usually: ad-hoc process, using conventional wisdom. Example: a stack is associated with a 3 state diagram. push[0 < L < k-1] pop[1 < L < k] pushErr[L = k] popErr[L = 0] pop[L = k]pop[L = 1] push[L = 0]push[L = k-1] 012

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 How is a state diagram constructed ? Suppose we add a new method, count(l) that finds the number of distinct elements among the last l. A 3-state diagram is no longer appropriate. push[0 < L < k-1] pop[1 < L < k] count pushErr[L = k] count popErr[L = 0] count pop[L = k]pop[L = 1] push[L = 0]push[L = k-1] 012

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Our approach Construct a diagram for each class method to be tested. The construction of the diagram – based on a partitioning of the domain of the class method. Thus, state-based testing is functional testing !

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 State diagram construction Partition the domain according to some functional criterion. Derive (not necessarily disjoint) data sub-domains by “hiding” the inputs. Derive the states of the diagram by removing the overlapping of data sub-domains. Construct the transitions by considering each pair of states and checking whether the pair is related to a method. Split the transitions according to the original partitioning criterion.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 State diagram construction (example) push : 3 state diagram pop : 3 state diagram count – domain partition  count(l) = 0  count(l) = 1  1 < count(l) < L  count(l) = L

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 State diagram construction (example) push[i→i,2≤i≤k-1] push[i→i+1,2≤i≤k-2] pop[i→i,2≤i≤k-1] pop[i→i-1,3≤i≤k-1] count[p 2 ] count[p 3 ] count[p1] pop[1→0] push[0→1] count[p 2 ] count[p 3 ] count[p 4 ] count[p 2 ] push[1→1] pop[1→1] pop[k→k-1] pop[2→1] push[1→2] push[k-1→k]

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Previous approaches Construct a composite (all-in-one) diagram rather than a separate diagram for each method. A method may induce at most one transition between a given pair of states  Original partitioning criterion is not fully used. Stack example:  9-state composite diagram but  One loop-back count transition for each state, so important test cases can be missed out.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Test generation Adaptation of the W-method. Transition cover: only the transitions labeled by the method in question are considered. Characterization set: identifies each state of the diagram. Alternative : an abstract oracle associates with each state a predicate rather than a sequence of transitions.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Experimental results A series of experiments to evaluate the cost effectiveness of state-based testing. Java implementation of several classes, e.g. bounded stack, book from a library, vending machine. Test suites were executed against mutant programs automatically generated by MuJava. Test cost measure = number of mutants killed / total length

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Experimental results Bounded stack: approximately 90 LOC, 219 mutants. Partitioning criterion (count) No. of sequences Total length Mutation score Test cost measure % % % % %2.75 Our approach Composite (all-in-one) diagram

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Experimental results Book class (library): approximately 110 LOC, 136 mutants. No. of sequences Total length Mutation score Test cost measure % %1.64 Our approach Full predicate

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Mutants left undetected Equivalent mutants. For which stronger criteria are needed. Caused by attributes (dueDate) for which no obvious partitioning criterion exists: precise oracle needed. Class mutants (JSI): simple tests in which more than one instance is used.

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Further work Evolutionary methods for automatically converting sequences of methods into actual test data. Deriving the state model using evolutionary methods ?

Department of CS and Mathematics, University of Pitesti TAIC PART 2007 Thank you for your attention !