testdriven.com Wrangling quality out of chaos

Archive for July, 2005

JUnit 4.0 in 10 Minutes: A Quick Reference Guide [PDF]

07.27.2005 · Posted in Links

JUnit needs no introduction. Originally written by Kent Beck and Erich Gamma, the software is the preferred tool of choice for developer testing. Now, the team of Kent Beck and Erich Gamma is back again with a new version of JUnit — 4.0. This quick reference guide is for programmers and testers looking to migrate to JUnit 4.0.

Author: Gunjan Doshi
Published: June 14, 2005
By the same author:
J2MEUnit in 10 minutes: Quick Tutorial [PDF]
Test-Driven Development Quick Reference Guide [PDF]
Test-Driven Development Rhythm Quick Reference Guide [PDF]
link

FIT for Developing Software: Framework for Integrated Tests

07.17.2005 · Posted in Links

FIT for Developing Software: Framework for Integrated TestsWhen we look at the efforts of most software developers we see a lot of energy being wasted. In the rush to get software completed, there is often little time to reflect on how to improve the way we do things, how to get that special fitness, balance and agility that allow us to be graceful in our intellectual efforts in order to achieve inspired results — with less effort.

We get unbalanced when we have to fix old bugs, losing flow. We often have to speculate about what’s needed, and feedback too slow. Our software becomes less than elegant and is hard to change, with tensions and stresses buiding up in us and in our software.

This book is intended to help improve your fitness and agility in two areas of software development where we can make huge improvements to current practice.

First, how to improve communication between the people who need the software and the people who develop it. Second, how to use automated testing to provide immediate and effective feedback so we can maintain balance and agility, and avoid "injury".

The book also questions some common assumptions about the way in which software is developed. But we don’t expect that you’ll make a big leap of faith; we start with current practice and show how you make small, yet effective improvements.

Authors: Rick Mugridge and Ward Cunningham
Published: Prentice-Hall, July 8, 2005
link

Tags:

Test Framework Comparison

07.17.2005 · Posted in Links

Read almost any software developer journal or website and we’re told that responsible developers write test cases. If those developers are Java developers then, most likely, they use JUnit for those test cases. JUnit is probably the oldest and certainly the most popular Java-based testing framework around. Created by Erich Gamma and Kent Beck, JUnit has become the de facto standard for unit testing. In the interim, however, other frameworks have been built to address various faults and deficiencies with JUnit.

One such option is JTiger written by Tony Morris. JTiger is a JDK 1.5 annotation based testing framework that leverages many of the new features that JDK 1.5 introduced. Another option is TestNG by Cedric Beust and Alexandru Popescu. Both offer some new features over JUnit 3.x, but as we’ll see at the end of this article, the forthcoming version 4 of JUnit will include many of these new features.

Author: Justin Lee
Published: TheServerSide, July 2005
link

Tags:

CruiseControl Monitor plugin for Firefox 0.7 released

07.14.2005 · Posted in Tools

Available for download here.

New in this version:

* Support for sorting of projects in tooltip by name or last build time
* Support for including only failed projects in tooltip
* Proportional font is back, now with proper alignment
* Visual indication of failed projects (*) in addition to color, for colorblind users or users with monochrome monitors

Support for retrieving projects build status from multiple CruiseControl servers is planned for future major release.

CruiseControl Monitor plugin for Firefox 0.6.1 released

07.08.2005 · Posted in Tools

Monitor your CruiseControl build status in Firefox status bar.

Available for download here.

New in this version:
* Proportional font in tooltip with alignment
* Support for include/exclude project lists (with regexp)
* Update mechanism rewritten to update status faster after Options change
* Extension icon

TestNG 2.4 released

07.06.2005 · Posted in Java

The TestNG team is happy to announce the release of TestNG 2.4 at testng.org.

The complete announcement (with links) can be found here.

A lot of fixes and improvements have gone into this release (see the complete list) but the most important feature is the new Web site (testng.org) and the new packaging (org.testng.*).

There are also a couple of items I want to mention briefly:

* A Flash demo of the Eclipse plug-in, created by Andrew Glover (who also set up a TestNG site with articles and resources).
* A TestNG Maven plug-in. I couldn’t include it in this release, but it is now part of our CVS depot and will be included in 2.4.1.

Big thanks go to Alexandru Popescu, Andrew Glover, Thierry Janaudy and Russel Winder for their participation to this new release!

You can download TestNG 2.4 here. The Eclipse plug-in has also been updated to this new version and can be obtained from the update site.

Toplink in memory to run your tests faster

07.06.2005 · Posted in Java

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=1038]Toplink In Memory[/url] is an open source project that allows you to run your database tests in memory. If you’re using toplink and TDD, this package can help you reduce the amount of time it takes you to run all your tests.

