testdriven.com Wrangling quality out of chaos

Archive for August, 2004

TDD Tools Advisory, August 16-31, 2004

08.31.2004 · Posted in Advisories

Abbot 0.13.0/AWT
AsUnit 01.08
Bugkilla 0.1.0
CygBuild 20040819
JXCL 0.7
NUnitAddIn 0.9.576
SCons 0.96
SQLUnit 3.9
STP 3.0.1
Stubby C a01
TestNG 0.9
VB Lite Unit 1.2.4

Also: BuildSys, CUP, EasyUnit, JClassMock, Jutex, Nocaute, PythonEasyMock, RemoteCVS, SharPA, WATSUP, Zanebug[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=13&lid=7]Abbot 0.13.0/AWT[/url]
Abbot is a simple framework for unit and functional testing of Java GUIs. Facilitates generating user actions and examining component state. Supports recording and playback on any Java application.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=575]AsUnit 01.08[/url]
AsUnit is a simple framework for writing and running automated unit tests for Macromedia Flash ActionScript 2.0 applications.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=572]Bugkilla 0.1.0 / Bugkilla Eclipse plugin 0.1.2[/url]
Bugkilla is a set of java tools for the functional test of J2EE Web Applications. Specification and execution of tests will be automated for web front end and business logic layer. One goal is to integrate with existing frameworks and tools.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=27&lid=568]CygBuild 20040819[/url]
Utilities for Win32 Cygwin source and binary package maintainers. To configure, build, strip, produce diffs and generate cygwin specific template files. To put it simply: Convert Unix/Linux/Perl packages into complete Cygwin Net Releases

[url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=4&lid=412]JXCL 0.7[/url]
JXCL is a framework for constructing transforming class loaders for Java. It can be used for a wide range of purposes, including automated testing, in particular testing of unit test coverage.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=7&lid=83]NUnitAddIn 0.9.576[/url]
Point and Test NUnit integration for Visual Studio.NET. The aim of this project it to simplify testing and debugging using the NUnit framework inside of Visual Studio.NET.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=27&lid=560]SCons 0.96[/url]
SCons is a software construction tool (build tool, substitute for Make) implemented in Python, based on the winning design in the Software Carpentry build tool competition (in turn based on the Cons build tool).

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=561]SQLUnit 3.9[/url]
SQLUnit is a regression and unit testing harness for testing database stored procedures. A SQLUnit test suite would be written as an XML file. The SQLUnit harness, which is written in Java, uses the JUnit unit testing framework to convert the XML test specifications to JDBC calls and compare the results generated from the calls with the specified results.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=493]Scalable Test Platform 3.0.1[/url]
Automating the QA testing process for the Linux Kernel as well as automating benchmarking and regression testing.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=576]Stubby C a01[/url]
Stubby C is a C Test Harness generator that helps developers to create effectieve C unit tests. Stubby C can be combined with other unit test solutions like check or CUnit.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=380]TestNG 0.9[/url]
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities.

[url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=550]VB Lite Unit 1.2.4[/url]
A light-weight testing framework written in Visual Basic 6 for testing classic VB/VBA applications.

Newly registered SourceForge projects:

BuildSys intends to help multi-platform projects keep all their various build files in sync. It will use a single ‘.build’ file to generate autoconf/automake .ac/.am files, visual studio 6 .dsp/.dsw files, vs.net .vcproj/.sln files, Dev-C++ .dev files, etc.

CUP is a C++ test tool integrating unit testing with performance testing. It follows the spirit of current popular unit test tools. Plus, it includes necessary performance metrics in the unit tests.

EasyUnit is a unit testing framework for C++ and EC++ that intends to ease this process. It is based on CppUnitLite administration-free concept with the following additions: fixtures support, customizable test runner and results printer.

JClassMock is a Unit Testing tool. It uses JMock (Mock Objects testing approach) and JBossAOP (Aspect Oriented Programming) in order to supports features which are not possible with JMock only.

Jutex is a project to develop Java-based front-ends to the utPLSQL testing framework. This includes integration with JUnit, Ant and Cruise Control.

Nocaute is an open-source automated unit test tool for Java that does NOT require test-coding. Unit-test-cases are specified in XML. The name "Nocaute" stands For NOn Coded Automated Unit Testing Environment.

PythonEasyMock plans to provide easy-to-use mock objects for writing Python unit tests.

RemoteCVS aims to be a unique client-server combination allowing users to select their own build settings and watch as the server produces their own CVS build.

SharPA aims to provide an extensible application/framework written in C# for testing web services. It will let developers interact freely with the WS they are using or developing. Supports extensibility through the use of plugins.

WATSUP (Windows Application Testing System Under Python) plans to be a toolkit to assist with automated functional and performance testing of Microsoft Windows applications

