The Wicket framework is not TDD-friendly

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

The Wicket framework is somewhat deceptive when it comes to testing, especially TDD. The wicket tester is pretty good for integration tests. However, when trying to test individual components in a TDD manner, you’ll get bitten by the “final” keyword that appears quite frequently among the Wicket components. Mockito won’t help you, my favorite subclass-and-override technique cannot be applied. So, you’re on your own, implementing extra methods in order to get the component under test, which leads to frustration and lack of focus.


  • 1
    2009-03-31 - 06:56 | Permalink

    One pragmatic approach that lessen the execution time as a whole, is to add several assertions within the same wicket test method. Granted, you’ll break the recommendation that you should test one thing only in a test method.

  • 2
    2010-07-11 - 05:10 | Permalink

    To mock classes with “final” stuff the JMockit framework can be used.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.