Wednesday, August 19, 2009

New Trends in SQA - Continuous Integration

Continuous Integration (CI) is a modern trend to improve the quality of software. In this software development practice every team member can integrates (merge changes with repository) their work frequently; usually each person integrates at least one time while the team member completes one task. Each integration is verified by an automated build (snap-shot) and automated testing to detect integration errors software defects as quickly as possible. This approach leads to reduced integration problems and allows a team to develop more stable software more quickly.

If I explain this more, after developer starts his work by taking a copy of the current integrated source onto my local development machine, take the working copy and do whatever need to do to complete the task. This will consist of both altering the production code, and also adding or changing automated tests. I mean as ‘automated tests’, mostly the unit testing which can use such as Xunit, JUnit, TestNG testing frameworks.

Once the developer done with the task then, he wants to makes snap-shot with recent changes. If the snap-shot build with out errors then developer should run the automated test. Only if it all builds and tests without errors then the overall build considered to be good. Once the developer has made the build of a properly synchronized working copy then he can finally commit my changes into the repository.

The whole point of Continuous Integration is to provide rapid feedback. A simple example of this is a two stage build. The first stage would do the compilation and run tests that are more localized unit tests with the database completely stubbed out. Such tests can run very fast, keeping within the ten minute guideline. However any bugs that involve larger scale interactions, particularly those involving the real database, won't be found. The second stage build runs a different suite of tests that do hit the real database and involve more end-to-end behavior.
And also if you test (mainly the second stage) in a different environment, every difference results in a risk that what happens under test won't happen in production. So testers have to test in a Clone of the Production Environment
On the whole I think the greatest and most wide ranging benefit of Continuous Integration (CI) is reduced risk. As a result projects with Continuous Integration tend to have fewer bugs, both in production and in process.

Continuous Integration - Diagram