Random Testing

Why Trust Techopedia

What Does Random Testing Mean?

Random testing refers to the practice of using random inputs to test software. Different kinds of random testing all rely on the same basic idea, which is that the test implementation cases are chosen on a random basis.

Techopedia Explains Random Testing

Random testing is a type of black box testing in which developers are not looking at the internal code for a software product—instead, they are entering random inputs into the system to see what the results are. One common example is the use of random integers to test a software function that returns results based on those integers. These functions may include "for loops" or other algorithms for delivering a result, where a set of random test cases simulates or approximates a wider set of cases entered by theoretical users.

Other kinds of random testing may involve the use of heuristics, which guide the use of random inputs. In general, and specifically when dealing with integers or other types of variables, random testing is only as random as the set of random inputs that are used—in other words, testers often choose to use a bounded set of integers, rather than an infinite set. Specific practices for random testing get into the mechanics of what we mean by random, and how developers come up with a seemingly random set of inputs for a test.

Discussions of random testing can also revolve around the efficiency of its use. One idea is that because random testing can be done by automated systems instead of human professionals, it can have advantages over directed testing. However, directed testing can be more efficient in terms of how much testing is needed. Some developers and experts also use the term "random testing" to refer to inefficient or even incompetent testing, where directed testing is seen as a superior method.

Related Terms

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.