testdriven.com Wrangling quality out of chaos

Archive for the ‘Tools’ Category

Java GUI testing framework: Abbot 0.12.3 released

06.18.2004 · Posted in Java

The Abbot framework is a Java library for GUI unit testing and functional testing. It provides methods to reproduce user actions and examine the state of GUI components. The framework may be invoked directly from Java code or accessed without programming through the use of scripts.

Mainly a bug fix release.Bug Fixes

- Fix apparent hang/freeze when recording/selecting components, especially with children of JTabbedPanes or other components which hide their children. Fix XSD; args attribute is not required on call steps.
- Fix strongly held reference when filtering components (nixnixnix).
- Fix NPE when recording null-valued selections in JTable/JList.
- Fix class cast exception when running scripts and reporting step status.
- Workaround disabled menus bug on OSX. Fix Robot verification w/1.4.2_04.
- Fix broken example scripts (fontchooser) (thanks to quikdraw).
- Fix editor tutorial script so that it runs outside of the editor.
- Fix several bugs selecting methods in the Assert step.
- Fix script context parsing error with w32 drive letters.
- Removed deprecated classes.
- Ensure most objects used in a test may be GC’d after a test run. Mostly affects the Abbot test suite.
- Fix test fixture timing issues that were causing lost key/mouse events.

Go to Abbot’s home, read the release notes, download Abbot, view the API.

PicoContainer 1.0 released

06.17.2004 · Posted in Java

The PicoContainer team has announced the final release of PicoContainer 1.0.

PicoContainer helped popularize Dependency Injection (particularly Constructor Injection), a software pattern that helps developers keep their code simple and testable.PicoContainer is a lightweight container. It is not not a replacement for a J2EE container, as it doesn’t offer any infrastructure services out of the box, but its Dependency Injection feature provides a way of instantiating components and lacing them together with other dependent components.

Non-intrusive, PicoContainer doesn’t require implementing any funny APIs. They can be POJOs. With lifecycle support built-in and a very extensible design enabling virtually any form of extensions to the core, PicoContainer is embeddable inside other applications, and can help you write better code.

Read the press release.
Visit PicoContainer’s home page.
Visit Martin Fowler’s pages on Inversion of Control.

MbUnit version 2.15.1 beta released

06.17.2004 · Posted in Tools

MbUnit has entered beta testing. The project has been enriched with many features and novel ideas, and is getting keen attention.

MbUnit is an evolutive Unit Test Framework for .Net. It provides new fixtures as well as the framework to create new ones. MbUnit is based QuickGraph, a directed graph library for C#.List of features:

Test Framework

- Fully compatible with NUnit, csUnit fixtures. No change to the code needed, besides changing imports,
- GUI, Console Runner, NAnt task, and Visual Studio Add-in with NUnitAddIn available
- New Test Fixtures: TypeFixture, EnumerationFixture, OrderedCollectionFixture, ProcessFixture
- New Test Decorators: repeated tests, "timed" tests, load tests, multi-threaded tests, etc..
- Extensible fixture definition scheme: MbUnit was designed with evolution and new fixture integration in mind.
- Support for .NET 1.0 and 1.1

GUI and Test Execution

- Loads multiple assemblies, extracts test fixtures by Reflection exploration,
- Runs all test in separate threads to keep GUI responsive,
- Customize progress bar with success, failure, ignore and not run count.
- Exception explorer, Console output, Console error
- IDE like application using Magick library
- Built-in reporting
- Visual Studio Add-in, select tests by assembly, namespace or fixture, and run them directly in Visual Studio thanks to NUnitAddIn,
- NAnt task available

Results report

The test results are serialized to XML before being rendered by report generator. Current formats are XML and HTML.

MbUnit also has a good collection of tutorials.

Visit MbUnit’s home.
Visit Jonathan de Halleux’s blog.

SimpleTest Beta6 release

06.11.2004 · Posted in Tools

SimpleTest
beta6 has been released on Sourceforge. Mainly improvements to the web tester component.

SimpleTest is a PHP unit tester, mock objects generator, web tester and scriptable web browser. Whilst not as comprehensive as combined Java and Perl equivalents, it is quick an easy to use and has the all the typical features you need for day to day web development.

Yours, Marcus

StrutsTestCase v2.1.1 Released

06.09.2004 · Posted in Tools

StrutsTestCase for JUnit is an extension of the standard JUnit TestCase class that provides facilities for testing code based on the Struts framework. StrutsTestCase provides both a Mock Object approach and a Cactus approach to actually run the Struts ActionServlet, allowing you to test your Struts code with or without a running servlet engine.This latest release resolves some outstanding compatibility issues with Struts 1.1, and fixes a few high profile bugs.

StrutsTestCase is no longer compatible with Struts 1.0.x.

