End-to-end unit testing for Wicket pages supporting AJAX

You can use Wicket Page Test to unit test Wicket pages easily:

  1. You call the library to launch Jetty to run your webapp in-process and launch the Selenium client.
  2. You inject POJO mock service objects into @SpringBean annotated fields. This way, your pages won't need to, say, hit the database and thus you're really unit testing the pages.
  3. You use the Selenium client to test drive your page: check the HTML DOM element as rendered in the browser, click the links, check the result again and etc.

Here is an example.

  • No labels