Subscribe by Email


Showing posts with label Random testing. Show all posts
Showing posts with label Random testing. Show all posts

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. 


Friday, June 29, 2012

Give short description on random software testing techniques?


Random testing is usually not followed because of its bad record as the case of worst program testing. But still it founds use in some of the software testing projects in the field. Though it has got a bad record, it is not always viewed as a foul case of software testing. 

What are in demand are the software testing methodologies that take in to consideration the structure of the software system or application that is to be tested. Path testing, partition testing etc were some of the resultant techniques that grew out of such demands. 

Is Random Testing Effective?


- After a rigorous research, simulation results were presented in which it was observed that it is not always that random testing is bad for testing, but sometimes it proves to be quite cost effective.
- Apart from the simulation results, the actual results of the random testing experiments were presented in which it was confirmed that the random testing is indeed a quite useful validation tool. 
- The random testing has been categorized under the black box testing techniques which involve the testing of the software system or application with an arbitrary sub set of all the possible input values. 

In this article we are going to discuss about the different techniques that can be used to carry out effective random testing. For random testing, the software testing strategies that take in to account the structure of the software system or application are usually preferred. 
Such two testing strategies are namely:
  1. Path testing and
  2. Partition testing

Random Software Testing Techniques


- Path testing is considered to be an instance of the partition testing and is hence usually deployed for the structural testing. 
- On the other hand, the partition test is usually used for random testing that works with any testing scheme which involves the forced execution of few test cases from the sub sets of a partitions of a domain from where input is supplied. 
- Simulation results as well as the results of actual random testing were presented and it was concluded from them that the random testing is quite an effective and need not always be a bad case.
- The actual random testing experiments results declared the random testing as a viable tool for validation testing. 
- Another technique for random testing is the simple black box random input testing.
- It is considered to be a crude technique that effectively locates most of the bugs in real time software systems and applications. 
- In this technique the software system or application is subjected to two kinds of input: With these simple parameters any application can be subjected to random testing. 
  1. Streams of valid mouse and key board events
  2. Streams of valid Win32 messages.

Goals of Random Testing Techniques


- Using the random testing techniques the command line applications could be crashed or hung. - The basic goal of any random testing technique is to stress the software system or application program. 
- In random testing you are required to simulate the user input in the testing environment.
Firstly, the random user input is delivered to the software system or applications by putting this random input into the main communication stream between the server and the application. 
In the case of first type of input data, complete random data was sent to the software systems since it provides an insight in to the level of robustness and testing of the software system. 
- Any failure can be encountered during the normal use of the software system. 


Monday, August 1, 2011

What are different testing methods that are applicable at the class level?

Object oriented testing begins by evaluating the object oriented analysis and object oriented design models, structured walk-throughs, prototypes, formal reviews of correctness, completeness and consistency.
Test each operation as part of a class hierarchy because its class hierarchy defines its context of use. The approach that can be used :
- Test each method (and constructor) within a class.
- Test the state behavior (attributes) of the class between methods.

Each test case should contain:
- a list of messages and operations that will be exercised as a consequence of the test.
- a list of exceptions that may occur as the object is tested.
- a list of external conditions for setup.
- supplementary information that will aid in understanding or implementing the test.

To test a class, there are two methods called as random testing and partitioning applicable.

For random testing for object oriented classes, the number of possible permutations for random testing can grow quite large. A strategy similar to orthogonal array testing can be used to improve testing efficiency. In random testing, methods applicable to class are identified, constraints are defined, a minimum test sequence is defined and then generate a variety of random (but valid) test sequences.

Partition testing reduces the number of test cases. State based partitioning categorizes class operations based on the ability to change the state of the class. Attribute based partitioning categorizes class operations based on the attributes that they use. Category based partitioning categorizes class operations based on generic function that each perform.


Facebook activity