Reputation: 13
Using Selenium RC I am planing for creating an automation testing framework for our Java web-application.... please share some way like how to create framework ...which things is important in framework.....
Thanks in advance -Ravi
Upvotes: 1
Views: 2067
Reputation: 4078
There are a few key factors that would greatly increase the maintainability, speed, and general usability of your tests but none are more important than abstracting your element locators out of your tests and into a central repository. I've heard of many ways of doing that but the best option I've seen is using the Page Object pattern. Essentially, each page becomes a java class, with properties representing the elements you want to use. Because you only define this page once in your PageObject and not in your many tests, if you ever need to change an element locator, there's only one place to do it.
Selenium 2 has a wonderful PageObject Factory built in but you can't use that because you want to use Selenium RC. Fortunately The Automated Tester, David Burns, has an excellent article on using Page Objects in C#, it should be close enough to get you started. http://www.theautomatedtester.co.uk/tutorials/selenium/page-object-pattern.htm For more on the Selenium 2 / WebDriver page object implementation see teh Selenium Google Code Wiki http://code.google.com/p/selenium/wiki/PageObjects
Some other really important factors to consider
Upvotes: 6