testdriven.com Wrangling quality out of chaos

Archive for the ‘Tools’ Category

IDEtalk 0.1.2 brings code exchange facility in IDEA chat plugin

02.11.2005 · Posted in Pair programming

Kirill Maximov announces the public release of the IDEtalk plugin for IDEA, an IDE chat plugin specifically tuned for code exchange:
<blockquote>You can exchange stacktraces, view open files of a user from your contact list, and open local version of the user’s file. Currently it supports IntelliJ IDEA 4.5.x/5.0 EAP and uses P2P connections in the local network (no specific server installation is required).</blockquote>

Surrogate test framework 1.0rc1 released

02.10.2005 · Posted in Tools

Surrogate is a complimentary unit testing framework, especially suitable for unit testing of large, complex Java systems. The framework integrates seamlessly with JUnit, MockEJB and various mock object implementations and is based on the AspectJ technology.

If you are tired of broken unit tests because of time-dependence, external dependencies or low quality on the tests, Surrogate might provide the answer.

Surrogate can be downloaded via the Surrogate site.

Fakemail project started

02.09.2005 · Posted in Tools

A first prototype of fakemail has been released on Sourceforge. It’s a single script deamon, written in Perl, that acts as a fake SMTP gateway. You send e-mails to it and it just dumps them to a directory. It’s for testing applications that use e-mail.

For example if your language supports the backtick operator usage might look like…

$pid = `fakemail –host=localhost –port=10025 –path=. –background`;
# Do some mailing to marcus@home here
`kill $pid`;
$mail = file(‘marcus@home.1′);

Sponsered by Wordtracker under GNU license.

Announcing TestNG 2.1

02.09.2005 · Posted in Java

I am happy to announce the availability of TestNG 2.1 (http://beust.com/testng). Some of the new features include:

* invocationCount and successPercentage, which I described in a previous entry (http://beust.com/weblog/archives/000236.html), and which allow you to invoke a test method a certain number of times while allowing some of these invocations to fail. If the number of failures is under a certain threshold, the test is still considered a success.

* timeOut is now applicable to all test methods. Whether you are running your tests in parallel or not, you can specify a time-out for your test method and if it fails to complete within the given amount of time, TestNG will mark it as a failure.

* dependsOnMethods was the most requested feature. You can now specify dependencies on a method-based basis (no need to specify a group if your dependency graph is simple). You can even mix dependsOnMethods and dependsOnGroups.

* … and of course, numerous bug fixes and other additions.

A special thanks to Alexandru Popescu who has pulled all-nighters to make this release happen!

We have an exciting list of new features lined up for our next version, among which a plug-in API, but in the meantime, enjoy TestNG 2.1.

FlexUnit 0.9 made available by iteration:two

12.02.2004 · Posted in Tools

Alistair McLeod recently announced the general availability of Iteration:Two’s FlexUnit.

"Built upon the extensively used AS2Unit testing framework for ActionScript 2.0, FlexUnit provides tighter integration with Flex, while removing the need to run tests within the Flash IDE."

Still without a home, FlexUnit is provided as a single zip containing "the compiled FlexUnit component (for those that wish to write and run their own tests), general and class level documentation, sample tests and the full source code".

Released as version 0.9, the framework will evolve to 1.0 to reflect the feedback received.

(Note that there is a parallel project on SourceForge, also named FlexUnit.)

See also: [url=http://www.testdriven.com/search.php?query=actionscript&action=results]unit testing tools for ActionScript[/url].

Simple web services nUnit helper class

09.22.2004 · Posted in Tools

I found that in developing a web services architecture which uses the Facade at the Distribution Boundary pattern, a lot of the unit tests have to validate the properties of simple objects against the same or equivalent objects with common property names.

The solution I came up with which is VERY simple uses reflection to iterate through the property names of an object and test equivalence of each one – note that if the types of properties are different even with the same name, unless it can be dynamically cast, will throw an exception. (Which is good – if this is the case the unit test should generally fail anyhow!)

TestHelper.vb

Usage of the class looks something like this:

Code:
Dim ignore() As String = {"ScheduleID"}
Assert.IsTrue(TestHelper.CompareProperties(sourceTO, resultTO, ignore))

where the ‘TO’ classes are Data Transfer Objects

From Joe Cincotta’s Blog

First public release of Zanebug available

09.20.2004 · Posted in Tools

Adapdev has announced the first public release of Zanebug, a unit-testing application for the .NET language.

Zanebug 1.4 provides a simple to use interface, and supports advanced unit testing features (such as test iterations), in-depth error information, performance metrics, pass/fail stats, and built-in support for existing NUnit tests.

Visit Zanebug’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=26&lid=609]home page[/url].

Fitnesse 20040910 released

09.11.2004 · Posted in Tools

Micah Martin has announced a new release of FitNesse.

Among the changes made to the framework:

- Tons of improvements to the .NET FIT package.
- A new, debuggable TestRunner.
- New Spreadsheet capabilities.
- Authentication plugin capability.
- In-page anchor links.

Go to the FitNesse [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=6&lid=590]home page[/url].
Read the press release.

SQLUnit 4.0 released

09.09.2004 · Posted in Tools

SQLUnit is a regression and unit testing harness for testing database stored procedures. An 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.

Release 4.0:
- provides automatic sorting of resultsets by their natural order by default, and allows users to specify a non-default sort order if desired;
- contains changes to the set tag to allow non-scalar sets using an embedded SQL or stored procedure call;
- allows custom asserts by specifying an assert attribute in the test, diff and batchtest tags, and has a new suite of SQLUnit tests for Sybase ASA.

Visit SQLUnit’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=5&lid=561]home page[/url].

Unit Test Coverage tool Clover.NET 1.0 released

09.06.2004 · Posted in Tools

Last week, Cenqua announced the release of Clover.NET 1.0, a code coverage utility intended to provide feedback on the effectiveness of unit-testing in projects.

From the home page: "Developers and Team leads use Clover.NET to quickly find untested code and to measure testing completeness. This feeds back into the testing process to improve tests. Clover.NET does not just produce a set of figures which are hard to relate to your code. Clover.NET reports, published in HTML format, provide an accessible, easily navigable view of your source. These reports are easily understood, yet comprehansive. They can be shared with the development team or project management."

Clover.NET integrates with Visual Studio.

Visit Clover.Net’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=26&lid=534]home page[/url].

