Open In App
Related Articles

Random Testing in Software Testing

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Random testing is software testing in which the system is tested with the help of generating random and independent inputs and test cases. Random testing is also named monkey testing. It is a black box assessment outline technique in which the tests are being chosen randomly and the results are being compared by some software identification to check whether the output is correct or incorrect.

Some important points about Random Testing:

  1. Random testing was first examined by Melvin Breuer in the year 1971.
  2. This testing was initially assessed by Pratima and Vishwani Agrawal in the year 1975 to check the successful output of the software.
  3. For random testing, there is also a book that contains some formulas for the number of tests that can be taken and the number of successful results and failure results.

Working Random Testing:

Step-1: Identify Input domain

Step-2: Select test inputs independently/randomly from the input domain

Step-3: Test the system on these inputs and form a random test set

Step-4: Compare the result with system specification

Step-5: If the Report fails then take necessary action.

The below image represents the working of Random Testing more clearly.

Working of Random Testing

Working of Random Testing

Types of Random Testing

1. Random input sequence generation: It is also known as Random Number Generator (RNG) in which a random sequential number or symbols is being generated which cannot be assumed during the random selection.

2. Random sequence of data inputs:  In this, all the data are selected randomly for the inputs which can be used during the testing.

3. Random data selection from an existing database: The record where all the data are available from that record only the data can be selected for testing afterward no additional data cannot be added which are not available in the record.

Characteristics of Random Testing:

  1. Random testing is implemented when the bug in an application is not recognized.
  2. It is used to check the system’s execution and dependability.
  3. It saves our time and does not need any extra effort.
  4. Random testing is less costly, it doesn’t need extra knowledge for testing the program.

Methods to Implement Random Testing:

To implement the random testing basically, four steps are applied:

  1. The user input domain is analyzed.
  2. After that, from that domain, the data of test inputs are chosen separately.
  3. With the help of these test inputs, the test is executed successfully. These input tests conduct random sets of tests.
  4. The outcomes are compared with the system identification. The outcome of the test becomes unsuccessful if any test input doesn’t match with the original one otherwise the outcomes are always successful.

Advantages of Random Testing

  1. It is very cheap so that anyone can use this software.
  2. It doesn’t need any special intelligence to access the program during the tests.
  3. Errors can be traced very easily; it can easily detect the bug throughout the testing.
  4. This software is lacking bias means it makes the groups evenly for the testing and it prefers not to repeatedly check the errors as there can be some changes in the codes throughout the testing process.

Disadvantages of Random Testing

  1. This software only finds changes errors.
  2. They are not practical. Some tests will be of no use for a longer time.
  3. Most of the time is consumed by analyzing all the tests.
  4. New tests cannot be formed if their data is not available during testing.

Tools used for Random Testing

  1. QuickCheck: It is a famous test tool, which was introduced for Haskell which is available in many different languages. This tool generates random orders for API calls that are related to the model and the properties of the system which can give successful results after every test.
  2. Randoop: This tool provides an order of methods and constructor acknowledgment for the classes during the test and generates JUnit tests.
  3. Simulant: It is a Clojure tool that runs according to the system’s different specifications, the behavior of the model.
  4. Gram Test: This random testing tool is based on grammar which is written in Java, It utilizes BNF notation for specifying the grammar which is used as input during testing.

Last Updated : 16 Dec, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads