Screencast of my Integration Testing and Fluent Builder presentation at Austin Code Camp 2009

I gave my first public presentation today at the Austin Code Camp. It was titled: “Big Picture Testing – Fluently building complex object graphs for integration tests”. I recorded it as a screencast and attached it below. Overall, I feel it went VERY well. I would be interested to hear what you think. I am opening the floor to constructive criticism. What could I have done better?

FYI, if you want to download the flv file directly, you can get it at:

Get Flash to see this player.


This entry was posted in Design, Fluency, Patterns, Presentations, Principles, Testing and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Hans
    Posted June 1, 2009 at 2:09 pm | Permalink

    Very useful presentation and congratulations with it. Talking to an audience about this stuff sure isn’t the same as casually talking to some friends, but you did great!

  2. Posted June 1, 2009 at 10:09 pm | Permalink

    Thanks Hans. I really enjoyed doing it. Can’t wait to do it again next year!


  3. Peter
    Posted June 4, 2009 at 12:38 pm | Permalink

    Thanks for your interesting and informative presentation. Haven’t got a chance to get your builder code to try things out, will try that in the future.

    some questions for you:
    – Like your idea of having test rolling back transactions, I’m not very familiar with nhibernate nor plan to switch for now, have you ever tried doing something similar in

    – we are currently predefining a set of xml serialized from objects for our tests, it’s not as flexible as fluent builder, but for now we believe as long as our code works with this set of input our product can ship, and we know out integration test is complete as long as our code tests every xml in this set. Have you tried this approach? If yes, what make you switch to fluent builder from this approach?

  4. GNW
    Posted September 7, 2009 at 5:15 am | Permalink

    Hi Chris,

    Thanks for posting the presentation for those who could not attend.

    Your fluentobjectbuilder library looks very useful indeed.

    What is the licence agreement on your library?


  5. Posted September 7, 2009 at 2:59 pm | Permalink

    First off, sorry it took so long for me to respond. I missed the notification of your reply… To answer your questions:

    Have I ever tried doing the same thing using ADO.NET? Yes. In fact, I have a separate framework I have written simply to insert the objects I have created using ADO. Since I only have to insert (no updates or deletes), its very simple and easy to configure. I will try to post more about that soon. I have even been using the FluentBuilders to create object for non-database tests. I find it really increases the readability of the tests, and keeps them very short. It also increases maintainability since the logic of how to build objects is encapsulated in one place. If that logic needs to change for a particular object, rather than changing every test that builds that object, you can change its builder and all the tests that use it will now work.

    Why would I use fluent builders over xml? There are a couple of reasons.

    At the top of the list is the readability of the code. With Xml, you must specify ALL the data you need for a specific test. While all that data is needed for the test to run, only a few pieces of data are directly related to the concern you are testing. You could care less about the values for the rest of the data, so long as it is valid data. That is what the fluent builders are designed for…to create anonymous data for everything you are not interested in and requiring you to specify only the things you are concerned with in a test.

    Next is maintanability. I have used xml in the past, and found it very hard to maintain. It involved a lot of copy and paste, or sharing of xml data. Both caused issues…with copy and paste, every time some data needed to change, I had to manually change every set of xml that was affected. This was very tedious and time consuming. When I tried to consolidate the xml to alleviate this tediousness, I would find myself breaking other tests when trying to modify the data a bit for a new test. I was constantly asking myself, “If I change this value for this test, will I break others? Or do I need to add yet another set of values to my xml for this scenario.” My xml data grew and grew and I wasn’t sure which values were related to which tests. When reading my tests, I would have to bounce back to my xml to check the values it was testing against. It was no less tedious than the copy and paste method. With the fluent builders, if I was testing some logic that handles orders over $150, I could just say “an.Order.withTotalOf( 151.00 );” and I get exactly that. I don’t have to specify the customer, other products or lineitems, or any other data..because I don’t care…it’s not relevant to the test.

    I hope this helps.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>