Java: Web Application Testing using jWebUnit
By admin on Aug 6, 2008 in Java, open source
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.
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”);
}
Post a Comment