Read the press release.
Visit StrutsTestCase’s home page.
Download [url=http://sourceforge.net/project/showfiles.php?group_id=39190&package_id=31401]StrutsTestCase[/url].

jMock 1.0.1 released

06.09.2004 · Posted in Java

jMock 1.0.1, a library for testing Java code using mock objects, was released last Monday. Mock objects help design and test interactions between objects.The jMock package:
- makes it quick and easy to define mock objects, so you don’t break the rhythm of programming;
- lets you define flexible constraints over object interactions, reducing the brittleness of your tests;
- is easy to extend.

Changes from 1.0.0
- Fixed bug in error messages that report verify failures
- Various minor error message improvements

Binary and source distributions and documentation can be downloaded from here.

Spring framework 1.0.2 released

06.03.2004 · Posted in Java

Spring is a layered Java/J2EE application framework, based on code published in Expert One-on-One J2EE Design and Development by Rod Johnson (Wrox, 2002).

Among the enhancements in this release is the new "mock" source tree and "spring-mock" jar file, containing JNDI and Servlet API mocks for usage in applications.Spring’s mission statement states that Spring reduces the complexity cost of using interfaces to zero, and considers testability essential.

Read the press release.
View Spring’s documentation.

ClrUnit Beta

05.27.2004 · Posted in Tools

ClrUnit is a new unit testing framework for .NET.

It is similar in nature to NUnit, and provides several new features:

- A dynamic mock object library is included
- The concept of TestHosts are introduced, which allows you to do things such as declare that a test case needs to be run in its own application domain with a specific configuration file
- The concept of Test Groups and Filters is introduced, which allows for flexible test configurations.
- Tight integration with Visual Studio 2003 is included, including running and debugging unit tests within a single instance of Visual Studio.

You can find ClrUnit here.

-John Lewicki

Rephlux: A Continuous Integration Tool for PHP

05.27.2004 · Posted in Tools

From [url=http://agilemovement.it/modules.php?op=modload&name=News&file=article&sid=493&mode=nested&order=0&thold=0]AgileMovement.it[/url]: "Rephlux is a PHP based tool for running a continuous testing/build process on your project and taking action based on the outcome of your tests. Rephlux is aimed at distributed developments and developments within larger teams."

Official website: http://rephlux.sourceforge.net/

JAM (Ant build toolkit for J2EE applications) released

05.22.2004 · Posted in Java

JAM consists of a collection of Ant scripts designed to perform common Java/J2EE build tasks such as compilation, packaging, testing, deployment and J2EE application server control. By assembling JAM modules, one is able to quickly create sophisticated IDE-independent build scripts. JAM supports various J2EE application servers, XDoclet invocation, JUnit unit testing, Apache Cactus integration testing, UML-based code generation and other technologies.

Although JAM was developed to complement the JavaGen code generator, it has evolved into a full feature, stand-alone build framework.Optional JAM modules are available for unit testing and integration testing:

utest.xml adds unit testing to the build process (standard target: test).
ejbtest-cactus.xml adds Cactus integration testing to your build process (tandard targets: itest, testcycle).

Read JAM’s User Guide.
For an example usage, read EJB JAMing – Building & Testing EJBs using JAM.
Jump to JavaGen’s download page.

EasyMock 1.1 extends the dynamic mock creation to regular classes

05.13.2004 · Posted in Java

The first extension to EasyMock has been made available in the latest release of EasyMock. With the help of cglib, it allows generating mock objects for classes.

EasyMock is a class library that provides an easy way to use Mock Objects for given Java interfaces.In addition, release 1.1 features the following changes:

- ParameterMatcher renamed to ArgumentsMatcher, since it matches arguments, not parameters
- parameterMatches() and parameterToString() on AbstractMatcher renamed to argumentMatches() and argumentToString(), since they work on arguments, not parameters
- tests extended to gain 100% clover coverage
- internal refactorings

EasyMock 1.1 is available as a jar file from the EasyMock download page.
Read EasyMock’s documentation.
Visit EasyMock’s Yahoo! Group.

(via Lasse Koskela’s blog)

Composite Unit Testing with MbUnit

05.13.2004 · Posted in Tools

Jonathan de Halleux has added a new article on his blog that talks about Composite Unit Testing.

This is a new way of creating unit tests. Rather than creating a fixture for each class, we split the testing effort by class functionality. Taking advantage of interface composition, the unit tests are separated for each interface and we feed those fixtures using object factories. This is why he calls this technique: Composite Unit Testing.There are several advantages of using this approach:

1) Expressing requirements: interfaces are a natural place for expressing requirements, which later on translate into unit tests,
2) Test reusability: once you have design a test suite for an interface, you can apply it to any class that implements this interface,
3) Test Driven Developement: this approach fits nicely and naturally into the TDD paradigm since execution path is interface -> interface fixture -> implementation(s).
4) Separation of tests and tested instance generation: the code that generates the tested instances is located in factories that can be reused for each fixtures.

Read the article.
Visit Johnathan’s blog.

Shunra\Stratus 2.0: Performance unit testing enabled

05.10.2004 · Posted in Java

Shunra Software recently announced Shunra\Stratus 2.0, which provides performance unit testing for distributed application code.

Intended to provide for unit testing under network conditions, Shunra\Stratus features a network emulation technology to let developers gauge how their application modules perform in a production environment. Developers can record and playback the production environment directly from their desktops.From the Shunra site:

"An essential component of unit testing, Shunra\Stratus lets software developers see and feel exactly how their application modules perform over the production environment, directly from their desktops. Using Shunra\Stratus’ network emulation technology, the application code behaves as if it were located on a remote desktop, connecting to the datacenter over a wide area network, instead of a local network. With this insight, developers can simply and quickly locate and resolve network-related design, functionality and performance-related flaws within their code."

Read the press release.
Download a free trial.

Jameleon 2.0 released

05.01.2004 · Posted in Java

[img align=right]http://jameleon.sourceforge.net/images/top_logo_100.jpg[/img]Jameleon, the acceptance-level automated testing tool, has just been updated to version 2.0.

Among the changes in this release, the major improvement lies in Jameleon’s ability to control the behavior of function tags based on JavaDocs alone, which greatly simplifies the tag-creation process.

