![]() ![]() |
Philosophy behind the proxied UI |
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The use of test recorders in automation, is a concept that, of late has been advocated against by experts. Instead, they advice the use of scripting tests from the ground up. While recorders offer you a faster development time, scripting allows you to take full control of the application that you are trying to test. The latter obviously is a lot more tedious and time-consuming. WET allows you to take advantage of the best of both worlds. The following illustration will help understand the limitations of recorders, strength of scripting and the advanatage of using WET. |
![]() |
|
To elloborate on the points mentioned above:
There are inherent problems that are associated with this technique. To name a few:
To avoid this, experts advice to totally throw away recorders and use a pure scripted solution from the scratch. Although this is a great technique, it can become extremely tedious to do some of the preliminary tasks like mapping all the test objects. If this has to be done by the tester, then one would have to go into the source of the page (assuming AUT is a web application), identify each tag and then map them to some mnemonic name. Clearly this is a very tedious process. The WET Script assistant utility offers an innovative solution that lies somewhere in between. We call this as the 'proxied UI' technique. Please note that this is not the same as test recorders that use a http proxy to record the http messages being sent to and from the system under test. WET is a true enduser simulation testing tool and does not use http as the testing mechanism. The script assistant UI comes with the convenience of records, while it overcomes some of their limitations. Using this technique, a draft version of the automated scripts is created by executing the manual tests on a simulated browser. The simulated browser is a UI application that is similar to a web browser in its look and feel but works differently. Using this simulated browser you can connect to an IE browser that is already running on your system and recreate the view of the IE browser. The tester can then instruct this simulated browser to perform various operations – which is converted to test scripts. For example, imagine the same web page as the one discussed previously –
Observe the fundamental difference between this technique and the record-playback mechanism. In the record-playback mechanism, the recorder, based on the events, assumes that certain operations were performed and generates scripts accordingly. In the 'proxied UI' technique, the tester explicitly instructs which operations are to be recorded. The second advantage – Using the 'proxied UI' technique, there is a 'review' stage between the 'actual operation' and the 'intended operation'. The tester does not directly perform operations on the simulated browser. Instead, the tester first does a right-click and then chooses the operation. By virtue of this, the scripts generated are far more accurate when compared to a blind record-playback technique. All said and done, we do not want to make a claim that the scripts generated by the Wet script assistant are the final ready to use automation suite. Consider these as the skeletal drafts from which you can start building your test suite. To achieve a high degree of automation, you will have to take advantage of the advanced abilities provided by WET and powerful scripting abilities of Ruby (and thus WET). WET does not want to share the platform with those vendors who make the claim that using a script generation tool can instantly convert a novice user into a test automation engineer. We only want to try and achieve these:
To summarize, WET is one of those tools which offers the convenience of recorders, without compromising on the requirements of a true test automation tool – the ability to take control of the application by using a powerful scripting / programming ability. |
WET is a opensource automated web testing tool which uses Watir as the library to drive web pages. WET drives an IE Browser
directly and so the automated testing done using WET is equivalent to how a user would drive the web pages. WET extends the
scripting abilities of Watir and also offers the convenience of recorders. It is licensed under LGPL and BSD style open source licenses.
|