12 August 2009
Book: The Worst is Over
We've been silent for a while, getting on with writing.
The news is that we're done with copy editing and now it's into the presentation work such as formatting, proofing, and indexing. We're even up on Amazon, although our editor says that we should be out before November.
Labels: book, growing object-oriented software, news
11 June 2009
Using Mocks and Tests to Design Role-Based Objects
Isaiah Perumalla has had a paper published by MSDN. They trimmed it a bit, so we're hosting the original here.
Labels: news, publications
21 May 2009
Another update to the book
Labels: book, growing object-oriented software, news
27 March 2009
Book. More chapters posted
Labels: book, growing object-oriented software, news
13 December 2008
googlemock
Google have just announced googlemock, their C++ mocking framework. More details at http://code.google.com/p/googlemock/. It looks like they've done a lot of work.
Labels: mocks in action, news
05 June 2008
Public training courses?
We've had a couple of inquiries about whether we will be running our training course publicly. We hadn't planned to, but perhaps we should. We propose to run a two-day course priced at £1100 if booked less than 4 weeks ahead of the teach date, with a discount to £800 if booked earlier (plus UK VAT). The most obvious location is London (UK).
If you think you might be interested (no commitment implied), please drop us an email at public.course@mockobjects.com with this information:
Name: London is acceptable: Preferred other location: Preferred month for teach date: Possible number of attendees: Coding experience (years): TDD experience (years): Contact email: Contact phone:
We'll see if we can work something out
In case you're feeling nervous, whatever details we receive will be used only by us just to coordinate a course. We won't hassle you or pass them on to anyone else.
Labels: jmock, junit4, news, training
30 May 2008
Talk at London Geek Night.
Nat and I gave a talk at the most recent London Geek Night. It was an introduction to our approach to Test-Driven Development, incidentally making the point that some of the state- vs. interaction-based TDD wars are a bit specious; it's a matter of picking the right tool for the job. We had a good crowd and some useful questions. Afterwards, there was a Code Dojo in which Nat took part while I got stuck at the back talking to people. Thanks again to our hosts for an interesting evening.
We've uploaded the slides with notes. The format's a little odd because we used the toolchain we use for our courses, but the material's all there.
There are couple of other relevant links. Nils Haugen has a nice talk he did on Improving Test Maintainability, which is about making sure the tests make sense. Our interest is more in the stage after that, which is about listening to what the tests are telling you about the design of your code.
23 May 2008
Learn from the source!
Nat, Romilly Cocking, and I are now open for business for training. We have a course on Test-Driven Development that reflects nearly a decade of experience writing tests first (that's 30 years in parallel). We also have significant experience in training, Romilly has a couple of decades on his own, and Nat and I have taught commercially and at two of the top CS departments in the country.
The course teaches the practice of Test-Driven Development, based on a solid understanding of Object-Oriented design, and with a strong emphasis on making tests expressive and maintainable. We also make a point of exploring how unit tests can be used to drive the design of the code, not just protect it.
The content is modular, so we can adjust it to match the needs of the participants. The full-length course is three busy days, and we've taught versions that are a half-day and whole-day long.
We teach the course using jUnit4, Hamcrest, and (of course) jMock2. Talk to us if you want something different.
For more information, contact us at: training@mockobjects.com
Here's what some attendees liked about the course:
“The practical exposure to a better way of testing”
“Practical lab work, real-world concrete examples, Expert lecturers!”
“Chance to make mistakes and learn. Exposure to new technology.”
“A very good whole picture view of TDD and mocks”
“Interaction and explanation of course materials particularly through the exercises.”
Labels: jmock, junit4, news, training
12 February 2008
New Tutorial at QCon
Labels: news
21 November 2007
MockObjects in Bangalore
I'll be presenting a tutorial/workshop/Dojo on TDD with Mock Objects at Agile India in Bangalore this Sunday. I hope the locals will find the material interesting (and that they give me an easy ride while I struggle with the jet lag :).
Labels: news
19 October 2007
"Testing towards A Specification: A Systematic Approach"
Peter Dimov has published his Master's thesis. To quote him:
It is based on Test Driven Development with Mock Objects, hence the focus is on interaction-based testing. I'm introducing the mocking framework CalitkoMocks, which is specially designed to provide a notation for writing tests that can be mapped one-to-one to sequence diagrams. Sequence diagrams are classically used to specify object-oriented software systems, however, it is obvious that just a bunch of diagrams representing individual cases cannot really be regarded as a specification. To address this point, I'm also presenting a few test refactorings which help to extract test scenarios (i.e. generalized test cases), which are more suitable to use as a specification.
He's implemented a mock framework for C++ that's part of Calitko
I especially liked his closing remark
After I drew the diagram corresponding to my test, I decided to try to write a test corresponding one-to-one to the sequence diagram. The sequence diagram showed the calls to my stub objects but my test didn’t (because the implementation invoked them implicitly). I ended up writing smarter versions of my stubs which eventually evolved into mocks. Though I had already read about mocks at that time, I didn’t quite get it what kind of beasts these were. It was only after I reinvented the mock that I truly understood the concept.
Perhaps this is a step on the way to addressing Jason Gorman's concerns.
Labels: design, mocks in action, news, specification
16 October 2007
XpDay London 19/20 November
23 August 2007
GTAC. Google Test Automation Conference
I'm at Google's Test Automation Conference in New York City (my old stamping ground from the '80's) and so far Mocks have been doing quite well. We had several mentions on his slides from Patric Copeland (Director of QA at Google).
There was also a presentation from Matt Heuser and Sean McMillan, "Examining Interaction-Based testing". I admit I feared a hatchet job but, actually, they presented a very balanced view. They had some good examples of Interaction Testing gone wrong, such as mocking out production code and not writing integration tests. They also pointed out the benefits of using TDD with mocks, including ending up with good code quality statistics implying good maintainability.
The one comment I had on the talk was to de-emphasise use of mocks to speed up unit test runs by mocking external (slow) resources. Our preference is to use mocks within our domain code but to try to write focussed integration tests at the outer boundaries of the system.
Labels: news
15 June 2007
Making a point in IEEE Software
We've had a position published (with Joshua Kerievsky on the other side) in the May/June issue of IEEE Software. To quote the abstract:
Point Argument: Mock Objects: Find Out Who Your Friends Are, by Steve Freeman and Nat Pryce. Mock objects help guide object-oriented programming by concentrating on what objects do, no what they are. Counterpoint Argument: TDD: Don't Much It Up with Too Many Mocks, by Joshua Kerievsky. Routinely test-driving code with mock objects leads to premature object composition, hard-to-read and fragile code, and lost time. This department is part of a special issue on test-driven development.It looks like you have to pay (or get a copy of the magazine) to get the content. I'll ask if we can post our chunk. (thanks to the people who pointed out that you can download a different issue of the journal).
Labels: news
21 May 2007
Apache Camel
Labels: domain-specific-language, news
01 April 2007
Announcing the commons.testing and commons.mocking APIs
For many years years JUnit was the only framework that Java programmers could use for writing tests. However, Java now has a plethora of test frameworks to choose from, JUnit 3, JUnit 4 and TestNG being the three most popular. Likewise for mock objects developers can choose between jMock 1, jMock 2 or EasyMock.
This variety is a problem if you need to run tests that have been written for different frameworks or write tests that need to be run in different frameworks.
To solve this we will soon release two new projects, commons.testing and commons.mocking, which will provide a common, framework-agnostic API for writing tests and using mock objects. Developers will be able to write to a single API and then select a test framework and mock object library to execute the tests at runtime by annotating their tests with the commons.testing annotations, writing a few dozen lines of XML configuration, setting system property and calling the CommonsTestingDOMConfigurator in each test fixture set-up. The commons.testing and commons.mocking frameworks will run be able to run the tests with JUnit 3, JUnit 4 or TestNG and, if you use mock objects, jMock 1, jMock 2 or EasyMock, with no change to the test code at all! The APIs are extensible: by writing to the commons.testing SPI you can add support for more testing or mocking frameworks.
Furthermore, commons.testing can run tests that are defined entirely by XML configuration files instead of complex Java code. This will enable IT departments to greatly reduce the cost of pair programming and test driven development by having lower-cost, non-technical staff author the test cases that specify what the developers must implement in Java.
Watch this space for further annnouncements...
Update: Looks like similar things are happening in the .Net world. See this announcement of an Enterprise Mocking Block.To the person who posted a comment, we have to admit that this was an April Fools proposal
28 March 2007
jMock 2.0.0 RC1 released
21 February 2007
Conferences coming up
- Steve Freeman and Nat Pryce be giving a talking about how tests should "Mock Roles, Not Objects" at QCon in London on 16th March
- Andy Pols, Romilly Cocking and Nat Pryce will be running a tutorial on Test Driven Development with JMock2 at the SPA Conference in Cambridge on 26th March
- Wendy Friedlander and Oksana Udovitska will be talking about "Testing in C# with RhinoMocks" at CodeCamp NYC on March 3rd.
Labels: news
30 January 2007
Archive links fixed
Labels: news
© The authors
