testdriven.com Wrangling quality out of chaos

Archive for April, 2004

PMD: Java code analyzer

04.29.2004 · Posted in Links

PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, unused private methods, etc., by checking source code against rules to produce a report.

TestNG: unit-test framework for Java

04.29.2004 · Posted in Links

TestNG is a unit-testing tool for Java, which combines several features of JUnit and NUnit to provide added functionality:
– JSR 175 Annotations
– Flexible test configuration
– Default JDK functions for runtime and logging (no dependencies)
– Powerful execution model (no more TestSuite)

Ant 1.6.2 to feature fork of a single Java VM for JUnit tasks

04.29.2004 · Posted in News

In order to address the issue voiced recently by several test-driven developers, Stefan Bodewig has just commited a change to Ant that will provide a new fork mode to launch a single Java Virtual Machine for the execution of all test classes in a JUnit task, speeding up the execution of large test suites.

No date has yet been set for this release.While test isolation recommends forking of a separate Virtual Machine, this mode can sometimes become expensive and slow. With the new "once" fork mode (<junit fork="true" forkmode="once"/>), Ant will make it possible to run specific JUnit tasks under a single VM.

Read Stefan’s blog entry and Kudo to Anton.
View the Enhancement request which prompted the update.
Visit Apache Ant.

TestNG aims to provide more flexibility to Java unit testing

04.29.2004 · Posted in Java

Cédric Beust has announced the release of a unit-testing tool for Java, TestNG (Testing, the Next Generation), which combines several features of JUnit and NUnit to provide added functionality:

<ul><li>JSR 175 Annotations</li>
<li>Flexible test configuration</li>
<li>Default JDK functions for runtime and logging (no dependencies)</li>
<li>Powerful execution model (no more TestSuite)</li></ul>Cédric writes: "I have always been confused by JUnit’s Test Suites. Where should the method belong? In the test class? Separately? Should it be static? And if I want to change the tests run, why do I need to rebuild my code? With these changes in mind, I came up with the design principles that are the foundation of TestNG."

Read TestNG’s documentation and download page.
Also take a peek at Robert Watkins’ take on JUnit and TestNG.

JUnit in Action

04.29.2004 · Posted in Links

JUnit in ActionA guide to unit testing Java applications (including J2EE applications) using the JUnit framework and its extensions, this book provides techniques for solving real-world problems such as unit testing legacy applications, writing real tests for real objects, automating tests, testing in isolation, and unit testing J2EE and database applications.

Using a sample-driven approach, various unit testing strategies are covered, such as how to unit test EJBs, database applications, and how to unit test JSPs, and Taglibs.

Also addressed are testing strategies using freely available open source frameworks and tools, and how to unit test in isolation with Mock Objects.

Testing J2EE applications by running tests from inside the container for performing integration unit tests is discussed, as is how to automate unit testing in automated builds (such as Ant and Maven) for performing continuous integration.

Authors: Vincent Massol, Ted Husted
Published: October, 2003
Further details about this book may be obtained from Amazon.

The authors:
Vincent Massol is the creator of the Jakarta Cactus framework and an active member of the Maven, Gump, Struts, and MockObjects development teams. He is the cofounder and CTO of Pivolis, a company that specializes in applying agile methodologies to offshore software development.
Ted Husted is an active member of the Struts development team and the manager of the JGuru Struts Forum. His most recent development project uses test-driven design throughout and is available as open source. He is the author of Struts in Action. He lives in Fairport, New York.


The Web Testing Handbook

04.29.2004 · Posted in Links

The Web Testing HandbookThis book seeks to help developers and testers who are making the transition from testing traditional client/server, PC, and/or mainframe systems to testing rapidly changing Web sites and applications. This book explains the technologies that are typically used to build these Web sites/applications and suggests specific test cases and techniques that can be included in a Web site’s test plans.

Author: Steven Splaine and Stefan P. Jaskiel
Published: STQE Publishing, 2001

Book Description
The book provides test-plan strategies, each plan focusing on a single aspect of the Web site under test (WUT), e.g., usability, compatibility, performance, etc. The book illustrates the benefits of having these multiple test plans, and provides strategies for implementing them. Checklists appear at the end of each section, which can be used as a set of candidate test cases for each test plan.

About the Authors
Steve Splaine is a chartered software engineer with more than twenty years’ experience in developing software systems: Web/Internet, Client/Server, Mainframe, and PCs. He is an experienced project manager, tester, developer, and presenter, who has consulted with more than one hundred companies in North America and Europe. In addition, he is a regular speaker at software testing conferences, lead author of The Web Testing Handbook and an advisor/consultant to several Web testing tool vendors and investors.