Cenqua also announced an update to Clover for Java, with the release of version 1.3.1, and updates to the [url=http://www.cenqua.com/forums/thread.jspa?threadID=1024&tstart=0]JBuilder[/url] and [url=http://www.cenqua.com/forums/thread.jspa?threadID=1025&tstart=0]IDEA[/url] plugins.
Visit Clover’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=175]home page[/url].
Read the announcement.

TestNG 1.0 released

09.02.2004 · Posted in Java

Cedric Beust has released the first version of TestNG.

From the release announcement:

"As a quick reminder, TestNG is a testing framework using annotations to provide a more powerful way to test your code in various ways: unit, regression, functional, integration, etc… TestNG allows you to clearly separate your Java code from the way your tests are run. You never need to recompile any of your classes if you decide to run a different set of tests or suites.

TestNG also provides a very flexible configuration mechanism allowing you to specify arbitrary methods to be invoked at particular moments during your test run, such as ‘before every test method’ or ‘after all the test methods have run’."

Visit TestNG’s [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=4&lid=380]home page[/url].

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.

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].

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.

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].

NUnit MSI moves unit-testing to the realm of package installers

08.21.2004 · Posted in Tools

"One of the things that’s irked me for quite some time is how, even in a mature TDD environment, the tests that are written never seem to make it past the integration server. Yet vast amounts of time gets spent tracing and fixing the differences between environments that cause glitches in execution. The time it takes to spot these errors and the fact that the installation of bad software has already occured makes it a bit like shutting the stable door after the horse has bolted. To me, it became apparent quite some time ago that tests shouldn’t just be a means of validating refactorings and amends locally, they should also be a first line of defence when it comes to deploying to and troubleshooting environments (security factors aside)."

JS Greenwood moves unit-testing to the realm of package installers. With [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=26&lid=558]NUnit MSI[/url], an application that sits in MSI installers as a custom action, you may now run your .Net tests as part of the installation package, and take action depending on whether tests pass.

NUnit 2.2 Final released

08.09.2004 · Posted in Tools

