Hi,

One of the main drawback of selenium test is maintainability. With recent
G-Reg UI changes we have experienced the same maintainability problem. Even
though the UI change was very simple one, all test got failed as it change
the xpath of sign-out link.

In order to eliminate and reduce the cost of UI test maintenability, we
have introduced page object model into System test framework (Clarity). A
page is a object oriented class that works as an interface to a page of the
application under test. The benefit of page class is that whenever the UI
changes, you don't need to change test classes. Only the code within page
classes need to be changed.

Also central location to maintain all UI elements have been introduced
(mapper.properities file). This will ensure easy modification when
identifier or path to UI elements changed. And you can have more meaningful
names for each UI element.

You can find example code at [1]. Please make sure to follow these patterns
when writing UI tests in future.

Thanks,
Krishantha.

[1]
https://svn.wso2.org/repos/wso2/carbon/platform/trunk/platform-integration/system-test-framework/tools/selenium/org.wso2.automation.selenium.integration/src/test/java/org/wso2/carbon/automation/selenium/test/greg/GRegLoginSeleniumTest.java
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to