Subscribe by Email

Tuesday, July 3, 2012

What are the advantages and disadvantages of random testing?

Ever heard about random testing? It would not be so shocking if your answer is no since this software testing methodology is rarely used. We have dedicated this entire article regarding the discussion about random testing, it advantages as well as disadvantages. 

Random testing is actually a kind of functional testing. It is used in the conditions when the time taken for writing and running tests is quite long or the problem is too complex and hence it is not possible for every test case to be executed.

Advantages and Disadvantages of Random Testing

- One of the advantage of random testing is that you can rely on the assertions in the program code.
- There is one more advantage of random testing which is that you can make inferences regarding the reliability of the application in production if you have a selection of random tests that have been generated by reference. 
- One of the big disadvantages of the random testing is that you need to know when a test fails as there is no self indication given by the system. 
- To carry out random testing you require an oracle. 
"By oracle we mean you need to throw random inputs at the software system or application code and that too from multiple possible threads. And if no error or fault occurs, then you can make sure that your software system or application is working well."
Another disadvantage of random testing is that very often you may come across some situations in which you will have two distinct implementations of the same specifications namely:
  1. The golden model and
  2. The implementation.
- In such cases the test is declared pass if and only if both of the implementations agree to a defined accuracy. 
- When you decide to carry out a random testing you first need to make sure that the tests that you are going to use are sufficiently random and they cover overall functionality of the software system or application.

-  Another disadvantage is that the random testing is not efficient than the directed testing. But the advantage here is that the time needed for generating test cases for random testing is quite less than creating a set of directed tests. 
Once you have programmed your random test generator, it can work 24 hours a day generating whole lot of new tests. 
- Often a conflict arises in the minds of the testers whether they should choose between random testing or functional testing. 
- Here, it becomes necessary to know about the number of defects a technique can dig out. 
However, the random testing proves to be useful even in the situations in which many defects are not discovered per time interval since this testing can work without any manual intervention. 
- Usually, the above mentioned testing processes i.e., random testing and functional testing are found together in combination rather than alone. 
- The usage also depends on the software system or application that is under testing. 
- The test cases used in such combinational testing have been termed as directed random tests since the tests cases can be classified on the basis of their randomness or functionality. 
- Out of all the tests, very few are 100 percent random and usually they are not so of the interesting kind. 
- Whenever you have a random test that consists of quite a big number of random elements (that are mutually constrained), then it becomes difficult to avoid thrashing which also accounts as a disadvantage. 
- Certain languages have been developed for defining the test cases for random testing like E and Vera etc. 

No comments:

Facebook activity