When to Test Less Presented by Lan Guo. Introduction (1) Methods of software testing: functional, coverage, and user-oriented Phases of software testing:

Slides:



Advertisements
Similar presentations
Hong Zhu Department of Computing and Communication Technologies Oxford Brookes University, Oxford OX33 1HX, UK COMPSAC 2012 PANEL.
Advertisements

SBSE Course 3. EA applications to SE Analysis Design Implementation Testing Reference: Evolutionary Computing in Search-Based Software Engineering Leo.
Software Engineering, COMP201 Slide 1 Software Testing Lecture 28 & 29.
Software testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Software Engineering Software Testing.
SE 450 Software Processes & Product Metrics Activity Metrics.
When to Test Less Authors: Tim Menzies and Bojan Cukic Bojan Cukic Presenter: Genet Balaker.
Overview of program analysis Mooly Sagiv html://
Testing an individual module
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Overview of program analysis Mooly Sagiv html://
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Introduction to Software Testing
Introduction to ModelingMonte Carlo Simulation Expensive Not always practical Time consuming Impossible for all situations Can be complex Cons Pros Experience.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
System/Software Testing
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 23 Slide 1 Software testing Slightly adapted by Anders Børjesson.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
CPIS 357 Software Quality & Testing
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Testing phases. Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these.
Software testing techniques 3. Software testing
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Test Suite Reduction for Regression Testing of Simple Interactions between Two Software Modules Dmitry Kichigin.
Agenda Introduction Overview of White-box testing Basis path testing
1 Software Defect Testing Testing programs to establish the presence of system defects.
User Cooperation via Rateless Coding Mahyar Shirvanimoghaddam, Yonghui Li, and Branka Vucetic The University of Sydney, Australia IEEE GLOBECOM 2012 &
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Software Engineering 2 Software Testing Claire Lohr pp 413 Presented By: Feras Batarseh.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Reliability in Nuclear Systems Arsen Papisyan Anthony Gwyn.
Software Construction Lecture 18 Software Testing.
A Review of Software Testing - P David Coward Reprinted: Information and Software Technology; Vol. 30, No. 3 April 1988 Software Engineering: The Development.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Khalid Belhajjame 1, Paolo Missier 2, and Carole A. Goble 1 1 University of Manchester 2 University of Newcastle Detecting Duplicate Records in Scientific.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
Theory and Practice of Software Testing
Software Quality Assurance and Testing Fazal Rehman Shamil.
Dynamic Testing.
Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.
Copyright , Dennis J. Frailey CSE Software Measurement and Quality Engineering CSE8314 M00 - Version 7.09 SMU CSE 8314 Software Measurement.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
T EST T OOLS U NIT VI This unit contains the overview of the test tools. Also prerequisites for applying these tools, tools selection and implementation.
CS 5150 Software Engineering Lecture 22 Reliability 3.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 23, 1999.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
SOFTWARE TESTING SOFTWARE TESTING Presented By, C.Jackulin Sugirtha-10mx15 R.Jeyaramar-10mx17K.Kanagalakshmi-10mx20J.A.Linda-10mx25P.B.Vahedha-10mx53.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
A Review of Software Testing - P. David Coward
Chapter 8 – Software Testing
BASICS OF SOFTWARE TESTING Chapter 1. Topics to be covered 1. Humans and errors, 2. Testing and Debugging, 3. Software Quality- Correctness Reliability.
Introduction to Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CSE 1020:Software Development
Chapter 7 Software Testing.
Presentation transcript:

When to Test Less Presented by Lan Guo

Introduction (1) Methods of software testing: functional, coverage, and user-oriented Phases of software testing: unit, integration, product, or regression White-box (coverage) testing uses the structure of the software to measure the quality of testing.

Introduction (2) –Statement coverage –Decision coverage –Data flow coverage –Mutation testing Black-box testing aims at the specific features of the software. –Generate an operational profile, which is a list of occurrence probabilities of each element in the input domain of the program

Introduction (3) –The operational profile is dependent on the input from the customer. Difficulties in black-box testing –new software, new feature, no customer base –inadequate test set –coarse features, interacting features –multiple and unknown user groups

Introduction (4) There is a saturation effect associated with ALL testing methods. Testing effort Reliability functional decision Data flow mutation

Introduction (5) Elaborate and expensive testing does not tend to find more faults than inexpensive manual or simple automatic testing schemes.

