Tool Integration In Distributed Agile Development

[article]
Summary:
This article provides an overview of various tools, integration strategies and their benefits in agile environments. These tools would come in handy in implementing key agile practices like daily builds, refactoring, continuous integration and test driven development.

The first agile principle in the Agile Manifesto is "individuals and interactions over processes and tools." In this competitive world, the customer expectation is high in terms of quality, productivity and cost. "Individuals" alone cannot meet customers' expectations and this is where the tools complement individuals' efforts. There are numerous open source and commercial tools available to help developers achieve success. The second part of above-mentioned agile principle says "interactions." This adds another dimension of complexity in a "duo-shore" model, where the teams are separated not only by distance but differ culturally. 

This article provides an overview of various tools, integration strategies and Ftheir benefits in agile environments. These tools would come in handy in implementing key agile practices like daily builds, refactoring, continuous integration and test driven development.

Requirement Gathering And Analysis
Let us start with the tools to help developers in requirement gathering.

Wiki
Wiki is a tool used to enhance group communication. Wiki's flexibility and ease of use has made it popular among agile teams. The typical scenarios for Wiki usage include:

  • Onsite customer sharing the use cases with the offshore development team through standard Wiki templates.
  • Development team posting questions after requirement analysis.
  • Testing team updating the test cases.
  • Entire team tracking the product and iteration backlog.

Some of the commercial wikis provide plug-ins to draw burn-down charts and RSS feed capabilities. Example open source wikis include JSPWiki and Twiki. An example commercial wiki is Confluence.

Web Conferencing Tools and Instant Messaging
One of the agile principles is: The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. [1]

The above principle {sidebar id=1} could be practiced by making the local teams to sit together, but what about "geographically distributed teams"(GDT)? GDTs need more and frequent communication to succeed in software development. Some of the tools that help in this area include instant messaging (IM) and Web conferencing tools. Examples include Interwise, WebEx, Yahoo/MSN messengers, Skype, and Web Cams.

At Valtech, we use combination of above tools that are integrated with the Valtech cockpit. A typical scenario of web conferencing tool usage could be an iteration planning/release planning meeting or a design discussion. For example:

  • GDT members log on to "meeting rooms." The teams can see each other through Web cams.
  • The onsite customer/product owner starts sharing priorities of delivery for the upcoming iteration/release.
  • Sessions are recorded and played later for more clarity. They can also be used as training material for the newcomers.

Design, Coding and Integration
Let us look at the agile principle, "Continuous attention to technical excellence and good design enhances agility." 

Most of the time, developers are worried about meeting a deadline and delivering software that "just meets" a customer's requirement. During this process, they may sacrifice quality and stability of the product. The key agile practice of test driven development (TDD) can lead to well-designed software. With TDD, the developer writes the test first with no business logic to test, and so the test should initially fail. Next, the developer plugs in the business logic and executes the same test again. The time the test should pass. In order to run through these steps iteratively, the agile developer needs a robust IDE, testing tool and refactoring tool.

In the Java world, Eclipse is the most popular open source IDE with good support for refactoring. There are numerous plug-ins available for Eclipse to enforce quality attributes into the code, some of which are explained below.

Checkstyle and PMD are static code analysis tools that track unused methods and variables, incorrect imports, empty blocks, etc.  In a typical usage scenario:

  • Developer writes the code using IDE.
  • Checkstyle/PMD (integrated with this IDE) runs through the code in the background and displays the warnings/errors.
  • Developer fixes them accordingly and keeps writing new code.

EMMA and Cobertura are code coverage tools that:

  • Can used to calculate the percentage of code accessed by tests.
  • Can do coverage on statement, path and condition.
  • Identify redundant test cases.

Agile teams benefits by getting early feedback about possible "about-to-happen-defects" captured at the build stage. The developer can iteratively fix the code and build (see Figure 1).  

vk0706-1

 Figure 1: Tool integration in an Agile environment.

