Random Testing: Theoretical Results and Practical Implications IEEE TRANSACTIONS ON SOFTWARE ENGINEERING 2012 Andrea Arcuri, Member, IEEE, Muhammad.

Slides:



Advertisements
Similar presentations
Tests of Hypotheses Based on a Single Sample
Advertisements

Shortest Vector In A Lattice is NP-Hard to approximate
Analysis of Algorithms
Fast Algorithms For Hierarchical Range Histogram Constructions
Analysis of Algorithms
 The running time of an algorithm as input size approaches infinity is called the asymptotic running time  We study different notations for asymptotic.
CHAPTER 21 Inferential Statistical Analysis. Understanding probability The idea of probability is central to inferential statistics. It means the chance.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
By : L. Pour Mohammad Bagher Author : Vladimir N. Vapnik
Cutler/HeadGrowth of Functions 1 Asymptotic Growth Rate.
Chapter 6 Continuous Random Variables and Probability Distributions
Evaluating Hypotheses
2-1 Sample Spaces and Events Conducting an experiment, in day-to-day repetitions of the measurement the results can differ slightly because of small.
Two Broad Classes of Functions for Which a No Free Lunch Result Does Not Hold Matthew J. Streeter Genetic Programming, Inc. Mountain View, California
1 Validation and Verification of Simulation Models.
Experimental Evaluation
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Introduction to AEP In information theory, the asymptotic equipartition property (AEP) is the analog of the law of large numbers. This law states that.
Randomized Algorithms - Treaps
CS 3343: Analysis of Algorithms
Order Statistics The ith order statistic in a set of n elements is the ith smallest element The minimum is thus the 1st order statistic The maximum is.
Yaomin Jin Design of Experiments Morris Method.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Chapter 7 Point Estimation
Computational Complexity Jang, HaYoung BioIntelligence Lab.
King Saud University Women Students
Lecture 2 Review Probabilities Probability Distributions Normal probability distributions Sampling distributions and estimation.
CHAPTER 5 SIGNAL SPACE ANALYSIS
Consistency An estimator is a consistent estimator of θ, if , i.e., if
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
Conditional Probability Mass Function. Introduction P[A|B] is the probability of an event A, giving that we know that some other event B has occurred.
Experimentation in Computer Science (Part 2). Experimentation in Software Engineering --- Outline  Empirical Strategies  Measurement  Experiment Process.
Data Structures Haim Kaplan & Uri Zwick December 2013 Sorting 1.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Clustering Data Streams A presentation by George Toderici.
Computacion Inteligente Least-Square Methods for System Identification.
Evaluating Hypotheses. Outline Empirically evaluating the accuracy of hypotheses is fundamental to machine learning – How well does this estimate its.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
Evaluating Hypotheses. Outline Empirically evaluating the accuracy of hypotheses is fundamental to machine learning – How well does this estimate accuracy.
Theory of Computational Complexity M1 Takao Inoshita Iwama & Ito Lab Graduate School of Informatics, Kyoto University.
Stats 242.3(02) Statistical Theory and Methodology.
3.1 Discrete Random Variables Present the analysis of several random experiments Discuss several discrete random variables that frequently arise in applications.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Chapter 3 Applied Statistics and Probability for Engineers
CS 9633 Machine Learning Support Vector Machines
Chapter 7. Classification and Prediction
Equivalence partitioning
Relations, Functions, and Matrices
Copyright © Cengage Learning. All rights reserved.
Applied Discrete Mathematics Week 11: Relations
STATISTICS Random Variables and Distribution Functions
Path Coupling And Approximate Counting
Chapter 2 Fundamentals of the Analysis of Algorithm Efficiency
Random Testing.
Trigonometric Identities
O-notation (upper bound)
Probability and Statistics
Asymptotic Notations Algorithms Lecture 9.
Distributed Consensus
CS 583 Analysis of Algorithms
The Curve Merger (Dvir & Widgerson, 2008)
Slides for Introduction to Stochastic Search and Optimization (ISSO) by J. C. Spall CHAPTER 15 SIMULATION-BASED OPTIMIZATION II: STOCHASTIC GRADIENT AND.
CS 3343: Analysis of Algorithms
Summarizing Data by Statistics
Data Structures Sorting Haim Kaplan & Uri Zwick December 2014.
Asst. Dr.Surasak Mungsing
O-notation (upper bound)
Presentation transcript:

Random Testing: Theoretical Results and Practical Implications IEEE TRANSACTIONS ON SOFTWARE ENGINEERING 2012 Andrea Arcuri, Member, IEEE, Muhammad Zohaib Iqbal, Member, IEEE, and Lionel Briand, Fellow, IEEE Ou,Bao-Lin 2013/2/25

Outline Introduction Background Random testing Comparison with partition testing Novel theoretical results on random testing Conclusion

