testdriven.com Wrangling quality out of chaos

Archive for October, 2005

rMock2.0.0 – a Java virtual mock framework, alpha 2 release

10.26.2005 · Posted in Java

We have just released the second alpha of a new Java virtual mocking framework called rMock, available here.

It is based upon the ideas of jMock and EasyMock, and combines what we feel is the best of the two frameworks. There are some differences in how the expectations are managed, and the long-term goals of the project are more radical.[font=Verdana]
Current features:
* Mocking of interfaces and objects
* Stubbing of objects with expectations as restrictions
* Setup expectations on the actual method of the mocked object to enable IDE supported refactoring, code completion and code creation.
* Expectation modification regarding
— arguments
— return value
— exception throwing
— call multiplicity
* A describable Expression/Constraint model supporting advanced asserts and error messages
* DynamicSuites that are flexibly configurable to include or exclude test classes depending on their runtime properties (no more include="**/Test*")
* Nestable ordered and unordered sections for grouping and ordering expectations with clear error messages

On the short-term feature list we have:
* Thread related testing tools
* Internal message bus for publisher-subsciber notifications of testing events
* Plugin-model to hook on to the message bus

On the longer term feature list we have:
* Using the test cases to
— Test-drive and generate correct and up-to-date code and documentation
— Test-drive and generate correct and up-to-date Swing/SWT/Web GUIs and their usage documentation
— Test-drive hardware configurations
— Test-drive deployment
— Generate correct and up-to-date hardware configuration and deployment documentation
[/font]

The background is that almost all relevant project information is reasonable to provide, or already available, in the test cases.

By providing means in the testing framework to utilize this information we believe that the project documentation can be generated from the test cases. This holds for everything from documenting the smallest piece of software up to acceptance testing a GUI or deploying to a global server farm.

Please, try it out and get back to us with any kind of feedback!

Best regards,
Ola Ellnestam on behalf of The rMock team

rMock: Java virtual Mock Object framework

10.26.2005 · Posted in Links

rMock 2.0.0 is a Java mock object framework to use with JUnit. rMock has support for a setup-modify-run-verify workflow when writing jUnit tests. It integrates better with IDE refactoring support and allows designing classes and interfaces in a true test-first fashion. rMock has the flexibility and power of jMock, while the recording of mock calls is influenced by EasyMock.
link

FunkLoad 1.2.0 is out

10.20.2005 · Posted in Tools

FunkLoad 1.2.0 is out.

About FunkLoad:

FunkLoad is a open source functional and load web tester, written in Python, whose main use cases are functional and regression testing of web projects, performance testing by loading the web application and monitoring your servers, load testing to expose bugs that do not surface in cursory testing, and stress testing to overwhelm the web application resources and test the application recoverability, and writing web agents by scripting any web repetitive task, like checking if a site is alive.Changes since 1.1.0:

* Credential and Monitor services have been refactored they are now true unix daemon service, controllers are now in pure python (no more bash scripts).

* Switching from distutils to setuptools using EasyInstall_, installing FunkLoad is now just a question of “sudo easy_install funkload“.

* Moving demo examples into the egg, just type “fl-install-demo“ to extract the demo folder

* Several bugs have been fixed.

More info here.

Grab it:

http://funkload.nuxeo.org/funkload-1.2.0.tar.gz
or
http://cheeseshop.python.org/pypi/funkload

Unit Testing Hibernate Mapping Configurations

10.17.2005 · Posted in Links

In the last few years, Hibernate has become one of the most popular Java open source frameworks available. However, developers don’t always remember that the mapping files that drive Hibernate’s behavior are as much a part of the program as the Java code. These files can contain defects, behave unexpectedly, and break when you change other parts of your system. In this article, I will show how you can use unit testing to assess the correctness of your Hibernate configuration. The article is a step-by-step approach that also explains some of the more common difficulties you may encounter while using Hibernate.

Author: Johannes Brodwall
Published: java.net, October 11, 2005
link

Article on TDD in the September issue of the IEEE Computer

10.14.2005 · Posted in News

There is an article on Test Driven Development in the September issue of the Computer magazine of the IEEE with some data on TDD research in the industry.

Research 1: controlled experiment, 3 companies, 24 programmers
Research 2: case study, 1 company, 9 programmers
Research 3: case study, 1 company, 9 programmers

Results – Quality – Productivity
Research 1 – 18% more test passed – TDD took 16% longer
Research 2 – 50% reduction in defect density – minimal change
Research 3 – 40% reduction in defect density – no changeIn two studies, programmers were new to TDD. As we see, TDD seems to improve quality without damage for productivity. The productivity gap for the first experiment is explained by the fact that the control group wrote far fewer tests than the TDD group.

References:
Research 1: B. Georges and L. Williams, "A Structured Experiment of Test-Driven Development", Information and Software Technology, vol. 46, no 5, pp. 337-342.
Research 2: E. Maximilien and L. Williams, "Assessing Test-Driven Development at IBM", Proceedings of the 25th International Conference on Software Engineering (ICSE 03), IEEE CS Press, 2003, pp. 564-569
Research 3: L. Williams, E. Maximilien and M. Vouk, "Test-Driven Development as a Defect-Reduction Practice", Proceedings of the 14th International Symposium on Software Reliability Engineering (ISSRE 03), IEEE CS Press, 2003, pp. 34-45

