testdriven.com Wrangling quality out of chaos

Archive for November, 2006

TDD Anti-Patterns, Two hours can waste two weeks, The Boss

11.29.2006 · Posted in Blogosphere

James Carr has started a community-driven list of TDD Anti-Patterns: "Recently I began to write a paper on TDD Anti-Patterns, and decided to first quickly jot down some of the most common ones that others or myself have encountered ‘in the wild.’ I then posted what I had on the testdrivendevelopment on yahoogroups mailing list, and got an excellent bit of feedback! As a side note, keep in mind this is merely a catalog at the moment, hopefully to be expanded in full down the road."

"Your developers have just planned a two week iteration. The next day Sarah continues her work on the completion of an important New Project. And here it comes: Urgent Stuff…" (How Two Hours Can Waste Two Weeks, Mishkin Berteig)

[url=http://www.eweek.com/article2/0,1759,2052258,00.asp?kc=EWRSS03129TX1K0000612]The Boss Wants Us All to Get Agile[/url]: "Is it good news or bad news when nontechnical management gets enthused about a software development meme such as agile development methods?" (Peter Coffee)soapUI – soapUI 1.6: "soapUI 1.6 final introduces a large number of fixes and many minor improvements which have been accumulated during the snapshot releases during the last months."

There is now Unit Testing for the .Net Compact Framework.

If you’ve ever wondered about Agile Game Development, Noel Llopis has a few links.

"Neither unit tests nor functional tests are enough, I propose other test layers and I explain how to set them up to enhance the software development process." (Create test layers for developers’ efficiency, Laurent Ploix)

Debasis Pradhan lists the Pros and cons of Black Box and White Box Testing.

Dave Nicolette continues his walkthrough on the hard value of agile: "During weeks 9-12 the traditional team is in the Design Phase of the waterfall. After a quick review of the requirements document, the customer signs off the requirements document, which then becomes the contract for software development." (agile software development). Dave has also made nice posts on introducing software developers to TDD on the job, talking to project managers about agile development, and, uh, dancing with trolls. Materials from Dave’s presentation at XP Days Germany are here.

If you’re in Paris december 5th, Valtech will hold a free seminar on agility, themed: Méthodes Agiles, Adoption à l’échelle d’une organisation.

Designing JUnit test cases: Effective functional testing

11.29.2006 · Posted in Links

Functional testing, or integration testing, is concerned with the entire system, not just small pieces (or units) of code. It involves taking features that have been tested independently, combining them into components, and verifying if they work together as expected. For Java, this testing is typically performed using the JUnit framework.

Author: Nada daVeiga
Published: November 24, 2006

Setting up NetBeans-based projects with a Continuous Integration server

11.29.2006 · Posted in Links

Continuous Integration (CI) servers are facilities able to monitor changes in a source repository (e.g. CVS or Subversion) and schedule a new build automatically, in order to verify if the new committed code broke the stability of the system. They are installed on remote servers and usually don’t run on programmers’ computers – so apparently a problem arises if we’re thinking of projects developed with the NetBeans IDE.

As most CI products can be easily configured by just pointing them to a build.xml ant script, the problem just translates to being able to setup a working "headless" environment for a NetBeans-based project – with "headless" I mean that the environment must be configurable by only using a text-based remote connection (e.g. ssh), and not a graphical console (e.g. X11).

I’ve been recently able to setup some projects of mine by using Hudson, a simple but effective CI product that is getting increasing attention by users.

Author: Fabrizio Guidici
Published: java.net, November 17, 2006

Refactoring in a BPEL Module Project Using NetBeans Enterprise Pack

11.29.2006 · Posted in Links

This tutorial explores refactoring in NetBeans Enterprise Pack. The NetBeans IDE with NetBeans Enterprise Pack supports XML schema, Business Process Execution Language (BPEL), and Web Service Description Language (WSDL) source file refactoring. You can use refactoring to rename and safely delete local and global components. The IDE will ensure that a rename or safe delete action is propagated throughout the project tree. This means that you will not have to change the references manually. Refactoring reduces the complexity of making changes to XML schema and WSDL files and reduces unnecessary repetition. The IDE’s refactoring features show you the parts of your project that are affected and makes all necessary changes to your code. In this tutorial, you will review refactoring functionality in a BPEL Module project.

Published: NetBeans.org, October 23, 2006

dbDeploy: Database change management tool

11.29.2006 · Posted in Links

dbdeploy is a Database Change Management tool. It helps developers and DBAs change their database in a simple, controlled, flexible and frequent manner.

The recurring problem with database development is that at some point you’ll need to upgrade an existing database and preserve its content. In development environments it’s often possible (even desirable) to blow away the database and rebuild from scratch as often as the code is rebuilt but this approach cannot be taken forward into more controlled environments such as QA, UAT and Production.

Drawing from our experiences, we’ve found that one of the easiest ways to allow people to change the database is by using version-controlled SQL delta scripts. We’ve also found it beneficial to ensure that the scripts used to build development environments are the exact same used in QA, UAT and production. Maintaining and making use of these deltas can quickly become a significant overhead – dbdeploy aims to address this.

Unit test Struts applications with mock objects and AOP

11.29.2006 · Posted in Links

Integrating two popular test frameworks, StrutsTestCase and EasyMock, to unit-test Struts applications leads to easier test setups and faster test runs. However, these two frameworks leave a gap that prevents an ideal integration. In this article, I examine both an object-oriented solution and an aspect-oriented solution to this problem. The comparison also demonstrates how aspect-oriented programming (AOP) complements object-oriented programming (OOP) by simplifying the solution to a seemingly difficult problem.

Author: Walter Jia
Published: JavaWorld, November 09, 2006

The Power of Tests

11.29.2006 · Posted in Links

Just recently, a developer I respect very much was caught uttering the this surprising statement: “Unit tests just really aren’t my thing.” Now, I still respect this developer very much and I can tell you that the person single-handedly created one of my very favorite pieces of software. However, I do think the developer is dead wrong on this point and this is my attempt to change the mind of everyone that thinks similar things about unit testing.

(With Ruby examples)

Author: James Gray
Published: date unknown

Remove the smell from your build scripts

11.29.2006 · Posted in Links

How much time do you spend maintaining project build scripts? Probably much more than you’d expect or would like to admit. It doesn’t have to be such a painful experience. Development automation expert Paul Duvall uses this installment of Automation for the people to demonstrate how to improve a number of common build practices that prevent teams from creating consistent, repeatable, and maintainable builds.

Author: Paul Duvall
Published: IBM developerWorks, October 10, 2006

Using mock objects for complex unit tests

11.29.2006 · Posted in Links

Programmers today recognize, more than ever, their responsibility for producing well-written unit tests. Whether a developer uses test-driven development (TDD) or creates unit tests after writing the code, the evidence is clear that unit tests help produce high-quality, bug-free code.

Even though developers know that testing helps, we still see a reluctance by programmers to test all their code. They offer reasons ranging from lack of time, to ineffective tools, to problems writing tests with many dependent objects.

I’d like to look at unit testing and address these issues. Specifically, I want to offer some tips on how easy it can be to write unit tests with mock objects.

Author: Gary Pollice
Published: IBM developerWorks, October 16, 2006

FindBugs: Find bugs in Java code

11.29.2006 · Posted in Links

FindBugs looks for bugs in Java programs. It is based on the concept of bug patterns. A bug pattern is a code idiom that is often an error. Bug patterns arise for a variety of reasons:

* Difficult language features
* Misunderstood API methods
* Misunderstood invariants when code is modified during maintenance
* Garden variety mistakes: typos, use of the wrong boolean operator

FindBugs uses static analysis to inspect Java bytecode for occurrences of bug patterns. Static analysis means that FindBugs can find bugs by simply inspecting a program’s code: executing the program is not necessary. This makes FindBugs very easy to use: in general, you should be able to use it to look for bugs in your code within a few minutes of downloading it. FindBugs works by analyzing Java bytecode (compiled class files), so you don’t even need the program’s source code to use it. Because its analysis is sometimes imprecise, FindBugs can report false warnings, which are warnings that do not indicate real errors. In practice, the rate of false warnings reported by FindBugs is less than 50%.

A Tune-Up for TDD?

11.29.2006 · Posted in Links

I feel that TDD is too difficult to learn. This is of great concern to me. I work in a large company on a large project. I think it should be of great concern to the rest of the Agile community too. It seems to me that TDD presents the greatest risk to successful adoption of an Agile methodology by large projects/organizations.

My gut has been pointing me in the general vicinity of testability for just over a year. About a month ago I realized why. The fifth step of TDD, refactor out duplication, is the culprit. The fifth step is geared toward a master not a beginner. Identifying duplication is not as simple as it might sound. Much more than copy and paste duplication is targeted. Behavioral duplication is the real target. Seeing this type of duplication is much more of a right brain activity than a left brain activity.

Author: Jay Flowers
Published: November 19th, 2006


BayXP session on jBehave, rSpec and TDD, November 29

11.29.2006 · Posted in Events

Really late notice (the session is in two hours!), but Shane Duan will be speaking on jBehave, rSpec, and Test Driven Development, 6:00 PM, November 29, 2006, at Digital Chocolate, 1855 South Grant Street, San Mateo, CA 94402

Abstract: As TDD becoming more accepted development practices and we gaining good experience on what it makes a good TDD, some have taken a second look at what we can do to improve the framework that we are using, so that it fits into our style of programming, rather than the other way around. Two good examples are jBehave, and rSpec. Here we are going to take a brief look at how they are trying to achieve this, and share our ideas of TDD without the restriction of the tools.

(via Keith Ray)

Beyond TDD: Behavior-Driven Development [Video]

11.29.2006 · Posted in Links

Test Driven Development (TDD) has become quite well known. Many developers are getting benefit from the practice. But it is possible that we can get even more value. A new practice is getting attention these days: Behaviour Driven Development (BDD).

BDD removes all vestiges of testing and instead focuses on specifying the behaviour desired in the system being built. This talk will be focus on Ruby and will introduce a new BDD framework: rSpec. The ideas, however, are language independent.

Author: Dave Astels
Presented: Google TechTalks, March 17, 2006
Duration: 48 mn

SQL Refactor: SQL code refactoring and styling tool

11.29.2006 · Posted in Links

SQL Refactor allows you to automatically format your SQL code and database objects in the style of your choice. SQL Refactor improves the quality of your code, making it easier to read, understand and share amongst a team. A companion tool to SQL Prompt, SQL Refactor dramatically speeds up database development and administration, without impacting on the behavior of your database and applications.

(Commercial tool)

Defects and culture

11.29.2006 · Posted in Links

The way software defects are seen on traditional vs agile projects reveals something about the differences in organizational culture. Given the following causes of defects…

Type 1: Programming error
Type 2: Misunderstood requirement
Type 3: Requirement defined incorrectly
Type 4: Discovered requirement

… the typical response to each type of defect is exactly opposite on agile teams compared with traditional teams.

Author: Dave Nicolette
Blogged: November 13, 2006


Méchoui’s dev Lunch

11.29.2006 · Posted in Links

In this blog, I tried to explain why we must separate the tests we create into layers.

This separation in layers enables better efficiency in development processes, because not every test can be a "unit test", and because there may be so many tests that it may take hours to run.

I did not focus on technologies but more on develomment process.



Craig Larman’s Applying Test-Driven Development & Refactoring

11.28.2006 · Posted in Training

Craig Larman’s Applying Test Driven Development & Refactoring – December 7th

This information-packed and hands-on seminar shows developers and technical leadership how to do test-driven development (TDD) and refactoring, apply the most popular open-source frameworks for TDD and use them within a popular IDE.

In this course you will learn how to think in and apply test-driven design and programming, and establish it as a consistent method for your development team.

Click here for more information or to attend this course.

Article on jsTest JavaScript unit testing tool

11.28.2006 · Posted in Tools

A new article has been published on thinkPond.org.

"This article is about jsTest, a JavaScript unit testing tool. Although this tool could be used in many JavaScript testing scenarios, it is specifically designed for writing unit tests as part of the Test Driven Development (TDD) iteration cycle: write a test, make the test pass, refactor, repeat."

Read the full article here.

Dashboard: Java-based remote build monitor plugin

11.24.2006 · Posted in Links

Dashboard is an open-source, free Java based remote build monitor plugin for IntelliJ IDEA and Eclipse IDEs. It will currently give feedback from an Ant build running on a build machine that is on the same subnet as your developer machines. It will also monitor a Cruise Control build process (with a slight modification to Cruise).

EclEmma: Java code coverage for Eclipse

11.24.2006 · Posted in Links

EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License. Internally it is based on the great EMMA Java code coverage tool, trying to adopt EMMA’s philosophy for the Eclipse workbench:

* Fast develop/test cycle: Launches from within the workbench like JUnit test runs can directly be analyzed for code coverage.
* Rich coverage analysis: Coverage results are immediately summarized and highlighted in the Java source code editors.
* Non-invasive: EclEmma does not require modifying your projects or performing any other setup.

The Eclipse integration has its focus on supporting the individual developer in an highly interactive way.

Continuous feedback: Receive immediate feedback with every source code change

11.24.2006 · Posted in Links

Feedback is vital for the practice of Continuous Integration (CI) — in fact, it’s the life blood of a CI system. Rapid feedback enables speedy responses to build events that require attention. Without feedback mediums like e-mail or RSS, builds in a broken state have the tendency to stay broken, which defeats the purpose of CI in the first place! In this installment of Automation for the people, automation expert Paul Duvall examines various feedback mechanisms that you can incorporate into CI systems.

Author: Paul Duvall
Published: IBM developerWorks, November 14, 2006


Agitar Generates Junit Tests

11.16.2006 · Posted in Advisories

Agitar introduced industry’s most powerful technology for automated generation of JUnit tests, providing thorough coverage on most code. Developers can interactively tune and improve the JUnit test generation by writing helper methods in Java.

More here

froglogic Squish/Web Testing Tool Supports Firefox 2.0

11.16.2006 · Posted in Advisories

Hamburg, Germany – 2006-11-16 froglogic GmbH today announced support for testing web applications executed in the newly released Firefox version 2.0.

Squish/Web is a professional functional GUI testing tool to create and run automated GUI tests on Web/HTML/Ajax applications.

Squish works on different platforms such as Windows, Linux/Unix, Mac OS X and embedded Linux and supports testing web applications in Microsoft Internet Explorer 6 and 7, Firefox, Mozilla, Safari and Konqueror.

Support for testing web applications running in the new Firefox 2.0 has now been added and will be available in version 3.0.3 of Squish/Web. Existing customers and evaluators can request a Squish 3.0.3 snapshot now."One of the Squish/Web’s main advantages is the possibility to run the same test scripts in different web browsers to not only automatically test the web application’s functionality but to also automatically ensure correct behavior in different browsers. Therefor it is important for us to quickly provide our customers with support for new web browser versions as soon as they become available", said Frerich Raabe from froglogic.

Squish offers a versatile testing framework for web applications with a choice of popular test scripting languages (Python, JavaScript and Tcl) extended by test-specific functions, open interfaces, add-ons, integrations into test management systems, a powerful IDE aiding the creation and debugging of tests and a set of command line tools facilitating fully automated test runs.

Tests created with Squish are cross-platform and browser independent and can be executed in any of the supported browsers without any changes.

If you are interested in evaluating or purchasing Squish/Web or any other edition of Squish, please contact squish@froglogic.com or visit www.froglogic.com/squish.

About froglogic

froglogic GmbH is a software company based in Hamburg, Germany. Their flagship product is Squish, a professional automated testing tool for GUI applications based on Qt, Tk or XView and for HTML-based web applications running in different web browsers. froglogic also offers Qt consultancy services and other Qt-based development tools such as the Tcl/Tk/Qt migration framework Tq. More about froglogic at http://www.froglogic.com.

ClasspathSuite for JUnit 4 released

11.15.2006 · Posted in Java

The first release of ClasspathSuite is available.

This JUnit 4 extensions allows you to run a suite of testcases that live anywhere in your classpath. This is useful e.g. in multi project settings in Eclipse 3.2 since the integrated test runner does not support multi project testing. ClasspathSuite uses the @RunWith annotation to build up test suites.

See this blog entry for details about usage.