The final release of [url=http://www.testdriven.com/modules/mylinks/visit.php?cid=26&lid=107]NUnit[/url] 2.2 has just been made available.

Search testdriven.com’s [url=http://www.testdriven.com/search.php?query=nunit&mid=7&action=showall&andor=exact]list of NUnit-related resources[/url].

Automating mouse tests, and more

08.09.2004 · Posted in Tools

Elisabeth Hendrickson mentioned [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=13&lid=540]AutoIt[/url] some time ago, as a crafty tool to automate Windows GUI:

"I can call AutoIt from my .NET tests. So I can truly click on controls, thus answering the need to send mouse events to controls that don’t deign to offer a PerformClick method. And that means I am one step closer to being able to write all my GUI tests in the same language as the code."

AutoIt is an opensource BASIC-like scripting language designed for automating the Windows GUI. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks. Just released as version 3.0, AutoIt benefits from an active user group.

Jonathan de Halleux is now embarking on similar GUI automation features and unit test integration with [url=http://www.testdriven.com/modules/mylinks/singlelink.php?cid=4&lid=499]TestFu[/url]‘s Mouse Gestures.

ReSharper Add-In to Visual Studio.NET available

07.27.2004 · Posted in Tools

[img align=right]http://www.jetbrains.com/img/resharper1.gif[/img]ReSharper is an add-in for Microsoft Visual Studio .NET 2003 that brings intelligent C# coding assistance, real-time error highlighting, and refactoring features to this popular development platform.

ReSharper provides C# developers with many of the same powerful productivity-boosting capabilities that thousands of Java developers worldwide have come to rely on every day with IntelliJ IDEA.ReSharper provides:

- Syntax & Error Highlighting
- Error Quick-Fixes
- Refactoring
- Navigation

- Code Assistance
- Code Formatting
- Other Productivity Features

- Search
- Live Templates
- Code Generation
- Code Completion

Visit ReSharper’s home.
Download a 30-day evaluation of ReSharper.
View the list of features.

ReSharper is priced at $99 per user.

JDemo 1.0.3 released

07.05.2004 · Posted in Java

"One day in early 2003 I found myself writing a JUnit test method that was not really meant to be an automatic test, but rather a little piece of code making some kind of graphical output I was interested in. I was tempted to use the unit test approach because I already had some code for initializing my software library in a unit test. By adding a few lines like Thread.sleep(10000) and frame.show() to the test and starting the TestRunner I was able to test drive the program and evaluate its output."

JDemo provides a uniform and straightforward way for writing code snippets similar to unit testing code. The code snippets can be used to demonstrate both the code usage and the output of the program – either to the screen, to a file or just to System.out or System.err. Furthermore the demo code can be used for documentation purposes.The author has found several noteworthy uses of this type of framework (taken from the documentation page): API improvement, interactive testing (writing demos for GUI components enables developers to run the dialogs they are working on, without having to start the whole application), decoupled code (writing code snippets, only demonstrating a small piece of the code, requires a more modular code design), code documentation (simple code snippets are a valuable resource for documenting proper usage), easier library evaluation (uniform frameworks for writing and running demonstration code like with JDemo make it much easier for developers to find out whether the library fits their needs and how it must be used), reduced code duplication, automated documentation (each demo has a unique identifier that can be used to run the demo from within a build script to provide automatic captures).

JDemo also released plugins for Eclipse 2.1 and 3.0.

Visit JDemo’s home page.

JAM*Tester, tool for TDD teachers and students, made available

07.01.2004 · Posted in Java

Young student David Poll, under the guidance of his high school computer science teacher Dave Wittry, has developed JAM*Tester, a project to make JUnit testing more accessible to both teachers and students.

The resulting tool has just been made available.JAM*Tester (JUnit Auto-Matic Tester), in its Student Version, is an aid in the creation of JUnit TestCases, runs the tests, reports JUnit results, and provides some code-coverage reporting (parts courtesy of Clover). View the student demo.

With the Teacher Version of the tool, a teacher can create a battery of tests for their students’ labs, and then automatically compile and run the tests for all of their students at once. View the teacher demo.

"Since a teacher will be designing a test class anyway in order to grade their lab, he or she can give students a not-so-complete version of their test class that they can use to test their class before turning it in. Students just add it to their project and, using the student tool, run the tests [to] know if they are on the right track. But, of course, not a complete battery of tests is included in what the teacher would give them; they still go through the exercise of creating thorough test data."

JAM*Tester may be obtained from here.

Java tool EMMA provides coverage as a side effect of unit testing

06.29.2004 · Posted in Java

Vladrim Roubtsov, of Trilogy, has released EMMA, a code coverage tool for Java.

"EMMA’s mission is to move code coverage from an infrequent release gate (possibly run on a dedicated ‘coverage’ machine because the license is too expensive for the entire team) to the domain of agile testing and development (‘check coverage while still writing testcases and before you check code in’). Coupled with a very liberal license, EMMA is a tool that provides code coverage stats as an easy side effect of unit testing itself."Based on bytecode instrumentation, EMMA uses a fast bytecode processor (~2ms/class), and can do instrumentation incrementally or "on-the-fly", without a special preparation phase.

"EMMA is free/open source and at the same time coded from a commercial software developer’s point of view: it works in any (not just the latest and greatest beta from Sun) Java 2 runtime and scales to very large projects (the largest single instrumentation run so far covered 20000+ classes). It has no external dependencies and is not tied to any particular testing framework."

Visit EMMA’s home page, SourceForge Project page.
Read Trilogy’s press release.

POCMock for .Net releases version 3.0

06.24.2004 · Posted in Tools

Earlier this month, PrettyObjects released version 3.0 of its mocking tool, POCMock.

Rather than creating a subclass dynamically, POCMock creates a new module statically, i.e. it creates exactly the same module but with some or all the mocked classes.POCMock has three modes of generation:

- Normal mode: the class is not affected (it is copied as is in the mocked DLL);
- Mocked mode: the code is replaced by a validation in accordance with the test scenario (typical Mock technology);
- Verified mode: code is added before and after the normal code to allow for different uses (specified during test preparation).

And four types of uses: Normal, Mocked (validation of the call against the test scenario, returns simulated), Verified (validation of call against the test scenario, followed by normal execution), and Verified with results (validation of the call against the test scenario followed by normal execution and by validation of result calculated against the test scenario).

POCMock comes in Standard and Professional versions. The Standard version is freely available, but modules having 50 classes or more cannot be mocked.

NMock 1.1 released

06.18.2004 · Posted in Tools

NMock 1.1 is released and available for download from [url=https://sourceforge.net/project/showfiles.php?group_id=66591&package_id=64549]SourceForge[/url]

This release is produced using automated build 11 from CCNetLive.

The release contains numerous incremental bug fixes from the 1.0 release. If you are experiencing any problems with the download from sourceforge, it may be due to sourceforge’s mirroring process. If so, you can always retrieve the files from ccnetlive.