Sridevi Pinjala, IBM
Once upon a time, the average life for automation scripts that were recorded and played back was till the new user interface replaced the old one or till the ID’s were changed during subtle application face lift. This kind of change is expected seldom once every 5 or 7 years or frequently with every build.
Major functionality additions, minor bug fixes, elusive changes to improve the response time, etc. all require the testers to spend a lot of time in regression testing. Build verification and predictable functional tests can rely heavily on automated testing to complete the task. Automated test scripts type in fields, click on buttons, click and wait on links, select from drop down lists, verify texts, logos, images present, compare strings of text or results.
There is a simple way to create UI/GUI repository in selenium IDE. There is a way all the UI/GUI elements can be named in English (my favorite language). Any changes to the IDs can be tracked and updated and the scripts do not have to be modified or tweaked individually ever again.
Typically tools that have a repository map such as TestComplete, Quick Test Professional, Rational Functional Tester, etc. collect and store all the GUI elements in the object repository map. When the DOM (document object model) or the HTML ID name or other properties of an element change in an application, this change could be managed / updated via the object repository map.
Automation tools such as Selenium IDE rely on the HTML ID attribute of the UI (User Interface) and GUI (graphical User Interface) to recognize an element. They do not have object repository maps to store all the UI and GUI elements. If the HTML ID changed for any reason, the script death is inevitable. To keep up with the changes and to avoid script death, each and every script has to be changed.
The reason this concept is named after the super hero Green Lantern is – Each Green Lantern possess a power ring and power lantern that gives the user great control over the physical world as long as the wielder has sufficient will power and strength to wield it (http://en.wikipedia.org/wiki/Green_Lantern).
Plus the scripts are green. We do not need to modify the code or change all the scripts that utilize a particular element whose properties change constantly. We automation test suite developers can control the longevity of our scripts by creating them with appropriate standards. Our standards and conventions are only as good as our ideas. Just like the super Green Lantern creates objects with his will power.