Zanebug intends to provide a unit testing application for the .NET language, to support advanced unit testing features, such as test iterations, in-depth error information, performance metrics, pass / fail stats, and support for existing NUnit tests.

NUnitAsp 1.5 released

08.31.2004 · Posted in Tools

From the press release: "Version 1.5 includes a modest collection of improvements over version 1.4. The most important new feature is improved custom tester support. We’ve exposed a number of methods needed for writing custom testers and we’ve created a new HtmlTag class that’s easy to use and understand. Even if you aren’t writing custom testers, you’ll appreciate 1.5’s improved error reporting and API documentation. Particularly handy is the new ability to report server-side ASP.NET exceptions directly within test failure messages."

NUnitAsp is a class library for use within your NUnit tests. It provides NUnit with the ability to download, parse, and manipulate ASP.NET web pages.

Visit NUnitAsp’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=21&lid=108]home page[/url].Changes in NUnitAsp 1.5:

Produced by Jim Shore and Levi Khatskevitch.

* Added an ImageButtonTester.Click overload that takes no arguments. Credit to Kyle Heon.
* Added CLS compliance (except for certain members). Credit to Levi Khatskevitch and Michael Ridgway.
* Added HTTP proxy support to the Browser (HttpClient) object. Credit to Torin Ford.
* Clarified API documentation for all classes. Credit to Jim Shore.
* Renamed AnchorTester HTML control tester to HtmlAnchorTester. Credit to Levi Khatskevitch.
* Added postback (server-side click) support to HtmlAnchorTester. Credit to Rick Spiewak.
* Added simple ASP.NET error page parsing to display meaningful exceptions in tests. Credit to Levi Khatskevitch.
* Added FAQ: How to test redirection. Credit to Jim Shore.
* Added FAQ: Support for frames/pop-up windows/Javascript/HTML controls. Credit to Jim Shore.
* Made more methods public or protected to aid creation of custom testers. Credit to Jim Shore.
* Created HtmlTag class to simplify creation of control testers. Credit to Jim Shore.
* Fixed AssertEquals to display better failure messages with string arrays. Credit to Jim Shore.

Read the press release.

Stubby C: C Test Harness generator

08.31.2004 · Posted in Links

Stubby C is a C Test Harness generator that helps developers to create effectieve C unit tests. Stubby C can be combined with other unit test solutions like [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=5&lid=296]check[/url] or CUnit.

SimpleTest 1.0RC1

08.27.2004 · Posted in News

The PHP unit tester, web tester and mock objects library has now reached stability. Barring bug fixes and documentation updates, the full release should be available in a couple of weeks. This last version completes frames support and smoothes some of the rough edges.

Read more about [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=21&lid=77]SimpleTest[/url].

CodeHaus unveils Ashcroft to learn “proper” Unit Test discipline

08.27.2004 · Posted in Tools

From the home page:

".. as an agile and test-infected Java developer, we’d like you to consider the benefits of adhering to strict, some might say ‘dictatorial’, limits on the way that you write your unit tests.

"We should clarify, right up front, that these restrictions apply only to unit tests and not system tests or integration tests, which are also of great importance to the success of any project. However, your unit tests, at least one for each class in your codebase, should be clean, decoupled from one another, and run ultra-fast. We think you should be able to run thousands of unit tests and get your green bar in a few seconds. Achieving that kind of performance takes major discipline on the part of the developer, and Ashcroft helps you learn that discipline by failing tests which stray from best practices."

Read the [url=http://docs.codehaus.org/display/ASH/Project+Background]project’s background[/url].
Visit Ashcroft’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=574]home page[/url].

Ashcroft: enforcing discipline in unit tests

08.27.2004 · Posted in Links

Unit tests, at least one for each class in the codebase, should be clean, decoupled from one another, and run ultra-fast. A developer should be able to run thousands of unit tests and get a green bar in a few seconds. Achieving that kind of performance takes major discipline, and Ashcroft helps you learn that discipline by failing tests which stray from best practices.

Pitching a FIT

08.27.2004 · Posted in Links

Have you heard about FIT yet? Even if you have, do you know what makes it significantly different from other testing frameworks? Here is a re-introduction to FIT that highlights one of its most important features.

Author: Michael Feathers
Published: Artima Developer, August 26, 2004


SimpleTest: Unit-testing tool for PHP

08.27.2004 · Posted in Links

Amongst software testing tools, a unit tester is the one closest to the developer. In the context of agile development the test code sits right next to the source code as both are written simultaneously. SimpleTest aims to be a complete PHP developer test solution. It includes all of the typical functions you would expect from JUnit and the PHPUnit ports, but also adds mock objects.