Stefan Jaskiel is co-author of The Web Testing Handbook, a comprehensive resource for testing Web sites and Internet-based applications. Most recently, Stefan has teamed up with Rick Craig, a leading expert in software testing, to develop The Systematic Software Testing Handbook.


Systematic Software Testing

04.29.2004 · Posted in Links

Systematic Software TestingSystematic Software Testing delivers a flexible, risk-based process that improves your software testing capabilities and helps you do just that. Whether your organization already has a well-defined testing process, or it’s faltering with almost no process, Systematic Software Testing provides unique insights into better ways to test your software.

Author: Rick Craig and Stefan P. Jaskiel
Published: Artech House, 2002

Book Description
Learn to use a preventive method of testing that parallels the software development lifecycle, and subsequently how to create and use test plans, design, and metrics. Detailed instructions help you decide what to test, how to prioritize, and when testing is complete. You’ll even learn to conduct risk analysis and measure test effectiveness to maximize the efficiency of your testing efforts.

And because organizational structure, the right people, and management are primary keys to better software testing, Systematic Software Testing helps you shape your organization to better respond to the dynamics of software testing.

A Comprehensive Reference for Developers, Testers, and Test Managers

– Learn how testing fits into the bigger software development picture

– Get a cradle-to-grave perspective on testing that parallels the software development lifecycle

– Gain an understanding of what constitutes good testing practices and processes

– Learn the principles of leadership and how to apply them to managing testing teams

– Develop a tailor-made testing process that fits your organization’s unique structure based on the authors’ 25 years of experience

About the Authors
Rick D. Craig, an experienced test manager and consultant at Software Quality Engineering, has spoken at testing conferences every year since 1985. Rick has helped hundreds of companies throughout Europe, Asia, Australia, and the Americas improve their testing practices. Rick is the former American editor of Software Quality Management magazine, an active member of Mensa of America, and a Colonel in the United States Marine Corps Reserve. He is a technical editor for StickyMinds.com, a community Web site for software testing and quality engineering managers and professionals.

Stefan P. Jaskiel is an information manager experienced in the development of technical documentation. He has developed a wide variety of reference manuals, online help systems, and multimedia CD-ROMs for hardware and software applications in client/server, Web, and PC environments. Stefan has led the design and development of systems/processes for managing and disseminating technical information and he is also co-author of a recently published book, The Web Testing Handbook.


Test Infected Robot Programming with Karel J. Robot

04.26.2004 · Posted in Links