Source: David Janzen and Hossein Saiedian, "Test-Driven Development: Concepts, Taxonomy, and Future Direction", IEEE Computer, September 2005

Test Driven Development in Java – 2 days – London

10.13.2005 · Posted in Links

[img align=right]http://skillsmatter.com/images/system/logo.gif[/img]

Unit Testing and Refactoring for Agile Software Development

[img align=left]http://skillsmatter.com/images/misc/kevlinhenney.gif[/img]This highly practical 2-day Test Driven Development training course has been developed by Kevlin Henney, a regular columnist for various industry magazines and a well known and popular speaker on topics such OO Design, Patterns, Agile Development and Software architecture at conferences in Europe and North America.

This TDD course presents a number of modern agile practices for developing code based on an iterative and incremental development lifecycle. It introduces agility and predictability as two qualities essential to modern software development and offers a test driven iterative and incremental approach to achieve these qualities.

The TDD training is intended as a practical course: the best way to appreciate how test driven development works and what it feels like is to do it in practice, making sense of the principles it embodies. Throughout the training, delegates will work on the construction phase of the training project, where the design is grown and code delivered incrementally according to functionality or risk. Delegates will experience how unit testing provides confidence in existing code and supports the ability to refactor code as development unfolds.
link

Tags:

Test Driven Development in Java – Kevlin Henney presents on March 06 and 07

10.13.2005 · Posted in Training

Unit Testing and Refactoring for Agile Software Development

[img align=right]http://skillsmatter.com/images/system/logo.gif[/img]
Title: Test Driven Development in Java training
Start Date: 06/03
Duration: 2 days
Where: Skills Matter, Mayfair, London

[img align=left]http://skillsmatter.com/images/misc/kevlinhenney.gif[/img]
Kevlin Henney, a regular columnist for various industry magazines and a well known and popular speaker on topics such OO Design, Patterns, Agile Development and Software architecture at conferences in Europe and North America, will present this 2-day highly practical Test Driven Development training course on March 06 and 07 at Skills Matter in London.

Click here to register or to find out more informationThis Test Driven Development course presents a number of modern agile practices for developing code based on an iterative and incremental development lifecycle. It introduces agility and predictability as two qualities essential to modern software development and offers a test driven iterative and incremental approach to achieve these qualities.

The course is highly practical: the best way to appreciate how test driven development works and what it feels like is to do it in practice, making sense of the principles it embodies. Throughout the training, delegates will work on the construction phase of the training project, where the design is grown and code delivered incrementally according to functionality or risk. Delegates will experience how unit testing provides confidence in existing code and supports the ability to refactor code as development unfolds.

Click here to register or to find out more information.

Announcing TestNG 4.0

10.11.2005 · Posted in Java

The TestNG team is happy to announce the immediate availability of TestNG 4.0, with a lot of improvements and new features.

The announcement, along with a few examples and summary of the new features, can be found here.


Cédric
http://testng.org

Funkload 1.0: new Python-based functional+load testing framework released

10.03.2005 · Posted in Tools

FunkLoad 1.0 has been released.

FunkLoad is a functional and load web tester, written in Python, whose main use cases are:

– Functional testing of web projects and thus regression testing.
– Performance testing tool by loading the web application and monitoring your servers it helps you to pinpoint bottlenecks, giving a detail report of performance measurement.
– Load testing tool to expose bugs that do not surface in cursory testing, like volume testing or longevity testing.
– Stress testing tool to overwhelming the web application resources and test the application recoverability.
– Writing web agents by scripting any web repetitive task, like checking if a site is alive.Main FunkLoad features are:

– Functional tests are pure Python scripts using the pyUnit framework like normal unit tests. Python enable complex scenarios to handle real world app.
– Truly emulates a web browser (single-threaded) using Richard Jones’ Mechanical Cat WebUnit: basic authentication support; cookies support; fetching css, javascript and images; emulate a browser cache; file upload and multipart/form-data submission; https support.
– Advanced test runner with many command line options: set the target server url; display the fetched page in real time in your browser; debug mode; green/red color mode.
– Turn a functional test into a load test, just by invoking the bench runner you can identify scalability and performance problems.
– Detail bench report in ReST or HTML (PDF via ps2pdf) containing: bench configuration; tests, pages, requests stats and charts; 5 slowest requests; servers cpu usage, load average, memory/swap usage and network traffic charts; http error summary list.
– Easy test customization using configuration file or command line options.
– Easy test creation using TestMaker / maxq recorder, you can use your web browser and produce a FunkLoad test automatically.

– Provide web assertion helpers.
– Provide a funkload.CPSTestCase to ease Zope and Nuxeo CPS testing.
– Easy to use, see examples in the demo folder.

Funkload is free/open source software, available under the GPL license at funkload.nuxeo.org.

FunkLoad: functional and load web tester

10.03.2005 · Posted in Links

FunkLoad is a functional and load web tester, whose main use cases are: functional testing of web projects and thus regression testing, performance testing, load testing, stress testing. Funkload also allows writing web agents by scripting any web repetitive task, like checking if a site is alive.
link