Sponsors

Tuesday March 15, 2005
EARLIER TIME
Beyond Junit: The Future of Developer Testing for Java Technology
Thanks to Barry for his presentation on unit testing and Agitar's automated testing tool for Eclipse. Writing unit tests should be an integral part of any software project - new and old. Unit tests form the basis for regression tests that form the form the basis of verifying basic functionality and catching bugs accidently introduced by code changes. Many would argue that unit tests should be written before the actual code it tests has been implemented. However, not all unit tests are alike. Writing unit tests require time as well as discipline thus unit test coverage is not always what it appears. Unit tests may not test the needed functionality or may make certain implicit assumptions regarding the code. Agitar has developed an Eclipse plugin that generates tests and evaluates the coverage of the tests on code. The evaluation is not just based on the number of methods called or classes with a unit test - but on the number of lines and conditionals that the tests effect. Thus, it is a truer measure of test coverage since it analyzes code flow. Agitar builds up xml test descriptions which can be edited and easily stored in version control - no binary files. The tests generated by Agitar's plugin can be invoked via Ant tasks thus easing integration with nightly builds. This was a very interesting tool that anyone who has gotten stuck updating mindless junit would definitely appreciate.
Abstract
The past several decades have seen significant advances in software development technology. IDEs have made syntax errors virtually obsolete. Programming languages with built-in garbage collection, such as Java, have eliminated most classic memory leaks. Debuggers have made it much easier to track down hidden problems. These improvements have resulted in a significant increase in the ability to produce large volumes of code, but the generated code still has too many defects. Tools for traditional QA functions, such as system testing, GUI testing, and load testing have become more powerful and widespread.
Software defects often result from simple coding errors. It has long been known that the earlier in the development lifecycle these bugs are removed from the software, the less they cost. Bugs discovered earlier in the lifecycle often cost orders of magnitude less to remove than bugs found toward the end of development (system testing, load testing) or, even worse, postdeployment.
Currently, most software testing is done at the system level, after the software is written, which defers the discovery of bugs. Unfortunately, most bugs are introduced during the code construction phase of the lifecycle, resulting in a "software quality gap" between the production of bugs and their removal. Developer testing, also referred to as unit testing, is the answer to the software quality gap. Testing by developers is highly effective because bugs are found as the code is being written. When the code is fresh in the developer's mind, it is easy to identify and fix bugs. Such early testing also helps developers focus on better design as they create and modify their code. A comprehensive and durable set of test assets is created along with the code, making later code changes easier and safer.
Thanks to JUnit, we have automated and standardized test execution and reporting, but the creation and maintenance of developer and unit tests is still a time-consuming and mostly manual process. It’s time to raise the bar. Java gives us an opportunity to let computers do 90% of the mundane work associated with test creation and maintenance – and to do it better than us. We should take advantage of this so developers can focus on the aspects of programming and testing that fully leverage human intelligence and creativity.
In this presentation you will learn how Java’s unique set of features combined with the computing power of modern CPUs can be used to address some of the thorniest problems associated with developer and unit testing. You will learn the right way to handle some of the biggest challenges intrinsic to testing such as combinatorial explosions, the myriad of explicit and implicit class dependencies, uncoordinated and unexpected code changes, complex and time-consuming test set-up and test maintenance issues. You will see code and test examples that highlight the inherent inefficiencies and incompleteness of hand-crafted tests, and how automation and collaborative testing can save you from writing and maintaining 90% of the test code you think you need to write.
Speaker
Barry Mullan is a senior solutions consultant for Agitar Software, responsible for the North East and Eastern Canada. Prior to Agitar, he worked for 6 years at IONA Technologies; specializing in distributed systems using CORBA, J2EE and Web Services. He is a graduate in computer science from Trinity College Dublin and lives in Medford,MA.
Links
Door Prizes

Raffle ticket to: The New England Software Symposium

See Below

Contact the Webmaster