Random Testing: Theoretical Results and Practical Implications
The DOI matches its Crossref record; 43 of the 43 references it cites were found in a registry or an index.
Abstract
A substantial amount of work has shed light on whether random testing is actually a useful testing technique. Despite its simplicity, several successful real-world applications have been reported in the literature. Although it is not going to solve all possible testing problems, random testing appears to be an essential tool in the hands of software testers. In this paper, we review and analyze the debate about random testing. Its benefits and drawbacks are discussed. Novel results addressing general questions about random testing are also presented, such as how long does random testing need, on average, to achieve testing targets (e.g., coverage), how does it scale, and how likely is it to yield similar results if we rerun it on the same testing problem (predictability). Due to its simplicity that makes the mathematical analysis of random testing tractable, we provide precise and rigorous answers to these questions. Results show that there are practical situations in which random testing is a viable option. Our theorems are backed up by simulations and we show how they can be applied to most types of software and testing criteria. In light of these results, we then assess the validity of empirical analyzes reported in the literature and derive guidelines for both practitioners and scientists.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
An introduction to probability theory and its applications
(1958) · Journal of the Franklin Institute · doi:10.1016/0016-0032(58)90688-4 · Cited by 29,269
Adhi Harmoko, S., M.Komp, Jacquard, J. M., Zuse, K., & Eniac (2005) · Cited by 18,035
The Art of Computer Programming
Knuth, D. E. (1968) · Cited by 16,320
The Art of Computer Programming
Whitesides, G. E. (1970) · Nuclear Science and Engineering · doi:10.13182/nse70-a19705 · Cited by 6,008 · cited 1×
“Properties of this distribution are P ðX xÞ ¼ 1 ð1 pÞx 8x 0; ð1Þ P ðX ¼ xÞ ¼ ð1 pÞx 1p 8x 1; E½X ¼ 1=p: Notice that P ðX ¼ xÞ ¼ 0 for nonpositive values of x.”
Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator
Matsumoto, M., & Nishimura, T. (1998) · ACM Transactions on Modeling and Computer Simulation · doi:10.1145/272991.272995 · Cited by 5,780 · cited 1×
“Properties of this distribution are P ðX xÞ ¼ 1 ð1 pÞx 8x 0; ð1Þ P ðX ¼ xÞ ¼ ð1 pÞx 1p 8x 1; E½X ¼ 1=p: Notice that P ðX ¼ xÞ ¼ 0 for nonpositive values of x.”
Motwani, R., & Raghavan, P. (1995) · Cambridge University Press eBooks · doi:10.1017/cbo9780511814075 · Cited by 5,123
Hints on Test Data Selection: Help for the Practicing Programmer
DeMillo, R. A., Lipton, R. J., & Sayward, F. G. (1978) · Computer · doi:10.1109/c-m.1978.218136 · Cited by 2,081 · cited 1×
“Elements in the binary space could not be mappable to the test case domain.”
BackgroundDART: directed automated random testing
Godefroid, P., Klarlund, N., & Sen, K. (2005) · ACM SIGPLAN Notices · doi:10.1145/1064978.1065036 · Cited by 2,067
Handbook of software reliability engineering
Lyu, M. R.-T. (1996) · McGraw-Hill, Inc. eBooks · Cited by 1,592
DART: directed automated random testing
Godefroid, P., Klarlund, N., & Sen, K. (2005) · Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation · doi:10.1145/1065010.1065036 · Cited by 1,570 · cited 1×
“As rules of thumb based on strong empirical evidence do not appear in the literature, we can only suggest using both unconstrained random testing as well as constraints that are common in the literature, such as ½ 100; 100 .”
MethodIntroduction to algorithms: 4. Turtle graphics
Shyamasundar, R. K. (1996) · Resonance · doi:10.1007/bf02837777 · Cited by 1,467 · cited 1×
“In the analysis of algorithms, it is often important to study their scalability based on the size of the addressed problem [14].”
BackgroundSearch‐based software test data generation: a survey
McMinn, P. (2004) · Software Testing, Verification and Reliability · doi:10.1002/stvr.294 · Cited by 1,368 · cited 1×
“For example, when one needs to sample an integer at random, with probability 1=2 it could be sampled from ½ 100; 100 , and from outside that range otherwise.”
BackgroundAn Introduction to Probability Theory and its Applications
Grubbs, F. E. (1967) · Technometrics · doi:10.1080/00401706.1967.10490472 · Cited by 1,017
Arcuri, A., & Briand, L. (2011) · Proceedings of the 33rd International Conference on Software Engineering · doi:10.1145/1985793.1985795 · Cited by 968
Self-citationFeedback-Directed Random Test Generation
Pacheco, C., Lahiri, S. K., Ernst, M. D., & Ball, T. (2007) · 29th International Conference on Software Engineering (ICSE'07) · doi:10.1109/icse.2007.37 · Cited by 863 · cited 3×
“, [20], [37]), overall the reported results have not been consistent.”
MethodResultInfluentialMathematical Statistics and Data Analysis
Ziegel, E. R., & Rice, J. (1995) · Technometrics · doi:10.2307/1269179 · Cited by 842
Pex–White Box Test Generation for .NET
Tillmann, N., & de Halleux, J. (2008) · Lecture Notes in Computer Science · doi:10.1007/978-3-540-79124-9_10 · Cited by 791
An Evaluation of Random Testing
Duran, J. W., & Ntafos, S. C. (1984) · IEEE Transactions on Software Engineering · doi:10.1109/tse.1984.5010257 · Cited by 730 · cited 15×
“For example, if a program takes as input one integer, the input domain of integers can be divided between negative and nonnegative values.”
BackgroundInfluentialThe Current State and Future of Search Based Software Engineering
Harman, M. (2007) · Future of Software Engineering (FOSE '07) · doi:10.1109/fose.2007.29 · Cited by 631 · cited 1×
“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.”
BackgroundEvolutionary test environment for automatic structural testing
Wegener, J., Baresel, A., & Sthamer, H. (2001) · Information and Software Technology · doi:10.1016/s0950-5849(01)00190-2 · Cited by 519 · cited 1×
“In the context of software testing, once some of the targets are covered, this implies reusing the test cases from previous attempts to initialize the population used by certain search algorithms to cover the remaining targets (some basic examples can be found in [48]).”
MethodEvolutionary testing of classes
Tonella, P. (2004) · Proceedings of the 2004 ACM SIGSOFT international symposium on Software testing and analysis · doi:10.1145/1007512.1007528 · Cited by 410 · cited 1×
“When all the probabilities pc are equal, we have E½X ¼ nHn (see [35]).”
BackgroundA Theoretical and Empirical Study of Search-Based Testing: Local, Global, and Hybrid Search
Harman, M., & McMinn, P. (2010) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2009.71 · Cited by 400 · cited 1×
“Ç”
Partition testing does not inspire confidence (program testing)
Hamlet, D., & Taylor, R. (1990) · IEEE Transactions on Software Engineering · doi:10.1109/32.62448 · Cited by 400
(2012) · Wiley eBooks · doi:10.1002/9781119202486 · Cited by 356
Theories of Program Testing and the Application of Revealing Subdomains
Weyuker, E. J., & Ostrand, T. J. (1980) · IEEE Transactions on Software Engineering · doi:10.1109/tse.1980.234485 · Cited by 223 · cited 1×
“In the literature, a partition with all failing test cases or all passing test cases is called either homogeneous [23] or revealing [50].”
BackgroundEvolutionary Generation of Whole Test Suites
Fraser, G., & Arcuri, A. (2011) · Asia-Pacific Conference on Quality Software (APAQS) · doi:10.1109/qsic.2011.19 · Cited by 170 · cited 1×
“When all the probabilities pc are equal, we have E½X ¼ nHn (see [35]).”
BackgroundSelf-citationAdaptive random testing: an illusion of effectiveness?
Arcuri, A., & Briand, L. (2011) · International Symposium on Software Testing and Analysis · doi:10.1145/2001420.2001452 · Cited by 157 · cited 1×
“They found that if d1 ¼ ¼ dk and l1 ¼ lk (i.e., the partitions have all the same size, and we choose the same number of test cases from each partition), then necessarily Pp Pr.”
BackgroundSelf-citationEvolutionary Improvement of Programs
White, D. R., Arcuri, A., & Clark, J. A. (2011) · IEEE Transactions on Evolutionary Computation · doi:10.1109/tevc.2010.2083669 · Cited by 157 · cited 1×
“, initialization of the population in Genetic Algorithms) can help search techniques (see, for example, [51]).”
Self-citationRandomized Differential Testing as a Prelude to Formal Verification
Groce, A., Holzmann, G. J., & Joshi, R. (2007) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2007.68 · Cited by 142 · cited 3×
“Under the same assumptions but different sizes di for the partitions and different li, they proved that it is sufficient to have 1 ¼ ¼ k to guarantee Pp Pr.”
BackgroundInfluentialWhen only random testing will do
Hamlet, D. (2006) · doi:10.1145/1145735.1145737 · Cited by 111
Harman, M., Kim, S. G., Lakhotia, K., McMinn, P., & Yoo, S. (2010) · 2010 Third International Conference on Software Testing, Verification, and Validation Workshops · doi:10.1109/icstw.2010.31 · Cited by 85 · cited 1×
“For example, in the case of search algorithms [34], multi-objective fitness functions that consider more targets at the same time can be designed (see [27], [18]).”
BackgroundAn investigation of statistical software testing
Thévenod-Fosse, P., & Waeselynck, H. (1991) · Software Testing Verification and Reliability · doi:10.1002/stvr.4370010203 · Cited by 76 · cited 1×
“The goal would be to have a sequence of drawings in which each color appears at least once.”
BackgroundFormal analysis of the effectiveness and predictability of random testing
Arcuri, A., Iqbal, M. Z., & Briand, L. (2010) · International Symposium on Software Testing and Analysis · doi:10.1145/1831708.1831736 · Cited by 72 · cited 1×
“For example, all the theoretical comparisons in Section 4 between partition and random testing ignore, out of necessity to make the mathematical formulas tractable, the additional computational cost of partition testing.”
BackgroundSelf-citationBlack-Box System Testing of Real-Time Embedded Systems Using Random and Search-Based Testing
Arcuri, A., Iqbal, M. Z., & Briand, L. (2010) · Lecture notes in computer science · doi:10.1007/978-3-642-16573-3_8 · Cited by 67 · cited 1×
“…detected for random testing is Er ¼ ml d ¼ l ; whereas for partition testing it is Ep ¼ Xk i¼1 mili di ¼ Xk i¼1 li i: When the subdomains are not actual partitions (i.e., they are not disjoint), to be consistent with the notation in [12] we use Ps for the P-measure and Es for the E-measure.”
MethodSelf-citationOn the statistical properties of testing effectiveness measures
Chen, T. Y., Kuo, F., & Merkel, R. (2005) · Journal of Systems and Software · doi:10.1016/j.jss.2005.05.029 · Cited by 67 · cited 1×
“In this context, we have only one testing target Ti, which represents whether a failure is revealed or not.”
Testing Container Classes: Random or Systematic?
Sharma, R., Gligoric, M., Arcuri, A., Fraser, G., & Marinov, D. (2011) · Lecture notes in computer science · doi:10.1007/978-3-642-19811-3_19 · Cited by 66 · cited 1×
“When comparing partition testing against random testing, the expected number of failures triggered is equal (Ep ¼ Er) when a proportional strategy is used: 1 ¼ ¼ k.”
MethodSelf-citationAutomated test data generation for aspect-oriented programs
Harman, M., Islam, F., Xie, T., & Wappler, S. (2009) · International Conference on Aspect-Oriented Software Development (AOSD) · doi:10.1145/1509239.1509264 · Cited by 58 · cited 1×
“Furthermore, in this paper we have investigated some of the published work in the literature, in particular [13], [26], [28], [47], [52].”
Hamlet, R. G. (2002) · Wiley eBooks · doi:10.1002/0471028959.sof268 · Cited by 56
Random Test Run Length and Effectiveness
Andrews, J. H., Groce, A., Weston, M., & Xu, R.-G. (2008) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2008.12 · Cited by 54 · cited 1×
“By considering the dice outputs as coupons, the answer is 6H6 ¼ 14:7.”
BackgroundOn the number and nature of faults found by random testing
Ciupa, I., Pretschner, A., Oriol, M., Leitner, A., & Meyer, B. (2009) · Software Testing Verification and Reliability · doi:10.1002/stvr.415 · Cited by 48 · cited 2×
“In this context, we have only one testing target Ti, which represents whether a failure is revealed or not.”
A search-based framework for automatic testing of MATLAB/Simulink models
Zhan, Y., & Clark, J. A. (2007) · Journal of Systems and Software · doi:10.1016/j.jss.2007.05.039 · Cited by 47
Arcuri, A. (2011) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2011.44 · Cited by 40 · cited 1×
“By considering the dice outputs as coupons, the answer is 6H6 ¼ 14:7.”
BackgroundSelf-citationExtreme Value Distributions for Random Coupon Collector and Birthday Problems
Holst, L. K. (2001) · Extremes · doi:10.1023/a:1013921125928 · Cited by 30 · cited 1×
“, for P 1⁄4 P (see, for example, [29], [42]).”
Cited by
Arcuri, A., & Briand, L. (2014) · Software Testing, Verification and Reliability · doi:10.1002/stvr.1486 · Cited by 622
Self-citationFraser, G., & Arcuri, A. (2013) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2012.14 · Cited by 586
Self-citation(2021) · doi:10.1109/tse.2019.2946563 · Cited by 574
A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuite
Fraser, G., & Arcuri, A. (2014) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/2685612 · Cited by 242
“For “simple” test generation techniques such as random 8:2 G. Fraser and A. Arcuri testing, it is possible to provide rigorous answers based on theoretical analyses (e.g., see Arcuri et al. [2012]).”
MethodSelf-citationRESTful API Automated Test Case Generation with EvoMaster
Arcuri, A. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3293455 · Cited by 236
“One of the easiest approaches is to generate test cases at random [9].”
BackgroundSelf-citation
Metadata
- Authors
- Arcuri, A., Iqbal, M. Z., & Briand, L.
- Venue
- IEEE Transactions on Software Engineering
- Published
- 2012-03
- Volume
- 38
- Issue
- 2
- Pages
- 258-277
- ISSN
- 0098-5589 (ISSN-L)
- OpenAlex
- W2012210872
- Cited by
- 176
- References
- 43
- FWCI
- 40.09
- Type
- journal article
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.