A virtual transcript of two students, Lisa and Tony, working together at one computer to develop a StairClimber robot similar to the one in Chapter three of the book [url=http://csis.pace.edu/%7Ebergin/KarelJava2ed/Karel%2B%2BJavaEdition.html]Karel J. Robot: A Gentle Introduction to the Art of Object-Oriented Programming in Java[/url]. At any given time, one of the pair is "driving" and has control of the keyboard and mouse, and the other is "navigating" and is making suggestions and watching for errors while implementing the Robot test-first.

GSBase: collection of classes to help write JUnit test cases

04.26.2004 · Posted in Links

GSBase provides several test suites to complement JUnit:

– RecursiveTestSuite recursively walks through a directory structure looking for subclasses of TestCase to be added automatically.
OrderedTestSuite is for those situations where you want to specify the your tests’ running order.
– EventCatcher registers itself for any events that might be fired by any given bean.
– EqualsTester is used to test the equals contract on objects, to ensure that the equals() and hashCode() methods have been implemented correctly.

Unit Testing with OCUnit

04.24.2004 · Posted in Links

Are you sure your code works — all of it? If you make a change in one place, are you sure you haven’t broken something else? When you fix a bug, how do you know that it stays fixed?

Testing frameworks helps you make sure. They provide a way to write and run unit tests consisting of test cases: groups of small tests that exercise a particular class or feature. For example, one test case may exercise a Checkbook class, making sure that it adds and deletes entries properly and returns the correct account balance value. Another test case may exercise a CheckbookEntry class, making sure that it accepts and returns the monetary amount you give it.

Author: Jim Menard
Published: MacDevCenter, April 23, 2004
(OCUnit is a unit-testing framework for Objective-C)


Test Driven Development hands-on Tutorial to be held May 13 in Richmond, VA

04.23.2004 · Posted in Events

On Thursday, May 13, at 6:30 PM the WeProgram.NET – Richmond user group will offer a tutorial entitled:

Test Driven Development: Building .NET Muscle!

Steve Metsker and Darrell Norton will present this hands-on introduction to TDD, at the CapTech lab. The lab is located at [url=http://maps.yahoo.com/maps_result?ed=bE8z5ep_0Trgk3CQC1bz9iCSJouuJKoLF4A-&csz=Richmond,+VA&country=us&new=1&name=Work&qty=]1118 West Main Street, Richmond, VA 23220[/url]. TDD has you develop automated tests before you write the code to make the tests pass. This helps to create light, simple solutions and guarantees that a testing framework accompanies your code. This style feels different from classical coding techniques, and this tutorial will let you try it yourself! Please bring a laptop with a development environment ready to go, if you can. We’ll provide starting examples in both C# and VB.NET. If you don’t have a laptop, we’ll pair you with someone who does.

In addition to the presentation, WeProgram.NET will provide refreshments and give away a number of prizes, including Kent Beck’s Test Driven Development book and Jim Newkirk’s Test Driven Development in .NET book. Please plan to attend!

Presenter bios:
Steve Metsker is the author of three books, including the soon-to-be-released Design Patterns in C#, and speaks frequently on programming and agile techniques. Steve’s Test-Driven Development tutorial was one of the highest-rated tutorials at OOPSLA 2003, and he will present this again at OOPSLA 2004. Steve is a Senior Architect at CapTech Ventures.

Darrell Norton, co-founder of the WeProgram.NET user group, has worked with Microsoft .NET since its beginning as part of the early adopter program. Darrell has been doing Test-Driven Development for over 2 years and is a Consultant at CapTech Ventures.

Pragmatic Testing in C# with NUnit hits the shelves

04.23.2004 · Posted in Books

Pragmatic Testing in C# with NUnit, by Andy Hunt and Dave Thomas, which has been available as a PDF for a while, is now available for purchase.

Andy is happy to note that it’s the only book to cover the new NUnit 2.2 features, thanks to a close collaboration with Charlie Poole (NUnit development team).Book description, from The Pragmatic Programmers:

"Pragmatic programmers use feedback to drive their development and personal processes. The most valuable feedback you can get while coding comes from unit testing.

Without good tests in place, coding can become a frustrating game of ‘whack-a-mole.’ That’s the carnival game where the player strikes at a mechanical mole; it retreats and another mole pops up on the opposite side of the field. The moles pop up and down so fast that you end up flailing your mallet helplessly as the moles continue to pop up where you least expect them.

You don’t test a bridge by driving a single car over it right down the middle lane on a clear, calm day. Yet many programmers approach testing that same way — one pass right down the middle and they call it ‘tested.’ Pragmatic programmers can do better than that!

Real unit testing will make your life easier. It will make your designs better and drastically reduce the amount of time you spend debugging."

Read [url=http://www.toolshed.com/blog/News/CSharpPrinted.html,v]Andy Hunt’s blog entry on the book[/url].
Purchase a copy.

Extreme Perl: an evolving book about eXtreme Programming with Perl

04.22.2004 · Posted in Links

This book invites Perl programmers and their customers to take a fresh look at software development. Customers, and business people in general, will learn how XP enables customer-programmer communication for efficient and flexible requirements gathering. Programmers will see how XP’s focus on teamwork, incremental testing, and continuous design allows them to take pride in their craft. The numerous examples demonstrate Extreme Perl in action, including the development of a complete, end-to-end application in the last chapter.

The entire book is available online (HTML format).

Author: Robert Nagler
(Link obtained via Italian Agile Movement)


XWork: Generic command pattern implementation

04.21.2004 · Posted in Links

Xwork is a generic command pattern implementation with no dependencies on web specific libraries. Xwork adds powerful features to command processing including interceptors, the OGNL expression language, an IoC (Inversion of Control) container, flexible type conversion, and a powerful validation framework.

With XWork, the OpenSymphony team went back to the drawing board to create a powerful generic command pattern implementation which makes unit testing and code reuse much simpler.

What is Pattern Testing?

04.21.2004 · Posted in Links

Vincent Massol writes: "Pattern Testing is the concept of automatically verifying the good application of architectural/design patterns in code. It uses AOP to perform this feat."


Continuous Testing Plugin for Eclipse

04.20.2004 · Posted in Links

Continuous testing uses excess cycles on a developer’s workstation to continuously run regression tests in the background, providing rapid feedback about test failures as source code is edited. It reduces the time and energy required to keep code well-tested, and prevents regression errors from persisting uncaught for long periods of time.

Continuous testing builds on the automated developer support in Eclipse to make it even easier to keep your Java code well-tested, if you have a JUnit test suite. With continuous testing enabled, as you edit your code, Eclipse runs your tests quietly in the background, and notifies you if any of them fail or cause errors. It is most useful in situations where you would already have a test suite while you are changing code: when performing maintenance, refactoring, or using test-first development.

actiWATE – free Web Application Testing Environment

04.20.2004 · Posted in News

Actimind, Inc. recently launched an "Open Mind in Action" campaign.

By the end of next month, the company will deliver a free version of actiWATE, a Java-based Web Application Testing Environment, aimed to make the test automation process easier and more cost-effective.

The company is looking for feedback from all interested users and organizations to tailor the product to your needs. In fact, this product will likely have the features you need, because it will be evolving in response to your requests and opinions.You can get more information about the product at http://www.actiwate.com/.

If you wish to participate, please register for a free copy.

Continuous Performance Testing With JUnitPerf

04.20.2004 · Posted in Links

Performance tuning software is like a wicked game of Twister. You end up using arms and legs to keep the performance knobs in perfect harmony. And just when you think you’ve got it all under control, tweaking code or changing the runtime environment can send performance into a death spiral. In this article we’ll learn how to tune with more confidence and less stress by writing automated performance tests that tell no lies.

Author: Mike Clark
Published: JavaPro News, July 21, 2003

Agile Development Conference 2004 sessions on TDD

04.19.2004 · Posted in Events

The Agile Development Conference, to be held June 22-26 in Salt Lake City, Utah, is an open forum welcoming all agile methodologies, new and old, with sessions for all roles including executives, managers, programmers and testers. The Agile Development Conference has earned a reputation as the place to go for balanced and up-to-the-minute information on the agile end of the industry by remaining true to its original vision:

1. Create an open community for exploration of all agile methods
2. Share experiences and research across disciplines
3. Welcome new members to the world of Agile Development
4. Consolidate data about Agile Development to aid research and implementation

Needless to say, many sessions will address Test-Driven Development:Top-Down TDD using Mock Objects and Inversion of Control
Tutorial with Manish Shah & Damian Guy (ThoughtWorks)

Exploratory Testing for Agile Projects
Tutorial with Elisabeth Hendrickson (Quality Tree Software, Inc.) & Brian Marick (Testing Foundations)

Domain-driven design
Tutorial with Eric Evans (Domain Language)

Inside Feature-Driven Development
Tutorial with Jeff De Luca (Nebulon Pty. Ltd.)

The Crystal Methods, or How to Make a Methodology Fit
Tutorial with Alistair Cockburn (Humans and Technology)

Advanced Fit Lab
Tutorial with Rick Mugridge (Rimu Software/University of Auckland)

Foundations for Agile Development by Steve Berczuk
Writing Automated Customer Acceptance Tests by John Brewer (Jera Design)
Defining Agile Testing Practices, Rules, and Patterns by Janet Gregory, (Wireless-Matrix Corporation) & Lisa Crispin (Fast401k Inc.)
Agile Development with Domain-Specific Languages by Alan Wills (Microsoft)
Developing an Agile-friendly software testing curriculum by Jeremy Brown (Utah State University) and Kay Johansen (Zions Bancorporation)

There will also be formal research presentations on the adoption of Agile techniques.

Visit the Agile Development Conference 2004 Registration page, Full schedule, Contact page.

ADC 2004 also has volunteering opportunities for full-time students.

Test-Driven Development and Teaching to Test

04.19.2004 · Posted in Links

William C. Wake writes: "Test-Driven Development is a style that says ‘write a test for a small bit of functionality, write code to make it pass, refactor, and repeat.’ In a way, the ‘test’ part of the name is misleading. TDD does produce tests in the sense that they are written to verify whether something works, that an expected answer is defined in advance, and so on. But they’re not tests in the way a tester would seek – they’re written for the programmer’s purposes. That they are mostly somewhat useful as tests is in a sense a happy side effect."


Test Web applications with HttpUnit

04.19.2004 · Posted in Links

Many expensive and free tools are available for creating automated test scripts for Web applications. These tools can capture the way the testers interact with the browser and play it back in a configurable and sometimes programmable manner. However if you’re a programmer who just got the job to create functional unit tests, you’ll find HttpUnit a much more enjoyable and programmer-friendly toolkit. Plus, you can potentially save thousands of dollars.

Author: Balazs Fejes
Published: Javaworld, April 19, 2004

Unit tests should play nice

04.19.2004 · Posted in Links

Simon Harris writes: "I’ve seen a few blog entries around of late demonstrating nifty things you can do to achieve setup/cleanup in your unit tests using statics or classloaders etc. And whilst I admire the creativity and ingenuity, I have to say that just like testing private methods, to me it smells."


Control your test environment with DbUnit and Anthill

04.19.2004 · Posted in Links

The inception of the Extreme Programming methodology has brought test-driven development and continuous integration into mainstream Java development practices. Applying these techniques to Java server-side development can quickly become a nightmare if you don’t have the right tools. In this article, software developer Philippe Girolami describes how to deal with continuous integration and how to use DbUnit in conjunction with JUnit to control the test environment end-to-end by setting up the state of the database before each test.

Author: Philippe Girolami
Published: IBM DeveloperWorks, 13 Apr 2004
(via Artima.com)