aspose file tools*
The moose likes Testing and the fly likes Sanity Testing  Vs   Regression testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Sanity Testing  Vs   Regression testing" Watch "Sanity Testing  Vs   Regression testing" New topic
Author

Sanity Testing Vs Regression testing

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1382
What is the difference between Sanity Testing & Regression testing ?
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Regression testing is testing code that has been modified. For example, you write some code and test it thoroughly. Then you find a bug or make some other changes to the code. Not only do you need to test your changes to make sure they work correctly, but you should also test an affected code to make sure you didn't accidentally break something. This last part is the regression tests. Often you will just run your original tests along with the new ones for the changes you made. However, sometimes the original test suite may be too large or some of the tests don't apply to the changes you have made, so you might decide to run a smaller subset of the orignal tests.

Sanity testing on the other hand usually refers to making sure the assumptions you make about your code are true. For example, you use a method that returns a reference and the API docs claim that the method will not return a null reference. You could use an assertion to make sure that the return value REALLY is non-null. This is typically a good thing to do if you also wrote the other method yourself.

Layne


Java API Documentation
The Java Tutorial
 
 
subject: Sanity Testing Vs Regression testing