Continuous integration (CI) is the practice of integrating the developed code as frequently as possible. CI is all about communicating early and communicating often. One can configure CI tools to do regular builds at a constant interval or to execute builds asynchronously triggered by events like checking in source code into repository. In a typical usage scenario:

  • Developer checks in code to repository.
  • CI tool gets triggered, builds the code and executes the tests.
  • CI tool outputs test results, code coverage results, and build status on a Web page.

CI tools can be configured to send emails about the build status to the developers, thus increasing the developer's productivity by avoiding constant polling of build status (see Figure 2). Agile teams benefit from increased communication, early feedback and adapt cycle, and improved quality and productivityvk0706-2

Figure 2: CruiseControl integration

Open source CI tools include Cruise Control and Damage Control

ANT is the most popular Java build tool. It acts as glue among the source code, quality tools and continuous integration server. A continuous integration server could be configured to run the build file at regular intervals.

Configuration Management
Having multiple source code repositories scattered across GDT will hamper communication. As the size of the project grows, the configuration managers have been found wasting their productive hours in merging code from different repositories. The solution to this problem is to have a common repository such as CVS , Subversion or ClearCase. (These could be integrated with an IDE like Eclipse.) Agile teams benefit because a common repository helps improve communication among teams, reduce waste as managing single repository is easy, support effective daily build and integration and provide global view of code quality to entire team.

Information Radiator
Kent Beck says: "An interested observer should be able to walk into the team workspace and get a general idea of how the project is going in 15 seconds. He should be able to get more information about real or potential problems by looking more closely." [2]

"Information radiators" are visual display units that could help in achieving Kent's goal. Many agile teams use white boards, flipcharts, posters and electronic display units. At Valtech, we use a combination of the above and also use a "virtual lava lamp" (VLL). VLL is a piece of Java code that can be integrated with Cruise Control. VLL monitors the build status and displays the build status information graphically on a huge monitor (see Figure 3). Since VLL runs as a Web application, the onsite team (in the case of GDTs) can access the Web page and display the build status in its own offices. Thus, all of the project teams get early and up-to-date information about the build status and can communicate using the information radiator. 

vk0706-3

 Figure 3: Picture of Virtual Laval Lamp taken in agile room.

Testing
If a defect is found at later stages of the project, the cost of tracing the origin and fixing the defect will increase. And, depending on the scope of the defect, additional modules could be affected. xUnit frameworks, such as JUnit, NUnit and MBUnit, are the unit testing frameworks which form the core part of  TDD.

Automated regression testing can be implemented by making the CI tool run the unit tests continuously. These "self testing builds" could output the results as a Web page. The onsite team can provide feedback and take corrective measures by going through the web page. Again, the team can benefit from improved quality and communication and from early feedback-adapt cycles.

Fitnesse is an acceptance testing framework gaining popularity due to its ease of use, and its ability to enable collaborative development between the customer and development team. Figure 4 illustrates a sample scenario of Fitnesse usage for both onsite and offshore agile development:

  • Customers provide the requirement either using Wiki or spreadsheets.   
  • Developers write "fixtures," pieces of Java code, to run against the business logic of the application. 
  • The results from executing fixtures are compared with the actual values (as given by customer). Matching results are shown in green

 

vk0706-4

Figure 4: Example Fitnesse scenario.

The acceptance tests need to be executed frequently by integrating with Cruise Control. The output can be viewed as a Web page, in turn enabling the onsite customer to get the latest status of quality of project.

After considering the tools in this article and relating them to the agile principle "individuals and interactions over processes and tools," it is clear that tools form the bridge between individuals to interact effectively. Especially in an offshore development scenario, good communication tools with frequent access to transparent data make a marked difference in delivering software on time.


 [1] See the Agile Manifesto for this and other agile principles.

[2] Kent Beck, Extreme Programming Explained page 61

About the author

AgileConnection is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.