Top 10 Mistakes in Unit Testing

In this session we review the top 10 ways you can cause unit testing to fail to work for your project. From readability problems and lack of trust to mock object abuse and semi-integration testing – these gotchas can save you lots of time, sweat, and tears on your current and next projects.


Get Microsoft Silverlight

Download video in other formats and slides

3 Comments

  1. admin

    Hello “Fred”. Thanks for being nice with me ;o) It would be better if everybody use the same technology, but in the meantime if you don’t have or want to use Silverlight, please note that you can download this video in the mp4 format on the page that you can reach with the link below the video.

  2. I really enjoyed your presentation. Just a quick comment on integration tests : a setup that I regularly use for integration testing with databases is to use an in-memory database (like HSQLDB) and to use software that automatically populates my database with XML-specified data before each test suite / each test / each test class / each test method.

    A regular set-up for me when doing integration tests would be Spring Test + Hibernate + TestNG + DBUnit. This set-up fires up the database before running the integration tests, makes sure that the database is populated with the data I specify via very simple XML files (and this is done at whatever level I choose – i.e. test suite, test, test class, test method) then stops the data when the tests are done.

    This means :
    – no schema dropping before tests, just a simple clear of the tables
    – instant access to data as HSQLDB is an in-memory DB
    – each test runs with a known database fixture
    – no need to write code to populate the database – everything is done with annotations

    Yes, true, this is a Java set-up but I’m pretty sure that one could find the same setup in the .NET world. If not, then implement one maybe ?

    Cheers !

Comments are closed.