RSS Feed for This PostCurrent Article

Java: Web Application Testing using jWebUnit

Your Ad Here

This is another alternative to Selenium.

jWebUnit provides a high-level API for navigating a web application combined with a set of assertions to verify the application’s correctness. This includes navigation via links, form entry and submission, validation of table contents, and other typical business web application features.

image

Sample unit test written using jWebUnit

public void testMainPageLinks() {
       beginAt(“/mainPage”);
       assertLinkPresent(“addLink”);
       clickLink(“addLink”);
       assertTitleEquals(“Widget Add Page”);
       beginAt(“/mainPage”);
       assertLinkPresentWithText(“Edit Widget”);
       clickLinkWithText(“Edit Widget”);
       assertTitleEquals(“Widget Edit Page”);
}
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • StumbleUpon
  • Technorati


Trackback URL


RSS Feed for This PostPost a Comment