testdriven.com Wrangling quality out of chaos

Archive for December, 2004

.NET Deep Dive Test Driven Development lecture [Video]

12.30.2004 · Posted in Links

A lecture given by Roy Osherove about the basics of Test Driven Development with Microsoft .Net.

Note that the lecture is in Hebrew. The lecture discusses the basics of unit testing and the difference between regular unit testing and Test Driven Development. It also shows the basic usage of Nunit

Speaker: Roy Osherove (blog)
Presented: November 25, 2004
Duration: ~1hr
Format: Windows Media Video (WMV)

Exploring the C++ Unit Testing Framework Jungle

12.29.2004 · Posted in Links

"I’m now in the situation that I need to choose a unit-testing framework to roll out for my team at work. So, before I get to talk about how to use test-driven development in games, or the value of unit testing, or anything like that, we dive deep into a detailed comparison of existing C++ unit-testing frameworks. Hang on tight. It’s going to be a long and bumpy ride with a plot twist at the end."

Author: Noel Llopis
Published: December 28, 2004


Refactoring in the Large

12.29.2004 · Posted in Links

Most large refactorings can easily be composed out of smaller refactorings. And yet, performing large refactorings is different from performing smaller ones. Why? A first reason is the number of lines of code involved in the refactoring. Because of this increase in lines we can’t pay as much attention to each of the individual steps as we would for smaller refactorings.

Inevitably, some issues (we’ll call these design defects) are overlooked on the outset of a large refactoring. During the refactoring these defects manifest themselves in the form of tricky complications that slow down the ongoing refactoring effort.

Naive attempts to resolve such defects in an ad hoc basis often fail. Trying to approach the problems issue by issue we find ourselves trapped in a deep recursion of refactorings. Each step seems to reveal more design defects. It’s easy to get lost in such a situation so rather than digging all our way downward we need a more strategic approach.

Author: Sven Gorts
Draft version


PyFit (2): Agile Testing

12.29.2004 · Posted in Links

In the conclusion of part 1 of the PyFIT tutorial, I said I would experiment with RowFixture tables. It turned out that they’re really easy to use. I’ll show here a simple example that will extend the FitNesse acceptance test suite for the Blog Management application.

Author: Grig Gheorgiu
Published: December 20, 2004

Agile Development: Lessons learned from the first Scrum [PDF]

12.29.2004 · Posted in Links

In 1993, at Easel Corporation in 1993, we we first applied the Scrum process to software development teams when we built the first object-oriented design and analysis (OOAD) tool that incorporated round-trip engineering. In a Smalltalk development environment, code was autogenerated from a graphic design tool, and any changes to the code from the Smalltalk integrated development environment (IDE) were immediately reflected back into design.

Since the product was directed toward enterprise software development, we spent a lot of time analyzing best practices in software development methodologies.

Author: Dr. Jeff Sutherland
Published: October 2004


“Better Software, Faster” with Mike Clark in Fremont, CA, February 5, 2005

12.29.2004 · Posted in News

Mike Clark, consultant, speaker, programmer and author of Pragmatic Project Automation (The Pragmatic Bookshelf, 2004), will lead the comprehensive Java seminar, designed for all Java software developers who have a working knowledge of Java and basic OO concepts. "Better Software, Faster" will focus on three topics that are important to all Java software developers:

– Writing Good Code, which will teach participants how to write clean code that works, detect code smells before they begin to rot, and reverse the effects of rotten code,
– Test-driven Development, which will explore 12 practical ways to start writing JUnit tests, and keep writing them when under pressure, and
– Project Automation, which will give participants the recipes for automating software projects.

Presenter: Mike Clark is a consultant, author, speaker, and programmer. He is the author of Pragmatic Project Automation (The Pragmatic Bookshelf, 2004), editor of the JUnit FAQ, a frequent speaker at software development conferences, and the creator of several popular open source tools. Mike helps teams build better software faster through his company, Clarkware Consulting (clarkware.com).

When: Saturday, February 5, 2005
Time: 10 a.m. to 6 p.m.
Note: Please arrive at 9:30 a.m. to expedite your check in.
Where: Hurricane Electric, 760 Mission Court Fremont, CA 94539
Phone: (510) 580-4141

The cost to attend this seminar is $199. Existing Hurricane Electric Customers will receive a 50% discount. Those who attend are eligible for one free month of colocation at Hurricane Electric, and will receive a free copy of Mike Clark’s new book, Pragmatic Project Automation.

Registration by phone or at Hurricane Electric.

Towards Bug-Free Code

12.29.2004 · Posted in Links

If we make good use of some of the basic idioms and rules of thumb of design and programming, we can take a step closer towards software with fewer bugs. [..] In this article, you will learn how to design and develop your projects using some of the features of Java 1.5 that will result in fewer bugs and facilitate easy testing.

