Amazon.com

Ad Brite

Your Ad Here

Wednesday, 17 December 2008

Unit Testing

The aim of Unit Testing is to take a small piece of software from the application, isolate it from the reminder of the code and check whether it works exactly as you expect. like wise each unit is testing in this manner seperately before intergrating them into modules to test into interfaces between modules, and most of the defects are identified during this unit test.

Unit testing requires drivers and stubs to be written, here the driver simulates a calling unit and the stub simulates a called unit. though the Driver and Stub costs time and money, unit testing provides some unquestionable advantages, this allows automation of testing process, reduces troubles of exploring errors contained in more complex pieces of the application, test coverage is often raised because attention is given to each unit.

Example: if we have 3 units, lets see how to check it..
  • check is the error due to unit1
  • check is the error due to unit2
  • check is the error due to unit3
  • check weather it is because of the problem with 3 units
  • check is the error due to interfaces between units
  • it might be due to defect in the process of testing

Identifying the error (or errors) in the integrated module is much more complicated than first insulating the units, testing each module and integrating them as an integrated unit and testing thee whole system.

Driver and Stub can be reused to reduce the time and cost instead of writing large amount of code.

Related Topics:

1 comment:

George said...

Good article on program testing and particulalry unit testing to debug for errors

share this posting to ur blog or website or to your friends

Join AdBrite

Use AdBrite as Money maker

Your Ad Here