aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

What is the difference between Unit testing,Assembly testing,Integration Testing and Regression testing

Sep 4, 2010

Here I will explain difference between Unit testing, Assembly testing, Integration testing and Regression testing 


Unit testing is also called as Component testing. Unit testing ensures that reliable program unit meets their requirements. Unit testing is normally conducted by programmer under the supervision of the project lead or the team Lead. Main objective of this testing is to test each unit in isolation and individually. This is done by knowing what the inputs to the unit are and what the expected outputs for the same. Unit testing is a white box activity. Unit test normally comes in the implementation phase of the project. 

For instance in the below figure we are trying to do unit testing on the customer class. So we create the object of Customer class assign “CustomerCode” and “Age” property and check for the response. For instance in this condition we tried to pass a non-numeric value to the “Age” property and the class threw an error saying “Age should be numeric”. So here the basic unit testing entity is your class.
Fig: Unit testing for sample Customer class

But unit testing is not limited to a component, object or function. So definition of a unit testing 
will depend on the approach. Below are some examples of unit testing:-

1)      1) Check points in UI like tab orders, error messages, look and feel etc.
2)      2) Class, object, component level testing has said previously.
3)      3) In case of functional programming can be a simple method or function.
4)      4) Logic testing for algorithms. Some projects can have some critical algorithm for instance some kind of custom sorting, security implementation etc. So that logic can be tested independently.

 But the general thumb rule of what is Unit in Unit testing is that the module self contained and by itself. 

Assembly testing goes one step ahead than unit testing. It demonstrates that can the modules interact in a correct, stable and proper manner as defined by the functional specifications provided by the client. Assembly testing is Black box testing style and also called as Integration testing. For instance in the above unit test of the “Customer” class, testing was done in isolation. But in actually the “Customer” class is not going to be stand alone rather it will be used more in conjunction with the “Product” class and also will have UI to do the same. So in short the “Customer” class will work with two more entity one is the “UI” and the other is the “Product” class. So normally assembly testing is done through UI but not necessarily.

Fig: Integration Testing

The above figure defines a simple scenario for integration testing. The same “Customer” class is now tested with the “UI” and “Product” to see if the interaction between them matches according to functional specifications. 

Regression testing ensures that application function properly even if there are changes or enhancements to system. For instance you change the “Product” class still you will run all the test cases for “Product” , “Customer” and “UI” just to make sure that any changes in “Product” class does not affect interaction with other entities. So you will see when testers do a regression testing they run all the scripts to ensure that nothing has been affected.

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...

What is Integrated Assembly Test?

Anonymous said...

What is Integrated Assembly Test? Reply yaar.... :/

celebrity said...

Thanks, now i know the differences.

Unknown said...

Informative post. Thanks! for the share.
Came across the blog while browsing for integration testing and found more useful information on the blog.

Chirag Murabiya said...

Can you give me the example of Unit Testing in MCV?

Anonymous said...

That's great and fantastic stuffs for security purpose. It is fascinating for me and it is really a complete Website Monitoring Tools

Unknown said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.