Author: Ashwin Jayaprakash
Published: ONJava, December 22, 2004

What’s wrong with this test code?; Plano talk on TDD; Handwritten mocks…

12.23.2004 · Posted in Blogosphere

Sara Ford starts a "what’s wrong with this test case code" series. She begins with Identifying false positives. She also shows why it’s better to LogPass than to LogFailure.

Scott Dockendorf blogs a follow-up to the Q&A session after his talk on Test Driven Development & .NET at the Plano .NET User Group, and also posts the slides and source code he used during the talk.

Len Holgate explains Why you’re missing the point if you use a framework to generate Mock Objects for you: "TDD is all about the design. By writing a test before you write production code you think about the interface that clients of the production code will need to use. You’re working as a client programmer and the tests will drive the design towards something that’s nice to use from a client perspective. This is a Good Thing. In fact it’s The Point!"

James Robertson attends the second meeting of the reorganized Maryland Agile/XP group and [url=http://www.cincomsmalltalk.com/blog/blogView?showComments=true&entry=3280602395]shares his impressions[/url] on the [url=http://www.testdriven.com/search.php?query=fitnesse&action=results]FitNesse[/url] demo.

JB Evain explains [url=http://blogs.dotnetguru.org/jbevain/index.php?title=type_6_ioc_weaving_the_dependency&more=1&c=1&tb=1&pb=1]Type 6 IoC[/url] with a MockSystem example.

While adding unit testing to an existing system, Brian Oxley runs into a problem and solves it with delegation: "We’re following the ancient dictum, any problem can be solved by introducing an extra level of indirection. Foo was already delegating doSomething() to Trouble; we just replaced that relationship with an extra level of delegation, Foo to NoTrouble to Trouble. Now I can mock or stub NoTrouble without needing access to Trouble."

Mike Hodnick finds Agile development for real and is thrilled: "I’m surprised that Agile Development hasn’t caught on more quickly in organizations. After finally being able to work on a project while practicing Agile Development, it feels so natural."

The Wikipedia has an entry on TDD.

The Team Foundation blog

12.23.2004 · Posted in Links

For those who are unfamiliar with the Foundation, it is the server-based part of Team System that ties together many of the various pieces of the software development lifecycle. It provides a suite of source control, work item tracking, Excel and Project integration, reporting, project portal, and build automation functionality for seamless and effective management of a team-driven development project.

Although there are a number of online resources about Team System, few focus solely on Team Foundation. Moreover, there are bits and pieces of information on the web about the Foundation, but few are organized in a central, cohesive manner. This is where this blog comes in.


Integrating Agile Development in the Real World

12.20.2004 · Posted in Links

Integrating Agile Development in the Real WorldHave your software projects been suffering from the age-old development problems of slipped schedules and ballooning budgets? Has your development organization experienced a variety of failed and canceled projects? If so, you may benefit from infusing some agility into your development process.

Agile development breaks with a 40-year tradition of applying ever more structure and formalization to the design and development of software by advocating a return to the basic principles of satisfied customers, working software, and the willingness to accept and respond to change.

As the popularity of agile development has grown, IT professionals have begun to struggle with ways to integrate agile practices and processes into traditional project environments. Integrating Agile Development in the Real World provides programmers and managers with specific and implementable ways to use agile processes in everyday software development projects.

Whether read cover-to-cover, or used as a field guide during an agile transition, this book provides valuable insight into how agile practices and processes may be applied in almost any environment. Everything from how to deliver a working system sooner, acknowledge and respond to change, better meet the needs of the project’s customer, to increasing software quality, and fostering a more communicative and collaborative team culture are thoroughly covered.

Auhor: Peter Schuh
Published: Charles River Media, December 2, 2004
Sample: Chapter 1: Agile Development Primer (PDF)

See also: Peter’s article Seven Simple Ways to Add a Little Agile without Going to Extremes


Write Eclipse JUnit Tests in Jython

12.20.2004 · Posted in Links

Eclipse integrates the JUnit framework to enable seamless test integration in Java, and Python is a great language for writing tests. Learn how to write Eclipse JUnit tests in Jython (Python for Java).

Author: Laurent Ploix (blog)
Published: DevX, December 14, 2004
See also: Addendum

eXtreme .NET: Introducing eXtreme Programming Techniques to .NET Developers

12.18.2004 · Posted in Links

eXtreme .NET: Introducing eXtreme Programming Techniques to .NET DeveloperseXtreme .NET shows developers and team leaders how to incorporate eXtreme programming (XP) practices with .NET-connected technologies to create high quality, low-cost code that will build better software. This practical, realistic guidebook systematically covers key elements of XP methodology in the specific context of the .NET Framework, Visual Studio .NET, Microsoft Visual C#, and related Microsoft .NET-enabled applications.

Leading .NET and XP mentor Dr. Neil Roodyn covers planning, task definition, test-driven development, user interfaces, refactoring, spiking, pair programming, and much more. Dr Neil offers field-proven advice for everything from automating builds to integrating third-party libraries. He also incorporates valuable exercises and presents a start-to-finish case study that shows exactly how XP and Microsoft .NET interoperate throughout an entire development project. Coverage includes:

– Where to start if you’ve never used XP or other Agile methods before
– Pair programming: turning .NET programming into a collaborative game
– Test-Driven Development: Making sure your .NET code works as intended, while it’s easiest to fix
– Refactoring: Organizing your .NET code to improve flexibility and enable changes more readily
– Continuous integration and automated build/test: enhancing quality in distributed, component-based systems
– Spiking: using rapid experimentation to validate your expectations about behavior in the .NET Framework
– The importance of customer input to successful projects
– How to test .NET user interfaces and third-party libraries

The Microsoft .NET Framework is today’s most productive development platform. XP represents a fundamental breakthrough in building higher-value software. Combine them: transform your team into an eXtreme .NET team that can accomplish more than ever before. This book will show you how — starting with your very next project.

Author: Dr. Neil Roodyn (blog)
Published: Addison-Wesley Professional, December 10, 2004


TDD Tools Advisory, December 1-15, 2004

12.16.2004 · Posted in Advisories

The following tools were recently updated:

Clover 1.3.3
Codus 1.0b2
E-tester 2.2.3
IeUnit 1.4.1
Jester 1.3.6
Jetif 1.2.1
LuntBuild 1.1.1
MockObject r1.0.9
NUnit 2.2.2
SnapDAL .90-prerelease
TestGen 0.08

Also: Antifact, DotNetFunk, SimpleCTest, SuluClover 1.3.3
Clover is a Java code coverage analysis tool. It discovers sections of code that are not being adequately exercised by your unit tests. Clover reports its findings in multiple formats for easy use by the whole team at the project level down to each line of source code.

Codus 1.0b2
Codus is a comprehensive code generation tool for object-relational mapping. It takes an existing database and automatically generates all of the code for updating, deleting, inserting and selecting records. In addition, it creates web services for distributed programming, strongly-typed collections, and a full set of NUnit tests.

E-tester 2.2.3
E-Tester is a unit-testing framework for Eiffel. It consists of three clusters, which, when added to your system, will allow for easy development of test suites. In the E-Tester Links section of this page you can refer to the E-Tester Getting Started Guide and the E-Tester Developer Reference. E-Tester has only been tested under ISE Eiffel. A port to SmartEiffel is coming soon.

IeUnit 1.4.1
IeUnit is a simple framework to test logical behaviors of web pages. It helps users to create, organize and execute functional unit tests. IeUnit is implemented in JavaScript for the Windows XP platform with Internet Explorer.

Jester 1.3.6
Jester finds code that is not covered by tests. Jester makes some change to your Java code, runs your tests, and if the tests pass Jester displays a message saying what it changed. Jester includes a script for generating web pages that show the changes made that did not cause the tests to fail.

Jetif 1.2.1
Jetif is a unit-testing framework for Java. It separates the testing data from the test code, records the test result to a text file or database, and logs some message to a simple text log file.

LuntBuild 1.1.1
A daily build tool based on Apache Ant. It performs build automation and management totally from a clean web interface.

MockObject r1.0.9
This is a very small library but powerful enough to create most of your Java Mock Objects for you. The ones it can’t create, you can leverage the library to create.

NUnit 2.2.2
NUnit is a unit-testing framework for all .Net languages. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection-related capabilities. NUnit brings xUnit to all .NET languages.

SnapDAL .90-prerelease
SnapDAL is a data access layer (DAL) for your .net code. It is designed to make programming against databases and other sources of data easier, with less code, and higher reliability than you could do on your own without lots of discipline. SnapDAL is built with the idea of helping you write testable data access code by support Mock Objects natively as a first class development tool.

TestGen 0.08
Python based framework for generating and running unit and integration tests. The framework supports unit testing of C, C++, and Python and integration testing of Python.

Newly registered projects:

Antifact is a project dependency management and continuous integration tool using ant.

DotNetFunk is a collection of Fit test fixtures designed for use with FitNesse that facilitate automated acceptance testing for Internet Explorer and Windows Form applications.

SimpleCTest, a very simple but effective testing framework for C and C++ projects.

Sulu is a component-based programming language whose main data movement operator is *swapping* (instead of assignment). The goal of this language is to have all components written in this language to have test-cases generated automatically.

SnapDAL: data access layer for .NET code

12.16.2004 · Posted in Links

SnapDAL is a data access layer (DAL) for your .net code. It is designed to make programming against databases and other sources of data easier, with less code, and higher reliability than you could do on your own without lots of discipline.

SnapDAL is built with the idea of helping you write testable data access code by support Mock Objects natively as a first class development tool.

Test-Driven Development in Python

12.16.2004 · Posted in Links

Test-driven development is not about testing. Test-driven development is about development (and design), specifically improving the quality and design of code. The resulting unit tests are just an extremely useful by-product.

That’s all I’m going to tell you about test-driven development. The rest of this article will show you how it works. Come work on a project with me; we’ll build a very simple tool together. I’ll make mistakes, fix them, and change designs in response to what the tests tell me. Along the way, we’ll throw in a few refactorings, design patterns, and object-oriented design principles.

To make this project fun, we’ll do it in Python.

Author: Jason Diamond
Published: OnLamp, December 2, 2004

TestRun: Lightweight UI Test Automation with .NET

12.15.2004 · Posted in Links

This article describes a dummy application and explains how to launch the application’s form from the test automation program using reflection and the System.Windows.Forms.Application class. It then shows how to simulate user actions and check application state using methods in the System.Reflection namespace, and describes how to extend and modify the test system to meet your own needs.

These same techniques can be incorporated into unit testing harnesses and are relevant even if you’re using an existing framework like NUnit.

Author: James McCaffrey
Published: MSDN Magazine, January 2005

Kent Beck on Accountability, Developer Testing at Google & Developer Testing Panel [Online video]

12.13.2004 · Posted in Links

These videos cover the entirety of the SDForum Developer Testing Webcast held November 17, 2004.


Kent Beck: Accountability and Developer Testing
– Introduction to Software Health
– Why Start with Developer Testing?
– Accountability
– Q&A

Sriram Sankar: Developer Testing at Google
– Introduction
– The Google Environment
– XP at Google
– Other Quality Initiatives at Google
– Q&A

Expert Panel: Making Developer Testing Work
With Russell Gold, Oracle; Rob Mee, Pivotal; Sri Muthu, Wells Fargo; David Vydra, Testdriven.com
– Introductions
– The Myths
– Audience Questions
– More Audience Questions

Apache Gump: Continuous Integration Tool

12.13.2004 · Posted in Links

Gump is Apache’s continuous integration tool. It is written in python and fully supports Apache Ant, Apache Maven and other build tools. Gump is unique in that it builds and compiles software against the latest development versions of those projects. This allows gump to detect potentially incompatible changes to that software just a few hours after those changes are checked into the version control system. Notifications are sent to the project team as soon as such a change is detected, referencing more detailed reports available online.

The case for unit testing; Mock databases?; Single-day software development…

12.13.2004 · Posted in Blogosphere

Bruce Johnson makes The Case for Unit Testing: "The developers know that when a modified class passes the unit tests, it is much less likely to introduce further bugs. So, rather than thinking them a waste of time, the good developers I know relish the idea of creating unit tests. Perhaps this is one of the characteristics that the rest of us would do well to emulate."

Roy Osherove changes his mind and now thinks Mock Objects are wrong for database testing; whereas Steve Eichert likes how mocked databases help him get into a TDD zone. (see also David Intersimone’s entry on taking unit testing and code stubbing to the extreme and Andrew Newman’s post RDF, the ultimate Agile database)

As part of the Worldwide Cincom Smalltalk User Conference, James Robertson reports on a talk by Vassili Bykov and Joseph Pelrine: "What would you do differently, if your customer could only pay you for one day of software development? Especially if, by doing something different, he would be able to afford yet another day of software development? What would become important, and what would become less important?" Read [url=http://www.cincomsmalltalk.com/blog/blogView?showComments=true&entry=3279948738]XP in Cincon Smalltalk[/url].

Willem van den Ende wonders where XP fits in the Cynefin domains model.

Trey Hutcheson announces that "the biggest feature for the next version of CFNUnitBridge is going to be the ability to execute tests on the device/emulator remotely from the desktop". He then analyzes this problem from a technical perspective, and outlines some possible solutions.

Colin Bird reports on the first part and Howard van Rooijen shares his slides on the second part of a presentation on The Value of Agile Methods at a recent Microsoft Architecture Forum.

Kevin Lawrence follows up on a [url=http://www.testdriven.com/modules/newbb/viewtopic.php?topic_id=1520&forum=6]recent group discussion[/url] centered around the relative merits of TDD versus Design by Contract.

Thanks to Brian Button’s step-by-step Dives into TDD, Brian T. Likes now gets TDD and explains what made it click.

Michael Mahemoff is starting RiffCasts, with the first installment on Agile Software Development and Interfaces as Services (MP3 format), and is asking for feedback.

Phillip J. Eby is mocking wxPython.