In this presentation filmed during QCon London 2007, Nat Pryce and Steve Freeman talk about TDD using Mock Objects. In their opinion, Mock Objects improves the software design and makes the code more easier to maintain and adapt to changing requirements.
In his 'Ode To Code' K Scott Allen offers rational for the use of mock objects when unit testing and discusses his thoughts on the use of mock object frameworks.
Service simulation (mocking) – the ability to mimic service behavior even before they are implemented - enables service consumer developers and testers to parallelize their efforts without having to wait for service implementation to complete. Service simulation also provides a light-weight alternative to building expensive reference environments.
The ease of Ruby for scripting tasks makes it a very powerful candidate for writing your Test suites. Until recently there was no real standalone framework to test your Java with Ruby. JtestR, written by Ola Blini (a member of JRuby team) and Anda Abramovici, makes it possible now. Ruby coupled with powerful Ruby tools such as RSpec, mocha will make writing Java tests smoother.
There has been an interesting discussion in the blogosphere about the benefits or lack of benefits from using Dependency Injection. The question is — does Dependency Injection really pay off?
A new InfoQ article looks at evaluating performance in an iterative and continuous manner.
The latest version of the very popular mocking framework, Rhino Mocks version 3.3 is complete and ready to be used by your tests. This release provides many new features including Remoting Proxies and more.
One of the earliest techniques for writing tests using TDD did not use mocks and stubs, but used the actual business objects instead. By creating a set of factories that instantiated, composed, and executed methods on business objects, real objects, in a non-initial-state of their lifecycle, could be created for testing purposes. The name coined for this pattern was ObjectMother.
Popular Rails community member Kevin Olbrich published a couple of interesting and useful articles on his blog about Rails testing strategies.