Continuous Integration Builds and Automated Unit Testing Agile Testing

The key benefits of implementing the best-of-breed life cycle is that it integratesseamlessly, both from the process side and the technology side, with the desired CIB and testing.

In my opinion, the key advantages of CIB are

  • consistently working software,
  • automated unit testing, and
  • panopticode scanning.

Each time a developer checks a changed piece of code into the CIB tool, this triggers a build. Each time a spike development–or support and maintenance–change is promoted to development, this triggers the automated CIB.

A rich CIB tool dashboard provides the users with an enterprise view of all builds, across all projects.

As part of the CIB, the unit tests are automatically initiated and users automatically warned of any code quality problems. The build process can also be configured to “fail” if the unit tests fail;this ensures that the application remains operational, even if it is functionally incorrect. Again, the project stakeholders are able to visualize this information via the rich user interface of the CIB tool dashboard.

As described previously, the key to a successful CIB process has got to be identifying the problems before they manifest themselves further down the life cycle. If problems are missed, they are more costly to rectify further down the line and can prevent a stable application from being available, delaying productivity and delivery. However, we must note that the unit tests are only as good as the developers who write the unit tests(if they write them);this brings us on to unit test coverage. If we do not manage the unit test coverage then the unit testing becomes ineffectual, undoing the efficiencies of the entire CIB process–it is better to have an 80% unit test pass rate on 95% of the code than to have 100% pass rate on 5% of the code.

To manage this potential problem, we employ a Panopticode scan that will provide the users with a visual representation of how much of the developed application has unit tests and to what extent. In our implementations of the automated CIB tool we utilize the Panopticode scanning tool to represent this analysis and to visualize the results by using powerful code coverage graphics.

Following the Panopticode scan, a rich two-dimensional display is generated to assist the users in visualizing the results. This scalable vector graphic(SVG) is an interactive, graphical representation of the unit test coverage; green, yellow, and red represent coverage greater than 75, 50, and 0%, respectively. Black represents the areas of the application where no unit test coverage exists(blue is “not applicable”). Two-dimensional boxes represent methods, and these are grouped by the classes in which they belong.

Again, by using the Panopticode scanning tool it is possible to manage the code complexity of the applications. By identifying the complex areas of an application it is useful to assign developers to refactoring activities–the rework of complex reas to make them less complex and more useable.

As with the code coverage, we can generate an SVG graph that will assess the complexity and provide a code complexity number (CCN) rating. The code complexitydisplay uses a style of graphic display similar to that used for code coverage:green, yellow, red, and black represent CCN ratings from 1–5, 6–9, 10–24, and 25+, respectively(1 being the least complex and 25+ being the most complex).

With the Panopticode scans, we now have a comprehensive system for identifying the most complex code and the areas in which unit testing is not sufficient. In addition to the Panopticode scanning, the CIB tool also has various options to include code analysis tools, including CheckStyle and PMD. These can be very useful for checking the quality of the code at build time.



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Agile Testing Topics