You are on page 1of 32

Web Application Testing

With Selenium
Kerry Buckley
What’s Selenium?

Created by Thoughtworks
Uses AJAX & magic
What’s Selenium?

• Web testing framework

Created by Thoughtworks
Uses AJAX & magic
What’s Selenium?

• Web testing framework


• Runs in a browser

Created by Thoughtworks
Uses AJAX & magic
What’s Selenium?

• Web testing framework


• Runs in a browser
• HTML & Javascript

Created by Thoughtworks
Uses AJAX & magic
What’s Selenium?

• Web testing framework


• Runs in a browser
• HTML & Javascript
• Open source

Created by Thoughtworks
Uses AJAX & magic
What’s Selenium?

• Web testing framework


• Runs in a browser
• HTML & Javascript
• Open source
• http://openqa.org/

Created by Thoughtworks
Uses AJAX & magic
Four Flavours
Four Flavours

• Selenium Core
Four Flavours

• Selenium Core
• Selenium IDE
Four Flavours

• Selenium Core
• Selenium IDE
• Selenium Remote Control (RC)
Four Flavours

• Selenium Core
• Selenium IDE
• Selenium Remote Control (RC)
• Selenium on Rails
Selenium Core

Browser

Application

Just HTML and Javascript, so can be installed in any web/app server.


Install at any convenient path, as long as it’s onthe same server (host & port).
Don’t deploy to live!
Selenium Core

Browser

Selenium Application

Just HTML and Javascript, so can be installed in any web/app server.


Install at any convenient path, as long as it’s onthe same server (host & port).
Don’t deploy to live!
Selenium Core

Browser

Selenium Application

Just HTML and Javascript, so can be installed in any web/app server.


Install at any convenient path, as long as it’s onthe same server (host & port).
Don’t deploy to live!
Selenium RC

Browser

Application

No need to change application.


Server launches, drives and kills browser(s).
Acts as proxy to get round same-source policy.
Selenium RC

Browser

Selenium
Application
Server

No need to change application.


Server launches, drives and kills browser(s).
Acts as proxy to get round same-source policy.
Selenium RC

Browser

Selenium
Application Tests
Server

No need to change application.


Server launches, drives and kills browser(s).
Acts as proxy to get round same-source policy.
Selenium RC

Browser

Selenium
Application Tests
Server

No need to change application.


Server launches, drives and kills browser(s).
Acts as proxy to get round same-source policy.
Selenium RC

Browser

Selenium
Application Tests
Server

No need to change application.


Server launches, drives and kills browser(s).
Acts as proxy to get round same-source policy.
Selenium IDE

Browser

Application

Firefox plugin. Single browser, but cross-platform.


Record, edit and playback.
Import/export various formats (HTML tables is default, like Selenium).
Selenium IDE

Selenium Browser

Application

Firefox plugin. Single browser, but cross-platform.


Record, edit and playback.
Import/export various formats (HTML tables is default, like Selenium).
Selenium IDE

Selenium Browser

Application

Firefox plugin. Single browser, but cross-platform.


Record, edit and playback.
Import/export various formats (HTML tables is default, like Selenium).
Selenium on Rails

Browser

Selenium Application

Only runs in test mode, so you don’t need to remove it to deploy.


Selenium on Rails

Browser

a il s
R c
a g i
M
Selenium Application

Only runs in test mode, so you don’t need to remove it to deploy.


Pros and Cons
Pros and Cons

• Runs using a real browser


Pros and Cons

• Runs using a real browser


• Cross-platform & cross-browser
Pros and Cons

• Runs using a real browser


• Cross-platform & cross-browser
• Language-agnostic
Pros and Cons

• Runs using a real browser


• Cross-platform & cross-browser
• Language-agnostic
• Hard to test across hosts or ports
Pros and Cons

• Runs using a real browser


• Cross-platform & cross-browser
• Language-agnostic
• Hard to test across hosts or ports
• including SSL/non-SSL
Demo