[Ilugc] web testing

  • From: y.jyothirao@xxxxxxxxx (Jyothi)
  • Date: Mon Aug 4 18:06:19 2008

Dear Friends,

    There are many automated tools for testing web front end.   
One such is 'Selenium Remote Controller'  which can be used for 
testing web front end. 

How it works :
    -> There should be a selenium server running ( built in java )
    Selenium API's can be used to communicated with the selenium server 
through selenium client.
    -> We should write the client script to communicate with the selenium 
server. This client can be written in Perl/PHP/java/C/Ruby/ and may 
be many more. Selenium provides client drivers(wrappers) for the 
above languages.

How to do :
    -> download 'Selenium RC controller' which will contain the server 
files and client drivers.
    -> execute ' java -jar selenium-server.jar'.  (ensure that java is 
installed and PATH variable set appropriately )
    -> The above command will start the selenium server.  This will 
act as a proxy server in the configurable port '4444' .
    -> Change the proxy settings of your browser to 'localhost' with 
port '4444'.
    -> Then execute your client script.

Selenium IDE:
    Instead of going through the selenium server and client scripts, 
there is another simple method which can be used to do testing.  
'Selenium IDE' is a firefox add-on which can be downloaded as a firefox 
extension. 

After installing the IDE, Open the page that you want to test.
Open Tools->Selenium IDE. 
Then do whatever work that you wanted to do in the web page.
After completing all the works, click 'stop recording' button in the Selenium 
IDE.

We can either save that test case and edit/execute it whenever required.
Selenium IDE also gives provision to get the source code for that testing 
in the desired language ( Perl/PHP/Java/Ruby/..)
We can take that source code, find the commands that we want and write a more
sophisticated client script for testing.
This will be very useful for us to easily selenium client scripts
Reference : http://selenium-rc.openqa.org/tutorial.html

Hope someone finds it useful

Thanks,
Jyothi


Other related posts: