Thursday, July 18, 2013

Frog wars

From the woefully incomplete Wikipedia article, "It is generally the case that the second railway to arrive [at a junction] has to bear the cost of the special trackwork needed to cross the first. This includes the cost of any interlocking tower or signal box."

Thus, there was tremendous incentive to be the first railroad to reach a prime location, incurring extra costs on any latecomers.

This was called a "frog war", named after the "frog", the specialized rail piece that goes in the center of a junction and looks like a jumping frog.

Frog wars were dangerous.  In one case, after which is named the Grand Crossing area of Chicago, the second line was built secretly, to avoid the cost of the proper precautions, leading to a crash that killed 18.

I recommend "frog war" as also pertaining in software, where the second person to check in a change in a given location incurs the cost of merging with the first change.

I've lost a couple frog wars recently, but I'm hoping to win this next one...

Tuesday, January 17, 2012

A new role at Google

For the last four years, I've been working at Google, supporting the Google Books project as a Software Engineer in Test.  There's at least a blog post and a half to be written about how that role fits within Google's larger development practices, and the opportunities it provided to see what automated testing could do with Google-scale hardware and software behind it.  I enjoyed it, and loved the team; I've spent more time with the team of SET's behind Google Books than with any previous team in my career.

This project also served as a capstone of 10 years in which my primary professional focus has been building software that helps software builders build software: frameworks, code analysis, testing.

Starting today, I'm excited to be shifting my focus back toward end users, as I join the team behind the Books app for Android, working on feature development.  This also marks the first time in 3 years that I go back to being a full-time user of JUnit, which I'm quite happy about.

2012 should be exciting.  If there's something you've always wanted an eBook to do for you, let me know!

Thursday, September 29, 2011

No new JUnit release announcements, period, here.

If by chance you've been following this blog in order to get announcements of new JUnit releases, whether beta or final, this is the last time they are likely to be posted here. You can follow along at, or the mailing list. I'll be keeping this blog for whatever comes to mind that is more exciting that JUnit releases, which are becoming more predictable and mundane. By the way, JUnit 4.10 is released. Share and Enjoy!

Thursday, September 22, 2011

No new beta-release announcements here

Hi, all. In order to reduce the noise until there's time to raise the signal here, I'm going to start only announcing JUnit beta releases on the main user's mailing list: If you are a devoted beta-tester, and that's a problem, let me know. Thanks.

Tuesday, August 23, 2011

JUnit 4.9 released

Over a year in the making, we are happy to announce the release of JUnit 4.9.

This release's theme is Test-class and suite level Rules. The release notes are copied in part below, and can be read in full here.

Go ahead and download, or merely let maven do the work for you (as we are now directly releasing to sonatype's maven repository on the same day we release the jars).

Following this release, work on JUnit and related code will continue on three fronts:

  • Bug fixes against existing functionality will be committed to the 4.9.1 branch.
  • New core features will be committed on the 4.10 branch.
  • We have created a new junit.contrib project to be a home to new experimental features, features that use additional dependencies, and features that are outside of JUnit's core mission. As a first example, Thomas Mueller has created assertthrows, a package that uses all kinds of JDK trickery to allow direct assertions like this:
      List<String> emptyList = new ArrayList<String>();
We are excited that github allows extensive community participation and discussion in the ongoing development. Please pitch in! Remember, JUnit celebrates programmers testing their own software. Let's build something.

JUnit 4.9 release notes (highlights)


The ClassRule annotation extends the idea of method-level Rules, adding static fields that can affect the operation of a whole class. Any subclass of ParentRunner, including the standard BlockJUnit4ClassRunner and Suite classes, will support ClassRules.

For example, here is a test suite that connects to a server once before all the test classes run, and disconnects after they are finished:

@SuiteClasses({A.class, B.class, C.class})
public class UsesExternalResource {
    public static Server myServer= new Server();

    public static ExternalResource resource= new ExternalResource() {
        protected void before() throws Throwable {

        protected void after() {


In JUnit 4.9, fields that can be annotated with either @Rule or @ClassRule should be of type TestRule. The old MethodRule type, which only made sense for method-level rules, will still work, but is deprecated.

Most built-in Rules have been moved to the new type already, in a way that should be transparent to most users. TestWatchman has been deprecated, and replaced by TestWatcher, which has the same functionality, but implements the new type.

Maven support

Maven bundles have, in the past, been uploaded by kind volunteers. Starting with this release, the JUnit team is attempting to perform this task ourselves.

LICENSE checked in

The Common Public License that JUnit is released under is now included in the source repository.

Friday, August 12, 2011

JUnit 4.9b4 (beta-)released

This release's theme is Test-class and suite level Rules. This beta release contains a number of community-authored fixes for regression errors in documentation and test class validation. Please read the release notes, download, and give feedback before the final release.

[Edit: fixed release notes link]

Wednesday, July 6, 2011

JUnit 4.9b3 (beta-)released

Five months and a dozen regression errors later, JUnit 4.9b3 is now ready for your testing pleasure. This release's theme is Test-class and suite level Rules. Please read the release notes, download or slurp from Maven, and give feedback before the final release.