SimpleTest includes Unit testing, mock objects and a web testing framework for PHP built around test cases. It also adds JWebUnit-style testing including cookies, authentication and form handling, and thorough documentation.

Developers: Marcus Baker & Jason E. Sweat

Preemptive Testing

08.27.2004 · Posted in Links

Michael Hunter writes: "’Everyone knows’ that testers can’t do anything until they have something to test. [..] Therefore it goes without saying that testers are pretty much useless until Dev has written enough bugs (erm, code, I should have said) that there is something worth testing. This puts Test perpetually behind the curve with no chance of ever catching up. While Dev has moved on to the next milestone Test is still banging on the previous one. Any bugs they find are often ignored until Dev can bear to pull themselves off their fun new work back onto all that boring ‘completed’ code they wrote last milestone. The only reason the product ever ships is that eventually the Devs hit code complete and (theoretically, at least) stop writing features and focus completely on fixing bugs."


In-Container Testing with JUnit

08.27.2004 · Posted in Links

Today, unit testing is a very popular technique for ensuring code quality. Thanks to the JUnit framework, it has become quite easy to write unit tests for simple Java applications. However, where real-world enterprise applications are concerned, the typical JUnit testXXX() method will not be as helpful because those applications require that objects run inside a container.

In this article, I will describe the application of in-container testing in order to make JUnit tests access objects running inside a J2EE container. The example used here is a Struts-based Web application, which is fairly common among enterprise applications, but the techniques discussed are relevant to any J2EE project.

Learn how in-container testing with JUnit is superior to mock objects for integration testing, how to apply that technique using Oracle JDeveloper.

Author: Julien Dubois
Published: Oracle Technology Network, August 2004

MockRunner 0.3 released

08.27.2004 · Posted in Java

Mockrunner is a lightweight framework for unit testing applications in the J2EE environment. It supports Struts actions, servlets, filters and tag classes. It also includes a JDBC and a JMS test framework and can be used to test EJB based applications.

This major release provides:

– Struts 1.2 support (please read migratingfrom0.2.9.txt for details, there are some incompatibilities with previous versions). Struts 1.1 is still supported.
– Regular expression support for JDBC statement preparation and verification (please note, that you have to enable this feature with setUseRegularExpressions(true))
– Regular expression support for HTML output verification
– many small bug fixes
– MockEJB 0.6 support is still pending

Visit [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=12&lid=216]MockRunner[/url] for more information.

FoxUnit – Unit Testing Framework for Visual FoxPro

08.26.2004 · Posted in News

FoxUnit, a unit testing framework for Visual FoxPro has been released. While the implementation is a bit unique due to numerous architectural differences between VFP and most other languages/platforms, it has also given us the opportunity to implement some features not found in other unit testing frameworks.

For more information, visit FoxUnit.

Refactoring to Patterns

08.25.2004 · Posted in Links

Refactoring to PatternsIn 1994, Design Patterns changed the landscape of object-oriented development by introducing classic solutions to recurring design problems. In 1999, Refactoring revolutionized design by introducing an effective process for improving code. With the highly anticipated Refactoring to Patterns, Joshua Kerievsky has changed our approach to design by forever uniting patterns with the evolutionary process of refactoring.

This book introduces the theory and practice of pattern-directed refactorings: sequences of low-level refactorings that allow designers to safely move designs to, towards, or away from pattern implementations. Using code from real-world projects, Kerievsky documents the thinking and steps underlying over two dozen pattern-based design transformations. Along the way he offers insights into pattern differences and how to implement patterns in the simplest possible ways.

Coverage includes:

– A catalog of twenty-seven pattern-directed refactorings, featuring real-world code examples
– Descriptions of twelve design smells that indicate the need for this book’s refactorings
– General information and new insights about patterns and refactoring
– Detailed implementation mechanics: how low-level refactorings are combined to implement high-level patterns
– Multiple ways to implement the same pattern, and when to use each
– Practical ways to get started even if you have little experience with patterns or refactoring

Refactoring to Patterns reflects three years of refinement and the insights of more than sixty software engineering thought leaders in the global patterns, refactoring, and agile development communities. Whether you’re focused on legacy or “greenfield” development, this book will make you a better software designer by helping you learn how to make important design changes safely and effectively.

Author: Joshua Kerievsky
Published: Addison-Wesley, August 6, 2004
See also: [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=16&lid=567]Refactoring to Patterns Catalog[/url]


Refactoring To Patterns Catalog

08.25.2004 · Posted in Links

27 refactorings from Joshua Kerievsky’s book, [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=10&lid=543]Refactoring to Patterns[/url]:

