testdriven.com Wrangling quality out of chaos

Archive for September, 2007

XPairtise: distributed pair programming plug-in for Eclipse

09.21.2007 · Posted in Links

The Eclipse plug-in XPairtise provides a platform for distributed pair programming. The plug-in offers shared editing, project synchronization, shared program and test execution, user management, built-in chat communication and a shared whiteboard.

Pair programming is a key practice in Extreme Programming (XP) whereby two programmers share the same terminal and program together. Distributed pair programming is the practice of pair programming where the two programmers comprising the pair are in different locations.

Test Driven Thread Safety

09.20.2007 · Posted in Links

How do you write a test that fails because of lacking thread safety? Well, in this case I could start up some threads, make sure that they used the collection methods simultaneously and then assert that only one thread was allowed to do so at a time.

That turned out to be more easy to think than to code.

Introduces the two problems and their solution.

Author: The Vertical Slice
Published: September 14, 2007

FEST-Assert: Another “assertThat” library for testing

09.20.2007 · Posted in Java

FEST-Assert is another "assertThat" library that aims at making tests more readable. Here is an example:

import static org.fest.assertions.Assertions.assertThat;
import org.testng.annotations.Test;

public class SomeTest {
@Test public void testApp() {
int result = 2 + 3;
assertThat("Hello World").contains("World");

We like this approach because:

1. Only one static import is needed (org.fest.assertions.Assertions.assertThat)

2. Allows us to use our IDE’s "auto-complete" feature: we only type "." and we get the possible assertion methods for the value passed to "assertThat"

3. We can chain related assertion methods:


FEST-Assert can also be extended using Conditions. The following condition verifies that the characters in a String are in uppercase:

class UpperCaseCondition extends Condition<String> {

private UpperCaseCondition(String description) {

@Override public boolean matches(String value) {
if(isEmpty(value)) return false;
return value.equals(value.toUpperCase());

public static UpperCaseCondition isUpperCase() {
return new UpperCaseCondition("Uppercase");

This example shows how to use such condition:


which will fail with the message "[Greeting] expected:Uppercase but was:<‘hello’>"

We would appreciate any feedback.

FEST project page.

Using testing frameworks with Groovy

09.19.2007 · Posted in Links

Groovy is great for Agile development in general and testing in particular because:

* it has built-in support for the JUnit testing framework
* it has built-in mocking capabilities
* it provides a very expressive language in which to write tests which can utilise Closure syntax and Groovy’s other features which support the creation of testing domain specific languages (DSLs)
* it can easily leverage Java testing frameworks and IDE support
* its built-in AntBuilder support makes it easy to set up integration tests

This page explores testing features of Groovy and some other testing frameworks that you may sometimes wish to use to complement Groovy’s built-in capabilities.

Spring Automock: expose mocked beans automatically

09.19.2007 · Posted in Links

Spring AutoMock is a test enabling framework to allow automatic exposure of Mocked beans for a Spring application. Used in conjunction with Spring autowiring of bean dependencies you can develop teired application contexts that represent the architectural tiers of your application, and thus you testing strategy. The simplest example is a separation of service beans and DAO beans into separate xml application contexts so that the services can be fully tested in isolation of the DAOs. The DAO beans are still required by the services typically as an injected property. Spring AutoMock can automatically register a Mock and a proxy of certain beans, so that the Mocks can be injected into your test cases and the matching proxy into the item under test. This reduces the need for repeated Spring test configuration.

VERIFY International Software Conference (October 29-30, Washington, D.C.)

09.19.2007 · Posted in Events

The VERIFY 2007 International Software Conference will be held 29-30 October 2007 in Washington DC. Conference will address real world testing problems, presented by practitioners who have actual hands-on testing experience.VERIFY addresses technical software testing solutions, i.e. security-, database-, automated-, agile-testing, test modeling, test-driven development, .NET / Java testing, secure software & open source development, SCRUM, SAP testing, web services testing, and test program management.

VERIFY is comprised of front line experts in software development, security and testing. Presentations and tutorials are delivered by industry leaders who daily face real-world challenges, work real-world projects and face difficult implementation timelines. Keynote, feature and track presentations, plus half-day workshops.

WebsiteConference program

New version 1.1 of MoMEUnit J2ME test framework was released.

09.12.2007 · Posted in News

I am pleased to announce a new version 1.1 of MoMEUnit J2ME test framework.

MoMEUnit is an instance of the xUnit architecture for unit testing of J2ME applications. It is derived from well known JUnit framework. It overcomes lack of reflection API and other restrictions of J2ME MIDP API and supports such main features of JUnit framework as ease of development and run of tests, sharing the same fixture among different tests, running test in its own fresh fixture, modification of fixture for a group of tests, possibility of simultaneous tests runs, Independence of tests runners (different tests runners can be used with framework package) and much more.

Changes in version 1.1.

Ant integration was added in new version. Tasks from ant integration package can be used alone or in conjunction with other J2ME related ant projects.

MoMEUnit Ant Integration offers following functionality.

+ Calculates list of tests to run based on Test interface implementation and specified patterns. There is no need to specify test cases to run explicitly.
+ Runs test cases of already built J2ME application or builds test application on behalf of developer based on source files, classes, resources and libraries specified. It can be used as a J2ME test applications build tool.
+ Preverifies J2ME application before running tests on demand.
+ Formats tests run output by using predefined or custom tests results formatters like in <junit> task. All test characteristics including times and stack traces are available.
+ Gives developers possibility to choose emulator and/or preverify tool to run by specifying predefined or custom emulator or preverifier.
+ Gives developers possibility to configure test J2ME application by specifying attributes of application JAD descriptor and/or manifest.
+ and much more.

MoMEUnit is available under Common Public License – v 1.0.

More information can be found at MoMEUnit Site.

To download MoMEUnit, please, use following link "Download".

Truwex 2.0 visualizes website QA, accessibility and compliance.

09.12.2007 · Posted in Tools

August 16th of 2007. Erigami announces the New Truwex 2.0: a website accessibility, quality and compliance software product.

Truwex is a server application with a web interface. It is dedicated to web development teams and to corporate compliance managers. Truwex can be deployed on an individual computer, on a server, or rented as a hosted solution. Truwex is the only web quality management tool which uses a real instance of Internet Explorer to scan every page of a website automatically. Truwex shows detected issues on a web page screenshot and in the HTML code. "On screen" visualization increases web developer productivity, a key success factor in web site development and maintenance projects. Truwex helps website owners to monitor their web assets and to report results accurately to higher management.

New in Truwex 2.0

– Web accessibility validation becomes even more detailed now.
– Truwex checks password protected web applications with login page
– Website Redirects reporting: server and client side redirects including JavaScript redirects
– New reports: key pages, linked domains, website redesign workload estimate, work prioritization
– Search Engine Information: indexed and un-indexed pages, duplicated pages, external links and more
– Up to 50% higher Performance and less disk space consumption

Try free Truwex Online Tool with visualization technology: http://checkwebsite.erigami.com/accessibility.html
Download Truwex 2.0 with a 30-day trial license: http://www.erigami.com/download.html
Read details about Truwex 2.0 functionality: http://www.erigami.com/blog/truwex-2-0-new/

Truwex Technology

The core product technology is called True Web Experience (TruWEx) because all web page properties including images, JavaScripts, and Flash movies are downloaded and rendered exactly as they would be when your site is viewed by a real user. This means that Truwex improves report accuracy and discovers problems which wouldn’t otherwise be detected by other standard tools.

Truwex provides a rich set of quality rules, which can be quickly expanded through custom modules.

– Web Accessibility: the US Section 508, WCAG and standards based on it, as UK DDA-PAS78, German BITV
– Online Privacy: Web Analytics tracking, cookies, privacy policy links, third party content, PII, legislation compliance as COPPA or the US Section 208
– Website Quality: broken links, script errors, popup windows, meta data
– Searchability: web page indexing in search engines, external links, server and client side redirects, duplicated content, links to sites, which host malware and spyware
– Google Analytics deployment validation on a website
– Custom Modules: AJAX and banking applications scans and reporting, logins to complex user authentication (like RSA authentication), corporate brand validation on web

About Erigami

Founded in 2001, Erigami is a leading provider of web site quality assurance tools. Erigami supplies the most advanced validation and error visualization technology to our clients. Erigami team has multi-year experience in web site standards, compliance and quality assurance area. Erigami is serving large multinational companies and smaller businesses. For more information visit: http://www.erigami.com

JExplorer: wrap IE inside a Swing container

09.12.2007 · Posted in Links

JExplorer is a library that provides developers with an easy-to-use ability to integrate Microsoft Internet Explorer into Swing applications.

Standard version: the lightweight version containing only necessary JExplorer API. Does not even require JNIWrapper.

Professional version: useful for those who need to use JNIWrapper functionality in addition to JExplorer, who require a tight integration with MSHTML and DOM functionality, and intend to use low-level IE API.

(Commercial tool)

Objections to Agile Development [PDF]

09.12.2007 · Posted in Links

At the recent Agile Development Conference in Salt Lake City, Utah, USA, one presentation included a series of objections to agile development heard from senior executives (CIOs, CTOs, etc.) of large organizations. Whether these are valid objections or just misinterpretations of agile development, the fact that they originated with senior executives provides a view into the barriers that prevent the wider adoption of agile methods. Perhaps you are even hearing some of these same comments from your executives. So I thought I’d dedicate a White Paper to reviewing and responding to these objections.

Author: Jim Highsmith
Published: Agile Project Management, May 2004
(via Darrell Norton)
Requires a Cutter Consortium account.


Craig Larman’s Applying Advanced Object Design with Patterns

09.12.2007 · Posted in Links

[img align=left]http://skillsmatter.com/images/misc/craiglarman.jpg[/img][img align=right]http://skillsmatter.com/images/system/logo.gif[/img]
This popular, high-impact, and hands-on course on mastering advanced object-oriented design (OOD) and design patterns is aimed at architects and developers of OO systems, and is based on acclaimed industry leader Craig Larman’s extensive experience coaching and applying OOD since the mid 1980s.

Object-oriented (OO) design patterns are a critical and fundamental skill of successful OO developers to support design agility. Most modern OO systems are designed with patterns, and mastery of design patterns is considered a basic criterion of mature developers—and an absolute necessity for architects.

Various studies indicate that after initial release of a software system, at least 50% of effort and cost is spent in modification. To save money, it is skillful and economic to take a long-term view of product development and invest in skillful designs that reduce these costs.

You will leave this workshop with deeper skill to apply patterns and create quality object-oriented designs that have agility – that support reduced modification costs and increased comprehensibility, and hence support business agility.

Craig Larman will be teaching this Design Patterns Course at Skills Matter in London on September 4th-7th


Agile Development Practices 2007 Conference

09.12.2007 · Posted in Events

Announcing the first conference for software professionals investigating or implementing agile development practices, processes, technologies, and leadership principles. Explore the latest trends in agile development approaches through keynotes, pre-conference tutorials, and concurrent classes in this four day event.


Dates: December 3-6, 2007
Location: Orlando, FL
Venue: Shingle Creek Resort

The Shingle Creek Resort is located at:
9939 Universal Boulevard
Orlando, FL 32819

For additional information, please contact a Software Quality Engineering representative toll-free at 888-268-8770 or email sqeinfo@sqe.com

DbFit 0.9: Support for MySql, complete Oracle for Java support and more

09.12.2007 · Posted in Tools

DbFit is a free extension library for FIT/FitNesse testing framework. It allows developers to manipulate database objects in a relational style, making it much easier to manage and test database objects than with xUnit-style tests.

Release 0.9 (04-Sep-2007) is a general clean-up release, intended as a replacement for all the ad-hoc binary builds over the last few months.

New and noteworthy:


– support for embedding DbFit tables into Java/.Net tests as a quick and
efficient way to prepare the stage or verifying db results
– new fixtures: QueryStats and Clean for quick checking and cleaning up
– support for testing individual error codes with stored procs


– initial support for MySql 5
– support for Oracle stored functions, float and timestamps


– support for BIT data type in SQLServer 2005
– support for Oracle Float data type

Amock ver9.6, Mock static method

09.06.2007 · Posted in Java

Amock is AspecJ based mock library.
It will give you java mock which you have dreamed.

With Amock, you
* Can mock static method and constructor.
-> You can unit test with singleton.
* Can create mock object of a class which have only private constructor.
* Can create mock instance of interface and normal class instance.
* Can create mock object without any parameter even if the class does not have default constructor.
-> You don’t need to create expensive object just for mock constructor.
* Can access private method and attribute easily.
* Can mock private and protected method.
* Can use argument checker (argument matcher ‘eq(). any()…’) only where it is needed.
* Don’t need extending specific class.Prerequisite
JDK 1.5 version
Eclipse 3.2
AJDT 1.4.0

Download Amock libarary and documentation from
and CGlib no dependency 2.1_3

Download Amock here

Home page

package my.amock.example;

import static my.amock.util.Will.*;
import static my.amock.util.A.*;
import static my.amock.check.Check.*;

import my.amock.bracket.Story;
import my.amock.util.A;
import my.amock.util.Will;
import junit.framework.TestCase;

public class SimpleExampleTest extends TestCase {
private DummyClass dummyMock;
//private DummyInterface dummyMock;

public void setUp() {
//private constructor need A.mock()
//and when you use it you don’t have to specify parameter even if constructor need parameter
dummyMock = mock(DummyClass.class);

// if it was public constructor
//dummyMock = new DummyClass();

// if it was interface
//dummyMock = mock(DummyInterface.class);

public void testSimple() {
new Story() {{
//Recording is done in this block.
//Record Method call
//Record Method call with expected return value;
//Record Method call with expected return value;
//Record Method call with expected expected calling times and expected Exception to throw;
a(dummyMock.devide(anyInt(),eq(0))).times(2).toss(new ArithmeticException());
//Record Method call with expected expected calling times;
//Record static method call with expected expected return value
//Record constructor call with expected expected return value
call();a(new Integer(1)).ret(new Integer(3));
//Record static method call with expected expected return value
assertEquals(1, dummyMock.returnThis(1));
assertEquals(1, dummyMock.multiply(0,7));
try {
fail("should not reach here");
} catch (ArithmeticException e) {}
try {
fail("should not reach here");
} catch (ArithmeticException e) {}

assertEquals(1, DummyClass.staticReturnThis(1));
assertEquals(3, new Integer(1).intValue());
assertEquals(dummyMock, DummyClass.getInstance());
assertEquals("dummy", dummyMock.toString());

public void testField() {
Object original = A.field(dummyMock, "privateFinal").get();
Object newOne = new Object();
A.field(dummyMock, "privateFinal").set(newOne);
Object changed = A.field(dummyMock, "privateFinal").get();
assertNotSame(original, changed);
assertEquals(newOne, changed);

public void testMethod() {
final my.amock.util.Method privateMethod = A.methodExact(dummyMock, "privateMethod", int.class);
new Story() {{
assertEquals(5, privateMethod.invoke(3));

public void testAssign() {
String a = "a";
String ab = "ab";
A.assign(a, ab);
assertEquals("ab", a);


Mockrunner 0.4 released

09.05.2007 · Posted in Java

This main release adds compatibility for Java 6 and Java EE 5. Changes include:

– Full JDBC 4.0 support including the SQL XML data type
– Full Servlet 2.5 and JSP 2.1 support
– Introduction of the JasperJspFactory which allows EL evaluation using the Unified Expression Language API
– Introduction of RuntimeAttribute to simulate scriptlets and EL expressions as tag attributes
– many small bug fixes

EJB 3.0 is not supported yet.

You can download this version from http://mockrunner.sourceforge.net