Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added text copied from 5.1 trunk (per TAP5-1217 "merge in documentation from trunk")

...

In order to unit test a page, you'll need to create an instance of PageTester. It acts as both the browser and the servlet container so that you can use it to drive your page. As it

The PageTester falls into a middle ground between pure unit testing and full-scale integration testing.

As the PageTester is not a real servlet container, you need to tell it the same information as you would in web.xml:

...

To submit a form by clicking a submit button, call the clickSubmit() method instead.

Unit testing a component

...