All major features required for user interfacing have been implemented in this release. Future releases will focus more specifically on the GUI.Christian Hargraves and the Jameleon team recommend that everyone read the new tutorial that documents all new features in this release and in the previous 1.8 release. It is also recommended that everyone read the the [url=http://sourceforge.net/project/shownotes.php?group_id=84246&release_id=174733]release notes[/url] for upgrade instructions and more details on the four changes introduced by this release.

Jameleon uses Jelly, [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=21&lid=98]HttpUnit[/url], [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=4&lid=3]JUnit[/url], Log4j and [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=21&lid=162]JWebUnit[/url].

Go to Jameleon’s home page.

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.

NUnitForms v1.0 released

04.14.2004 · Posted in Tools

NUnitForms, a tool for automatically testing Windows Forms applications written on .NET, has just been released. It is an extension to NUnit that should make it easy to test Windows Forms applications.

Support is already built in for Buttons, Labels, TabControls, and Context Menus, with many others coming soon. It is very easy to add support for additional types of controls.NUnitForms also provides a Recorder application that will Record your interactions with a Windows Forms class and write a Unit Test for you that duplicates your actions. You can perform asserts during this process by right-clicking on your controls and selecting the property to assert.

The recorder application is provided in separate assemblies and its use is optional. If you have custom recorder functionality (for a custom user control for example), the recorder application will pick it up automatically without rebuilding the recorder application. You simply have to “load” the assembly with the custom recorder. NUnitForms can also be extended, enabling the use of Custom Testers for your user controls (or controls not directly supported by the tool) without including them in the NUnitForms assembly.

Click here to download NUnitForms, or visit NUnitForms’ home page.

Brian Marick calls for “blogospheric or wikispheric talk” on FIT

04.07.2004 · Posted in Tools

Brian Marick is currently reviewing a book on FIT, the acceptance-testing framework initiated by Ward Cunningham, which uses tables to express tests. Brian has been putting a lot of thought into this tool, and has added a FIT category to his blog to trigger some further thoughts on the subject. His first entry discusses how to enhance his own contribution to FIT, the StepFixture, to better express tests.Jump to Brian Marick’s blog entry on the StepFixture or to his blog on FIT.

The FIT site presents the framework and table examples.
The FitNesse site presents an integrated standalone wiki and acceptance-testing framework based on FIT.

Note also that a few sessions on FIT and TDD will be held at the upcoming XP 2004 Conference.

Other resources: Retrofitting an Acceptance Test Framework for Clarity
[url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=16&lid=177]Tests as documentation for later readers: an example using FitNesse[/url]
[url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=26&lid=178]NFit: Fit framework for C#[/url] and [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=16&lid=179]Using NFit[/url]
[url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=20&lid=232]Fit tests and their implementation[/url]

Jenny auto-generates JDBC Mock classes to facilitate unit testing

04.06.2004 · Posted in Java

From Jenny’s web page:

"I want to auto-generate a Mock class for every table class to facilitate unit testing. This means that I need to have something I can override. Since static methods cannot be overridden, I need an inner class that the static methods use that I can override for my mock classes. This also means that I need to hide all of the Row constructors so a mock object can be returned. This allows unit testing without having to provide SQL in the unit tests or to have a database server running during the testing."Jenny reads a database and generates java source which provides strongly typed access to the database, with all the getters and setters needed.

It was created to accomodate the slight differences in SQL, drivers, app servers, database access, etc. and provide access to the database in plain java. It also keeps track of table names and columns automatically in strong type.

"For each table and view in a given database, Jenny will create a java source class file. Each of these classes will provide a collection of general purpose methods for working with the table/view. They will also provide a list of all the column names, the table/view name and an inner class called Row that can be used to manipulate a single row in the table."

Gregg Bolinger writes:

"You provide Jenny a properties file with information about the database, what JDBC Driver to use, and what package the source code should be placed in. Jenny will also create mocks for all of her generated classes to help with your unit testing. Then it’s just a matter of executing Jenny from the command line feeding it the properties file to use and Jenny spits out the source code for you."

Find out more about Jenny.
Read Jenny’s one-page tutorial.

Jameleon 1.8 has been released

03.23.2004 · Posted in Java

This version fixes a number of bugs present in earlier releases, and adds new features, such as:

- Sets the test case name from script file name, if not supplied
- Displays Total Execution Time for TestResults
- Provides HttpUnit helper to get cell values in a given column
- Adds an expectException
- Adds a MaxElapseTime for each TestCase
- Adds an assert image on HttpUnit Validation pointGeneral description: "Jameleon is an acceptance-level automated testing tool that separates applications into features and allows those features to be tied together independently, creating test-cases. These test-cases can then be data-driven and executed against different environments. Even though it would be possible to write unit tests using Jameleon, Jameleon was designed with integration and acceptance-level testing in mind. Most bugs are found and fixed by good unit tests. However, this does not eliminate the need to test the application as a whole."

Go to the Jameleon home page.
Read the [url=http://sourceforge.net/project/shownotes.php?group_id=84246&release_id=225074]release notes[/url].

The PatternTesting project: unit-testing design decisions

03.10.2004 · Posted in Tools

Pattern Testing is about providing the means to automatically check for Architecture/Design/Implementation decisions.

This ongoing project applies the concept of JUnit in verifying that code does what it is supposed to do, but adds a framework for verifying it does it in the way it was defined.

From the PatternTesting site:

Quote:
Every project defines a set of rules that developers agree on. These rules can be coding conventions, naming conventions or at a higher level architecture decisions or best practices.

Usually these rules are either mentioned verbally or written in a "Developer Guide" [..] However, it is not enough. How am I going to verify that I have properly coded against these rules?

So far, there was only one solution: code review. Be it continuously with Pair programming or at some point in time with tech leads or peers performing the review. Wouldn’t it be nice if I could have a suite of tests that could automatically check this? In the same spirit a JUnit test suite verifies that code does what it is expected to do. But this time, we would check that not only the code does what it is supposed to do but also that it does it the way we have defined it.

Pattern Testing suites are made available for Java and Avalon.
See the PatternTesting project on Sourceforge for additional details.

bwbUnit 1.0 released

02.27.2004 · Posted in Java

bwbUnit for Java is a set of components that supports both Black and White Box style of unit testing. Currently the primary component of bwbUnit is called PrivateProxy. It allows Java developers to access private/protected/package variables and methods very easily and without any extra configuration settings.

Other tools in the area require special proxy classes to be hand written or the java poloicy file to be updated. bwbUnit’s PrivateProxy doesn’t have these requirements, which makes it easier to learn and use.

This and all future componets will be developed in a way that allows them to snap into the JUnit framework or to be used as part of a custom testing application.

See http://spectorconsulting.com/bwbunit/

MbUnit, a new highly flexible unit test framework with new fixtures

02.14.2004 · Posted in Tools

Jonathan de Halleux has made available MbUnit this week. This Generative Unit Test Framework aims to give to end-users the "high order" test fixtures and to developers the tools to build new custom fixtures without modifying the Core.To illustrate that, MbUnit implements the Simple Test Pattern and provides new fixture types, like the useful TypeFixture which applies tests to a particular type instance.

MbUnit is currently a prototype, inspired by Marc Clifton’s article on Unit Test Patterns.

Read Jonathan de Halleux’s presentation article and download the prototype here.

MbUnit was formerly presented as GUnit, but was later renamed to avoid conflict with another existing project. The text of this news item was edited accordingly. (March 26, 2004)

Agitar: Developer Testing Process Automation Tool

01.28.2004 · Posted in Tools

Agitar is the first true automation tool of the developer testing process. It helps developers create and maintain unit tests for all their code, allows team leaders up-to-the-minute and unbiased insight into the state of their project, and gives QA and Build teams unprecedented control of the quality of the integrated product.

More information at: http://www.agitar.com/products/2003-000001-agitarintroduction.html

AntFit 1.1

01.28.2004 · Posted in Java

AntFit 1.1 has just been released.

Changes include:

1. useWiki parameter: If your html files don’t have a <wiki> tag, set this to false. Set to true by default for backwards compatibility.

2. fork parameter: forks a separate java process.

http://www.cmdev.com/antfit/