Candibiotic
News Update :

Selenium Tutorial / Configuration

Monday, March 16, 2009

Probably the fastest, hassle free , less resource intensive testing tool. No need for special training - learning curve is smooth .
Why am I advocating the use of SELENIUM ?
Situation :
Team follows agile methodology. Weekly iteration - means we deliver one module every weekend (lump of work - module).
Time based pricing of modules {If I don`t deliver , I don`t get paid :( } .
Do you think team has enough time to deliver quality code in a weekly iteration , and this time includes TESTING , you are right - Functional Testing .

How did we achieve it : SELENIUM was the answer .

http://www.openqa.org/selenium/

Using selenium is easy in terms of installation and execution.

ttp://www.openqa.org/selenium/

Using selenium is easy in terms of installation and execution.

How do I configure Selenium ?

1) Install the latest version of Firefox preferabby 1.5

2) Go to Tools, click on Extensions, click on Find more extensions and

Download the Selenium IDE for Firefox from

https://addons.mozilla.org/en-US/firefox/addon/2079

3) Restart the browser.

4) Start the application that needs to be tested or the steps to be recorded in Firefox browser.

5) Go to tools, there you can see the Selenium IDE , click on the red button to start recording the steps and save the tests after recording.

opy the html contents and save as html file, example xyz.html

So far we have seen the recording of test... how do I automate it, i don`t have time to run the tests manually,

setting up Selenium Server

http://www.openqa.org/selenium-rc/download.action

Download the latest release (0.9.0)

Extract the files , the selenium-server.jar file will be in the path

../ selenium-remote-control-0.9.0/server

Extract the contents to a folder named selenium-server

Edit the C:\selenium-server\core\TestPrompt.html

Test Suite:

value="./start/selenium-server/tests/placemantTests/TestSuit.html"

Here value is the path where the TestSuit.html and other TestCases are located

Creating the Test Suit :
Check out the following location :
C:\selenium-server\tests\TestSuite.html

Running the test case using the test suit :

D:\selenium-remote-control-0.9.0\server>java -jar selenium-server.jar -port 9999 -timeout 50000 -htmlSuite *firefox http://localhost:8080 C:/selenium-server/core/start/selenium-server/tests/subs/TestSuit.html c:/results.html -multiwindow

Thats it, you are done.

Another way to configure in your build system :

D:\SeleniumTestProject\trunk\pom.xml needs to be modified to integrate the seleneium server.

Add the following in the pom.xml in the profiles tag

Share this Article on :

0 comments:

Post a Comment

 

© Copyright Vinayak Wins 2010 -2011 | Design by Herdiansyah Hamzah | Published by Borneo Templates | Powered by Blogger.com.