


By Srikanth Ramamurthy
Its 9:00PM today. Yet another project’s release day; the application needs to be released to the customer. Build engineer is struggling to make a clean build of the application. Programmers are doing last minute fixes. Testing group is waiting for a proper build so that they can certify the application before the release. Project manager is in deep thoughts thinking what to say to the client if the release doesn't happen.
Finally the release happens at mid-night. Come next day, the first things you see in your mailbox are the bad feedback from the customer about the release you made last night. The feedback could vary from missing features to bad fixes to regression with previous release to missing database scripts to wrong build and what not.
This is a typical scenario which is seen / heard across projects, across companies.
Now how about the below scenario:
Programmers do a code freeze the previous day. The build engineer gives a proper build to the testing group at 9:00AM on the release day. The testing group certifies the application for release by 2:00PM. The project manager compiles the release notes and ships the application by 3:00PM to the customer. The entire team goes for an evening movie show at 5:00PM. Come next day, the first things you see in your mailbox are the positive feedback from the customer about the release you made the previous day.
You may wonder whether this is a dream or a reality. But yes, this is a reality at Trigent except that we don’t go to movies on every release we make.
Trigent achieves this by using one of its best practices “Continuous build, deploy & test”. This paper talks about the practice we follow, the tools & methodologies we use in making this dream come true.
Before writing a single line of code, programmer designs and writes test cases to test his yet to be developed program. He wears a tester's cap which gives an out side view to the functionality to be implemented. This helps the programmer in understanding the feature better and making the logic foolproof.
These test cases helps in identification of pre-state data to be used for the creation of test database and also results in generation of test data to be used to test a particular program.
The test data are represented in xml format. These test xml are defined according to Trigent's proprietary xml schema. The test xml also identifies the test pass and test failure conditions.
The main goal of this activity is not only to come up with good test cases but also in making these test cases as regression test suites. This enables the projects to run the tests on the application as many times as required and helps in identification of any regression in the functionality.
Programmers have their own way of coding. Similarly code reviewers have their own way of reviewing the code. On top of that, some coding issues could be trivial and may not be caught in the code reviews. Manually enforcing a good coding practice is a nightmare and almost impossible when the code base becomes very large.
Trigent achieves uniformity in the code by following automatic code review process. This process prevents syntactically bad code getting into the source repository. To enable this, Trigent uses below open source tools:
Hammurapi
This tool from http://www.hammurapi.biz is an open source code inspection tool. This tool checks the source code for compliance with a pre-defined set of rules or best practices.
Trigent has selectively chosen some of the rule sets provided by this tool.
FindBugs
This tool from http://findbugs.sourceforge.net is a tool to find bugs in Java programs. It looks for instances of "bug patterns" --- code instances that are likely to be errors. FindBugs uses static analysis to look for general code quality problems.
EMMA
This tool from http://emma.sourceforge.net is an open-source toolkit for measuring and reporting the Code coverage. Trigent uses this tool to measure the effectiveness of the test cases. If the code coverage is below 60% then the test cases are enhanced to increase the coverage.
Trigent uses these tools in two ways:
Trigent follows an automatic build & test process. The whole process executes without manual intervention. This enables the projects to have ready to ship code that are 100% reviewed & tested at any given point of time. This process helps in continuous code integration resulting in reliable builds of the application.
This diagram depicts Trigent’s automatic build process:
Below are the tools used in the automatic build process:
The build process is explained below:
Trigent uses a homegrown test driver. This driver is generic and can be used test the business and data access layer code. The test driver is implemented on top of jTestCase from http://jtestcase.sourceforge.net/
This diagram depicts Trigent's test process:

The test process is explained below:
With "Continuous build, deploy and test" practice, Trigent has seen overall reduction in risk with respect to project delivery. Release process is streamlined. It has brought complete transparency into the build and testing process.
Programmers are disciplined, as the entire team will know if the build fails and the culprit behind that failure. The team is careful and makes sure that bad code does not get into source repository.
Code is integrated continuously and bugs are discovered earlier on instead of waiting till the last minute. Regression test suites are enhanced leading to reliable application resulting in timely delivery making the customer happy.
And of course, you get to go home early on the project release date with a smile on your face.
Copyright © 2007 Trigent Software.