Fewer failing tests due to test interaction, Toplink in Memory automatically deletes all the objects you created during the test – but leaves the fixtures in the database untouched.

How does it do this? Well, it stubs out the database. When in production, ToplinkInMemory calls Oracles Toplink normally – which uses the database. During testing all the objects are created in memory and only in memory. NOTHING is written to a disk. And none of those pesky transactions (expensive) are used to save even more time during test runs.

This library was created out of need. We are currently running 4700 tests which take multiple hours to run against the database. Our in memory framework allows us to run them in as little as five minutes. We hope it will be of use to you.

Ted O’Grady

TDD Tools Advisory, June 16-30, 2005

07.02.2005 · Posted in Advisories

Recent releases and updates:

AnyUnit 1.3 – test code generator for MSVS.
BeetleJuice 0.3.26-3 – Continuous Integration Server.
CruiseControl.NET 0.9.2 – Continuous integration server for .NET.
DDTUnit 0.6.6 – A Data Driven Aproach to Unit Testing.
EMMA 2.1.5320 – Java code coverage tool.
FxCop 1.32 – .NET code analysis tool.
JellyUnit 1.0 – Jelly-based JUnit testing mechanism.
JTestCase 3.0.0 – multi-testcase XML organizer.
NUnit Converter 0.2 – switch from NUnit to VSTS.
Parasoft Jtest 7.0 – Automated Java unit testing and coding standard analysis tool.
Pisces 1.2 JUnit distributed testing environment.
Schmock 0.9 – Ruby mock library.
Spike PHPCoverage 0.6.4 – coverage measurement and reports for PHP 5.
Stubby C b01 – C Test Harness generator.
utPLSQL 2.2 – unit testing framework for PL/SQL.
XMLTask 1.1 – automatic editing of Ant tasks in XML files.

Recent projects started:

eXtreme Development Environment: a cross platform development environment tailored for the extreme programming development methodology. Support for multiple architectures, C/QT/Jabber and Ruby on Rails/HTML/AJAX being the first two.

Rhythm: a Web-based issue tracking tool tailored to agile software development planning processes. Built with Ruby on Rails.

tigerunit: a unit testing framework that takes advantage of Java 5 features, namely annotations. It is based on the JUnit code base, and takes much of its design from NUnit. It is fully backward-compatible with JUnit tests.

Refactoring in NetBeans 4.1

07.02.2005 · Posted in Links

Depending on the tools you use, refactoring can be either time-consuming or quick and easy. Fortunately, NetBeans comes with a solid amount of refactoring support built in. This article aims to teach you about some of the more common refactoring options, as well as to show you ways to use these options in everyday situations with your Java technology source code. NetBeans presently supports four primary refactoring approaches:

* Renaming fields, methods, classes, or packages
* Encapsulating fields
* Changing method parameters
* Moving classes

Author: Robert Eckstein
Published: Sun Developer Network, May 2005
link

Maven: A Developer’s Notebook

07.02.2005 · Posted in Links

Maven: A Developer's NotebookMaven is a new project management and comprehension tool which provides an elegant way to share build logic across projects. In terms of capabilities, Maven is an improvement to Apache Ant-thanks to numerous plug-ins and built-in integration with unit testing frameworks such as JUnit. Tired of writing the same build logic for every project? Using Maven, you can leverage the experience of the community to avoid the tedious process of creating yet another build script for each new project.

Maven: A Developer’s Notebook begins by introducing you to the concept of project object model (POM), and then offers further details on the essential features of Maven. Like all titles in O’Reilly’s Developer’s Notebook series, this no-nonsense book skips the boring prose and cuts right to the chase. It’s an approach that forces you to get your hands dirty by working through a series of poignant labs-exercises that speak to you instead of at you.

Plus, Maven: A Developer’s Notebook is the first book on the subject to hit the market, so you know the information is fresh and timely. If you’re a Java programmer, you’ll be armed with all the critical information you need to get up to speed on this powerful new build tool. You’ll discover how Maven can help you:

* manage a project’s build, reporting, and documentation, all from a central piece of information
* break a complex project into a series of smaller subprojects
* report on code quality, unit tests, code duplication, and project activity
* create a custom remote repository
* build simple and complex plug-ins

In the end, you’ll find yourself spending less time working on your project’s build system and more time working on your project’s code.

Authors: Vincent Massol & Timothy M. O’Brien
Published: June 20, 2005
See also: Chapter 1: Maven Jump-Start [PDF]
link

Tags: ,

POJO Application Frameworks: Spring Vs. EJB 3.0

07.02.2005 · Posted in Links