Theory of Testing (1) In black-box testing, the probability to find a fault in N random tests is y = 1 - (1 - x) N x: the probability of finding a fault for a random input Black-box testing can be expensive. If x = , 46,000 tests are needed to be 99% sure to reveal a fault.

Theory of Testing (2) Formal-methods testing is even more expensive compared to black-box testing. While-box testing only slightly reduces the number of tests required by black-box testing. In addition, the partition cost is very high.

Reality of Testing (1) Software-in-the-small projects produce software without rigorous testing. The software does not crash more often. A program’s shape is the shape of the pathways within the program. The more tangled the pathways, the more complex the program shape.

Reality of Testing (2) The simple shapes are common, which is demonstrated by du-pathways, control-flow diagrams and saturation effect. Saturation effect is consistent with programs containing either many portions with simple shapes--so the portions are easily reached-- or many portions that are so twisted in shape that we will never reach them.

Average Shape of Software Right shape: the program is either too complex to test or too simple to test elaborately. In either case, there is no point to conduct a lengthy and expensive test. Most programs are indeed the right shape for simple testing. Proof: A mathematical model of building a pathway across a program from randomly selected inputs to some randomly selected state.

Assumption 1 Programs are networks connecting system concepts. (NAYO) Optimizing compiler builds a network (control and data-flow graphs) from the code. –An execution trace of a procedural program shows what statements are executed, which subroutines are care called, and in what order. –A verification condition generator creates a proof tree (execution tree), including preconditions and post- conditions

Assumption 2 A fault explanation tree is a tree whose leaves are inputs and whose root is a fault. If we arrive at a state which should not happen in this tree, it is a bug in our system.

Assumption 3 Testing is a process of trying to generate a fault explanation tree from the program network. If we can’t generate such tree, we are confident that there is no fault in our program.

Assumption 4 NAYO tree (explanation tree) N: no edge A: and node Y: yes edge O: or node No edge only connects or nodes Yes edge connects both and nodes and or nodes

Assumption 5 Testing is the process of extracting NAYO trees (the explanations) from NAYO networks (the program).

Mathematics Equations (1) Given in inputs to a NAYO network with V nodes, the probability to find a fault is: x o = in/V (A) The probability of reaching an and node with andp parents is the probability of reaching all its parents: x and = x i andp (B)

Mathematics Equations (2) The probability of reaching an or node with orp parents is the probability of not missing all of its parents: x or = 1 - (1 - x o ) orp (C) If the ratio of and nodes in a NAYO tree is andf, then the ratio of or nodes in the same tree is orf = 1 - andf. The probability to reach some random node x j is: x j = andf * x and + orf * x or (D)

Mathematics Equations (3) Rearrange Equation A to isolate the number of tests required to be 99% sure of finding a fault with probability x j is: y = 0.99 = 1- ((1 - x j ) N ) Therefore, N = log( ) log(1-x j )

Implementation We can approximately categorize the tree’s shape by the number of tests N required to reach that tree’s root to find a fault. Results from the Simulation Runs ClassificationThresholdPercent Simple Moderate Hard Overly complex 0 < N < <=N< <=N<10 6 N >=

Conclusion Black-box mathematics is blind to the internal structures of the program. If we include internal structure in the analysis, the result is more optimistic. The average case analysis of the shape of programs indicates that simple and RANDOM testing can be very valuable.

Related Research Simple and random testing can probe non- determinate systems. Limited testing is adequate for knowledge based systems.

Potential Future Research Extending static code analysis tools (optimizer and verification condition generator) to extract the parameters in the mathematical model from real-world programs, in order to monitor the change of program’s shape. Offering design guideline to avoid hard- shaped programs.

References (1) T. Menzies and B. Cukic, “When to Test Less”, IEEE Software, September/October 2000, pp D. Hamlet and R. Taylor, “Partition Testing Does not Inspire Confidence”, IEEE Trans. Software Eng., Vol. 16, No. 12, Dec. 1990, pp J. Horgan and A. Mathur, “Software Testing and Reliability”, The Handbook of Software Reliability Eng., M.R. Lyu, ed., McGraw-Hill, New York, 1996, pp

References (2) T. Menzies and B. Cukic, “Adequacy of limited testing for knowledge based systems”, International Journal on Artificial Intelligence Tools, Vol. 9, No. 1, 2000, pp T. Menzies, B. Cukic, H. Singh, and J. Powell, “Testing Nondeterminate Systems”