selenium grid setup tutorial

Download Selenium Grid Setup Tutorial

If you can't read please download the document

Upload: testingbot

Post on 14-Apr-2017

339 views

Category:

Technology


0 download

TRANSCRIPT

Blue with Bottom Title

Selenium Grid Setup Tutorial

Selenium Grid:Selenium Hub

Selenium Nodes

A Selenium grid is a collection of browser nodes that are available for automated testing.

Selenium Hub

The Hub is responsible for (amongst other things):keeping track of the nodes in the grid

forward your tests to available Selenium nodes

With a Selenium Grid you can really shorten your total test-run time, resulting in shorter release-cycles

Selenium Hub Setup

Create a Linux VM

Install Java

Download Selenium Jar: http://docs.seleniumhq.org/download/

Start the hub:java -jar selenium-server-standalone-x.x.x.jar -role hub

Selenium Node

A Selenium Node connects to the hub to be part of the grid

A Selenium node runs the test on one of the browsers installed on the VM where the node is running

Selenium Node Setup

Set up your VM with the necessary browsers

Install Java

Start the node, pointing to the internal ip of the hubjava -jar selenium-server-standalone-x.x.x.jar -role node -hub http://hubip:4444/grid/register

Run a test on the Grid

Create a test and point it to the hub

Specify the browser on the node that needs to run the test

require "rubygems"require "selenium-webdriver"require "selenium/client"caps = {:browserName => "internet explorer",:version => "11"}
urlhub = "http://[IP_OF_THE_HUB_VM]/wd/hub"client = Selenium::WebDriver::Remote::Http::Default.newclient.timeout = 220@webdriver = Selenium::WebDriver.for :remote, :url => urlhub, :desired_capabilities => caps, :http_client => [email protected]_wait = 10 # [email protected] "http://www.google.com"puts @[email protected]_screenshot "google.png"@webdriver.quit

Selenium in the Cloud

DIY or use a Selenium Service provider?

TestingBot.com provides +500 browser combinations

No hassle to set everything up:Updating/Patching Vms

Install new browser versions

Hypervisors/Network/clean leftover test artifacts

TestingBot

Creates a video of every single run

Guarantees pristine VM for each test

Newest browser versions and mobile devices

Fast, simultaneous access to browsers

Competitive pricing and excellent support

Online Selenium Grid

Questions

Questions?