Monday, November 30, 2009

Unit testing Vs Integration testing

Unit Testing

1. Also known as Component/Module/Program testing, searches for defects in, and verifies the functioning of software (e.g. modules, programs, objects, classes, etc) that are seperately testable

2. Component testing may be done in isolation from the rest of the system depending on the context of the development life cycle and the system. Most often stubs and drivers are used to replace the missing software and simulate the interface between the software components in a simple manner. A stub is called from the software component to be tested; a driver calls a component to be tested




3. Component testing may include testing of functionality and specific non-functional characteristics such as resource-behavior (e.g. memory leaks), performance or robustness testing, as well as structural testing (e.g. decision coverage). Test cases are derived from work products such as the software design or the data model.

4. Typically, component testing occurs with access to the code being tested and with the support of the development environment, such as a unit test framework or debugging tool, and in practice usually involves the programmer who wrote the code. Sometimes, depending on the applicable level of risk, component testing is carried out by a different programmer thereby introducing independence. Defects are typically fixed as soon as they are found, without formally recording the incidents found.

Integration Testing

1. Integration testing tests interfaces between components, interactions to different parts of a system such as an operating system, file system and hardware or interfaces between systems.

2. There may be more than one level of integration testing and it may be carried out on test objects of varying size. For example:
- component integration testing tests the interactions between software components and is done after component testing
- system integration testing tests the interactions between different systems and may be done after system testing.

3. One extreme is that all components or systems are integrated simultaneously, after which everything is tested as a whole. This is called 'big-bang' integration testing. Big-bang testing has the advantage that everything is finished before integration testing starts. There is no need to simulate (as yet unfinished) parts. The major disadvantage is that in general it is time-consuming and difficult to trace the cause of failures with this late integration

4. Another extreme is that all programs are integrated one by one, and a test is carried out after each step (incremental testing). Between these two extremes, there is a range of variants. The incremental approach has the advantage that the defects are found early in a smaller assembly when it is relatively easy to detect the cause. A disadvantage is that it can be time-consuming since stubs and drivers have to be developed and used in the test

2 comments:

Software Development Company said...

Hello,
The Article on Unit testing Vs Integration testing is informative. It gives detailed information about it .Thanks for Sharing the information about the Comparsion of Unit Testing and Integration testing. Software Testing Company

Allen Marry said...


Nice Post.. really helpful to clear my small concepts. thanks :)Keep doing more, waiting to read your next blog security testing services. Visit here for more information about Vulnerability assessment services and penetration testing services.