Introduction review the empirical and theoretical results on the comparisons between random and partition testing prove nontrivial lower bounds for the expected number of test cases to cover all targets study the scalability of random testing derive a nontrivial upper bound valid for the lack of predictability for any SUT(system under test)

Background - Asymptotic Notations Upper Bound : Lower Bound : Tight Bound : Dominated : if only and if

Background - Expectation of a Random Variable A random variable X can assume different values from a domain D, each one with a specific probability .

Background - Expectation of a Random Variable We can run k experiments and collect the resulting outputs . We can estimate E[X] with the following formula:

Background - Geometric Distribution Given p the probability of an event e in a trial, we might want to know how many trials x we need on average before obtaining e .

Random testing To consider their binary representation and then choose each bit with uniform probability, where k is the length in bits of a test case Problem: Elements in the binary space could not be mappable to the test case domain. The binary length k of the test cases can be variable. Even when bounds on the length are used, using a pure uniform distribution is unwise.

Random testing a set of testing targets The probability that a random test case covers is We will simply assume When all the probabilities are equal, we have

Random testing - Definition 1 (RT) Given a vector of probabilities for each target , we use We use to represent the special case when all the are equal.

Comparison with partition testing- partition testing The input domain D is divided in k ≥ 2 subdomains . In partition testing, the input space is divided into equivalence classes. In the case of a partition , is the ratio of failing test cases in that partition ( ) over its cardinality ( ) .

Comparison with partition testing- partition testing Given test cases, the sampling rate for each partition is . Once a partition strategy is chosen, sampling test cases for each partition is, in general, a difficult task.

Comparison with partition testing- Metrics for Comparisons E-measure: expected number of triggered failures. P-measure: probability of finding at least one failing test case. F-measure: expected number of test cases required to trigger at least one failure.

Comparison with partition testing- First Empirical Comparisons The probability that random testing finds at least one failure with test cases is In the case of partition testing, the probability that partition testing triggers at least one failure is

Comparison with partition testing- First Empirical Comparisons Considered the probabilities that a random test belongs to the partition , therefore

Comparison with partition testing- First Empirical Comparisons Experiment And Different values of were considered. The values for were chosen with uniform distribution. They found that in 14 out of 50 trials .

Comparison with partition testing- Analytical Analyses The expected number of failures detected for random testing is whereas for partition testing it is

Comparison with partition testing- Analytical Analyses When the subdomains are not actual partitions, we use for the P-measure and for the E- measure. when when for all partition

Comparison with partition testing- Analytical Analyses P-measure & E-measure For any given program, For any given program and partition testing strategy, If , then Equality holds only if for all partitions we have If , then However, the converse is not necessarily true.

Effectiveness of Random Testing Theorem 1

Theorem 1 - Proof being the random variable representing the number of trials in the epoch in which we have covered i different targets so far. The probability of drawing one of the remaining n - i targets is

Theorem 1 - Proof Because is geometrically distributed, therefore we have

Effectiveness of Random Testing Each target is sought in a specific order (RT0). Definition 2 (RT0) .

Effectiveness of Random Testing Theorem 2 Proof Covering a particular target follows a geometric distribution with parameter .

Theorem 2 - Proof Expected number of test cases: When all the probabilities are equal

Theorem 2 - Proof define any generic represents the positive values is the negative ones represents

Theorem 2 - Proof In a similar way, we can write

Theorem 2 - Proof To prove

Scalability Assume a testing technique called V For each target , we are assuming that V is faster than random testing by a constant factor , where is a constant Assuming n feasible targets, we consider the case of z ═ kn feasible targets, where k ≥ 1 is the scalability factor.

Scalability Given ,then Given , the probability of the most difficult target for k =1, then, for all values of k, the most difficult target for the case k > 1 should have value for some function .

Scalability Theorem 3

Theorem 3 - Proof Proof An upper bound for can be constructed by

Theorem 3 - Proof construct a lower bound for

Theorem 3 - Proof Finally, if ,then

Predictability of Two Runs Let us first define the difference D among two runs of random testing. The binary value represents whether the target has been covered or not

Predictability of Two Runs Theorem 4 The expected value of the random variable D is equal to

Theorem 4 - Proof Consider the expected value of

Predictability of Two Runs - Experiment Three different vectors, and . In , The remaining probabilities are chosen such that their total sum for is equal to 1. In , and Sample sizes will cover the following range: where n=32

Experiment

Predictability of Two Runs Theorem 5 Proof Given the function Proving is maximized for x=1/2

Theorem 5 - Proof ,where Therefore, is maximized when we have for all the the equality . In this case,

Conclusion Provided novel formal results regarding the effectiveness, scalability, and predictability of random testing Proven nontrivial, tight lower bounds for the expected number of test cases sampled by random testing to cover predefined targets We formally proved the mathematical formula that describes the predictability of random testing and we proved a general upper bound for it.