Chain Constructors, Compose Method, Encapsulate Classes with Factory, Encapsulate Composite with Builder, Extract Adapter, Extract Composite, Extract Parameter, Form Template Method, Inline Singleton, Introduce Null Object, Introduce Polymorphic Creation With Factory Method, Limit Instantiation with Singleton, Move Accumulation to Collecting Parameter, Move Accumulation to Visitor, Move Creation Knowledge to Factory, Move Embellishment to Decorator, Replace Conditional Dispatcher with Command, Replace Conditional Logic with Strategy, Replace Constructors with Creation Methods, Replace Hard-Coded Notifications with Observer, Replace Implicit Language with Interpreter, Replace Implicit Tree with Composite, Replace One/Many Distinctions with Composite, Replace State-Altering Conditionals with State, Replace Type Code with Class, Unify Interfaces with Adapter, Unify Interfaces

7 Simple Ways to Add a Little Agile without Going to Extremes

08.24.2004 · Posted in Links

Over the past year, the Agile community has begun to discuss and experiment with grafting Agile practices onto projects that do not follow Agile values and principles. Many teams in environments of waterfall processes, predefined requirements, and fixed costs have adopted Agile practices and delivered successfully. It can be done. After all, most Agile practices did not originate with the Agile methodologies. Rather, Agile development has identified practices that project teams have been using for decades, explored these practices in depth, documented them extensively, marked routes and hazards, and — where necessary — blazed trails.

This article discusses the following practices:

1. Automate and share the build process
2. Implement a testing framework and start writing unit tests
3. Adopt a continuous integration process
4. Plan and deliver in short iterations and small releases
5. Identify and collaborate with your customer
6. Manage your test data; don’t let it manage you
7. Embrace collective ownership and share the code

Author: Peter Schuh
Published: Better Software, July/August 2004


DotNetMock 0.7.0 released

08.24.2004 · Posted in Tools

With this release, DotNetMock (.NET Mock) now integrates the Dynamic & Static portions of the Mock Object framework.

The .NET Mock Objects project is a .NET framework whose goal is to facilitate developing unit tests in the mock object style.Changes:

– Moved IMock.Expectation class to ExpectationMethod class
– Moved ExpectationMethod.MethodName into property
– Broke AbstractExpecattion into two classes, AbstractExpectation & AbstractStaticExpectation
– Changed constructors for AbstractStaticExpectation to use constructor chaining
– Removed ClearExpected & ClearActual calls from constructor of AbstractStaticExpectation
– Removed this. reference from ExpectationMethod
– Changed MethodName property to ExpectedMethodName property in ExpectationMethod
– Modified ExpectationMethod to extend from AbstractExpectation.
– Introduced Call->Verify concept in ExpectationMethod
– Changed IMock to IDynamicMOck and also inherits IMockObject
– Changed Mock & ScenarioMock to implement IDynamicMock
– Removed Inner Assertion & inner Expectation classes from ScenarioMock
– Combined DynamicMock & Mock into DynamicMock
– DynamicMock now throw AssertionException instead of VerificationExceptions
– Made ScenarioMock a subclass of DynamicMock, now DynamicScenarioMock
– Changed DynamicMock.Verify() to virtual
– Renamed DynamicScenarioMock to DynamicOrderedMock
– Added Call( string ) to DynamicMock
– Added docs to package

Visit .NET Mock [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=12&lid=263]Sourceforge page[/url].


08.24.2004 · Posted in Links

A mind-share blog for the Software Development and Testing community… A place to share your knowledge in software testing – from unit to acceptance, functional to security testing and let’s not forget performance testing.

testingReflections provides blog-space to people wanting to write about software testing and incorporates content from numerous feeds, including testdriven.com and a growing list of testing experts and other practitioners.


Singleton Unit Testing…

08.21.2004 · Posted in Links

Jonathan de Halleux writes: "At first sight it may seem that Singleton and Unit Testing are not compatible since you cannot ensure the separation between the tests. We could solve the problem by instanciating a new ‘Singleton’ instance for each test and apply test on this ‘local’ instance. The problem is that a well implemented Singleton is sealed and it’s constructor are private and thus you cannot create this instance."


TestRun: Test Automation for ASP.NET Web Apps with SSL

08.21.2004 · Posted in Links

The techniques to encrypt user data with Secure Sockets Layer (SSL) over HTTP and test the resulting Web applications programmatically are not widely known. This article shows how to set up a test SSL server and write test automation that verifies the functionality of a simple but representative Web application.

Author: James McCaffrey
Published: MSDN Magazine, August 2004

SQLUnit: unit-testing stored procedures

08.21.2004 · Posted in Links

SQLUnit is a regression and unit testing harness for testing database stored procedures. A SQLUnit test suite would be written as an XML file. The SQLUnit harness, which is written in Java, uses the JUnit unit testing framework to convert the XML test specifications to JDBC calls and compare the results generated from the calls with the specified results.