RSS Feed for This PostCurrent Article

Java: Web Application Testing using jWebUnit

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");
}


Trackback URL


Sorry, comments for this entry are closed at this time.