Random testing is a testing technique where programs are tested by generating random and independent inputs. It is a type of black box testing. The results of output generated are compared with the software specifications to verify if the result is correct or not. There are some strengths and weakness of random testing.
The strength of random testing are:
- It is inexpensive to use
- It does not have any bias
- The bugs are found very easily and quickly
- If software is used properly it will find the bugs.
The weakness of this testing is:
- It is capable of finding only basic bugs
- It is precise when specifications are imprecise.
- This technique compares poorly with other techniques to find the bugs
- This technique will create a problem for continuous integration if different inputs are randomly selected on each test.
- Some think that white box testing is better than this random testing technique
The characteristics of random testing:
- It is performed where defects in a software application is not identified by the regular intervals.
- Random input is used to test the system performance and its reliability.
- Saves time and effort than actual tests.
- Other testing methods are not used.
The common example of Random testing is: use of random integers to test the software function that returns the results based on those integers. Specifically when dealing with integers or other types of variables. Random testing is random as a set of random inputs that are used, in other words testers are bound to choose set of integers rather than infinite set.
Types of random testing:
- With respect to the input
Random input sequence generation, random sequence of data inputs and random data selection from existing database.
- Guided vs Unguided
Undirected random test generation with no heuristics to guide its search and directed random test generation. Eg. adaptive random testing.
Most of the criticism about random testing is about misapplication of the technique. The key problem of random test is generating input that are part of the domain of the software under test. Random testing is great for testing
- fault behaviour
- data validation
- Adherence to specifications
- What is random testing?
- What are the characteristics of random testing?