Professional Documents
Culture Documents
Selenium in a nut-shell
Javascript functional test runner Started by Jason Huggins, Paul Gross and Jie Tina Wang, in 2004. Opensource product Actively developed and maintained by Thoughtworks Download from OpenQA.org
Lots of different commands to manipulate DOM elements and verify text, DOM or timing Locate elements by name, id, xpath... Tests are described as tables
Selenium - Core
http://selenium.openqa.org/
Selenium - IDE
http://selenium-ide.openqa.org
Selenium-RC
Automate Selenium tests from Java/.NET/Ruby etc Execute in multiple browsers, on remote machines Integrate into wider business tests and CI tools
http://selenium-rc.openqa.org
Selenium Grid
Run tests on multiple machines in parallel Solves the biggest problem with Selenium, speed Supports EC2
http://selenium-grid.openqa.org
CubicTest
Visual test management Eclipse-based Mocking up web sites based on test scripts
http://www.cubictest.com
StoryTestIQ
Wiki-based Mashup of Selenium and FitNesse Run SQL commands Integrate with CI tools
http://storytestiq.solutionsiq.com/
WebTest fixtures
FitNesse fixtures for Selenium User-friendly language or direct selenium RC access Integrate Selenium in your business tests
http://www.fitnesse.info/webtest
What's good?
Relatively easy to automate web UI tests Record/Replay for regression tests RC allows integration with CI and JUnit/FitNesse tests
What's bad?
Speed: RC->Browser communication is a speed bottleneck (run in grid, overnight) UI is brittle, tests depending on the UI break a lot (DSTL might fix this, page abstractions as well) Data-backed tests are not easily repeatable (integrate with DB test engines)
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!!!
Links
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 .NET applications with NServiceBus 17th December: Test driven development in .NET