Testing Web Applications with Selenium & Selenium Remote Control

Gojko Adzic gojko@gojko.com http://gojko.net

Why should you care? Automate Web user interface tests  Verify functionality in different browsers on different platforms  Check periodically to see if the site is on-line and works correctly  .

 Opensource product  Actively developed and maintained by Thoughtworks  Download from OpenQA. Paul Gross and Jie Tina Wang. in 2004.Selenium in a nut-shell Javascript functional test runner  Started by Jason Huggins.org  .

. DOM or timing  Locate elements by name.  Tests are described as tables  .Selenese ± the language of Selenium Lots of different commands to manipulate DOM elements and verify text.. xpath. id.

openqa.org/ .Core http://selenium.Selenium .

org .Selenium .IDE     Firefox extension Record-replay Command reference save/export/load tests http://selenium-ide.openqa.

openqa.NET/Ruby etc Execute in multiple browsers. on remote machines Integrate into wider business tests and CI tools   http://selenium-rc.org .Selenium-RC  Automate Selenium tests from Java/.

openqa.Selenium Grid  Run tests on multiple machines in parallel Solves the biggest problem with Selenium. speed Supports EC2   http://selenium-grid.org .

CubicTest  Visual test management Eclipse-based Mocking up web sites based on test scripts   http://www.cubictest.com .

solutionsiq.com/ .StoryTestIQ   Wiki-based Mashup of Selenium and FitNesse Run SQL commands Integrate with CI tools   http://storytestiq.

WebTest fixtures  FitNesse fixtures for Selenium User-friendly language or direct selenium RC access Integrate Selenium in your business tests   http://www.info/webtest .fitnesse.

Domain specific testing language Agile 2008 presentation from Solutions IQ .

What's good?    Relatively easy to automate web UI tests Record/Replay for regression tests RC allows integration with CI and JUnit/FitNesse tests .

page abstractions as well) Data-backed tests are not easily repeatable (integrate with DB test engines)   . overnight) UI is brittle.What's bad?  Speed: RC->Browser communication is a speed bottleneck (run in grid. tests depending on the UI break a lot (DSTL might fix this.

Best practices    Use Selenium to verify workflow and session Don't use it to check business rules Don't put Selenium tests in your main development build ± run them overnight Have dedicated machines that run tests DON'T THINK OF THIS AS A REPLACEMENT FOR EXPLORATORY TESTING!!!   .

Wikipedia on chemical element Selenium .Although selenium is an essential trace element. it is toxic if taken in excess.

com http://www.com http://fitnesse.net http://www.Links  http://gojko.info/webtest      .com/agile2008/agile-2008-domain.openqa.cubictest.php http://storytestiq.solutionsiq.solutionsiq.org http://www.

NET applications with NServiceBus 17th December: Test driven development in .NET    . .Some important dates   18th September: Agile Acceptance Testing 25th September: Script #.NET response to Google Web Toolkit 23rd October: Dependency injection with Castle Windsor 27th November: Asynchronous enterprise .