API / Apache Wicket Interview questions
What is WicketTester?
WicketTester is the framework's built-in utility for writing unit and integration tests against Wicket pages and components without deploying to a real servlet container or spinning up a browser.
It simulates the request cycle in memory: tester.startPage(MyPage.class) renders a page as if a browser had requested it, and assertion helpers like tester.assertRenderedPage(), tester.assertLabel(), or tester.assertVisible() check the resulting component tree and markup directly. It can also simulate user interaction — tester.clickLink(), tester.newFormTester() to fill in and submit a form — which triggers the same onClick()/onSubmit() code paths a real click or submission would.
Because it runs entirely in-process, tests using WicketTester execute fast enough to be part of a normal unit test suite (typically with JUnit), rather than requiring the slower setup of full browser-based end-to-end testing for basic component behavior.
More Related questions...