The Artima Developer Community
Sponsored Link

Java Buzz Forum
When Unit Tests Go Bad Over Time

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Janek Schwarz

Posts: 95
Nickname: jschwarz
Registered: Nov, 2004

Janek Schwarz is a software developer specialized in client-side Java technologies
When Unit Tests Go Bad Over Time Posted: Mar 22, 2005 2:35 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Janek Schwarz.
Original Post: When Unit Tests Go Bad Over Time
Feed Title: The Wannabe Java Rockstar
Feed URL: http://weblog.janek.org/Archive/Categories/javablogs.rss.xml
Feed Description: The Wannabe Java Rockstar: Janek's weblog where all posts go to Eleven
Latest Java Buzz Posts
Latest Java Buzz Posts by Janek Schwarz
Latest Posts From The Wannabe Java Rockstar

Advertisement

Today I had one of those I-didn't-change-anything-why-did-it-stop-working moments. Out of a sudden a unit test broke. I went back to the latest known working state, I checked out an older release from CVS -- it still broke. Something weird was going on: the release process makes sure that every unit test passes before creating a new release. Effectively, the past had changed.

The tested class is a somewhat complex piece of code for managing X.509 certificate chains. It makes sure that the chain is valid, that every single certificate is electronically signed, that the certificates aren't expired. And that's what happened: one of the certificates used to test this class expired.

The worst thing isn't the time wasted while trying to debug the problem; it's that we can't use older releases as-is.

I wonder what I can do in order to avoid it in the future. The nature of the tested code, the test arguments and the environment might make it hard. I can't just create a new X.509 certificate during test setup as it has to be signed by a certificate authority.

Any of you unit test gurus have an idea?

Read: When Unit Tests Go Bad Over Time

Topic: planet-eclipse.org Previous Topic   Next Topic Topic: Jakarta Commons HttpClient 3.0 R.C.1 Now Available

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use