These two frameworks share a common core design philosophy: they both aim to deliver middleware services to loosely coupled plain old Java objects (POJOs). The framework "wires" application services to the POJOs by intercepting the execution context or injecting service objects to the POJO at runtime. The POJOs themselves are not concerned about the "wiring" and have little dependency upon the framework. As a result, developers can focus on the business logic, and unit test their POJOs without the framework. In addition, since POJOs do not need to inherit from framework classes or implement framework interfaces, the developers have a high degree of flexibility to build inheritance structures and construct applications.

However, while sharing an overall philosophy, the two frameworks use very different approaches to deliver POJO services. While numerous books and articles have been published to compare either Spring or EJB 3.0 to the old EJB 2.1, no serious study has been done to compare Spring to EJB 3.0. In this article, I will examine some key differences behind the Spring and EJB 3.0 frameworks, and discuss their pros and cons.

Author: Michael Juntao Yuan
Published: OnJava, June 29, 2005
link

Tags:

Design with pointcuts to avoid pattern density

07.02.2005 · Posted in Links

In "JUnit: A Cook’s Tour," authors Erich Gamma and Kent Beck discuss the design of JUnit. They point out that TestCase, like key abstractions in many mature frameworks, has a high pattern density, making it easy to use but hard to change. In this installment of the AOP@Work series, Wes Isberg revisits the Cook’s Tour and shows you how using AOP pointcuts rather than object-oriented designs can help you avoid some of the pattern density that makes mature designs hard to change.

Author: Wes Isberg
Published: IBM DeveloperWorks, June 14, 2005
link

Expert .NET Delivery Using NAnt and CruiseControl.NET

07.02.2005 · Posted in Links

Expert .NET Delivery Using NAnt and CruiseControl.NETAt first glance, building and deploying applications seem simple enough. But in fact, difficult releases without any confidence or processes backing them are very common. Integration and management of a new deployment can be laborious and fraught with risk. So as team size and volume of projects grow, management becomes more difficult and risk more pronounced.

This book is a guide to the implementation of good processes in a .NET environment. Author Marc Holmes focuses on actual implementation, and details patterns and anti-patterns to watch out for. He also provides a practical and in-depth look at NAnt and CruiseControl.NET, and solutions to common problem scenarios.

* Chapter 1 takes a look at a fictional scenario and then discusses principles and arguments for the introduction of automated delivery processes.
* Chapter 2 introduces NAnt and discusses the ins and outs of the tool itself.
* Chapter 3 covers in more depth at the core NAnt tasks we’re bound to come across, with some discussion of the merits of these.
* Chapter 4 takes a piece of software and shows how to begin implementing automated delivery through NAnt.
* Chapter 5 gets a little more complex and implements (and refactors) the same processes across multiple software systems with some more complex examples.
* Chapter 6 furthers the processes using continuous integration and CruiseControl.Net, once again refactoring as appropriate.
* Chapter 7 teaches how to extend NAnt and build a custom task.
* Chapter 8 covers some complex territory using Red Gate’s DB tools and some custom tasks to perform automated database integration.
* Chapter 9 introduces CodeSmith and XSLT to aid the processes through code (or script) generation techniques.
* Chapter 10 wraps up and considers what’s been accomplished, and what the future may hold.

Author: Mark Holmes
Published: APress, May 9, 2005
link

Tags: ,

Agile Java: Assertions and Annotations [PDF]

07.02.2005 · Posted in Links

Agile Java: Assertions and Annotations [PDF]J2SE 5.0 introduced a new facility known as annotations. Annotations are a metaprogramming facility that allow you to mark code with arbitrarily defined tags. The tags (generally) have no meaning to the Java compiler or runtime itself. Instead, other tools can interpret these tags. Examples of tools for which annotations might be useful include IDEs, testing tools, profiling tools, and code-generation tools.

In this lesson you will begin to build a testing tool, similar to JUnit, based upon Java’s annotation capabilities. The testing tool, like JUnit, will need to allow developers to specify assertions. Instead of coding assertion methods, you will learn to use Java’s built-in assertion capability.

Author: Jeff Langr
Excerpted from Agile Java: Crafting Code with Test-Driven Development
link

Rhino Mocks 2.0

07.01.2005 · Posted in Tools

Rhino Mocks has a new version out, this one takes a lot after NMock2, but retains the strong typing, the Record()/Replay() model and adds many improvements, not the least of them is useful documentation (at last) :-)

What Rhino Mocks offers?

– Explicit record & replay model for expectations
– Strongly typed mocks.
– Expectations based on:
– – Arguments matching
– – Constraints matching
– – Custom callback to verify the expected arguments using your own code
– Sets actions on methods, returns a specific value, or throws an exception.