SELENIUM GRID AND JENKINS Outline Why Selenium Grid

  • Slides: 23
Download presentation
SELENIUM GRID AND JENKINS

SELENIUM GRID AND JENKINS

Outline � � � � Why Selenium Grid Features / Components of Grid Node

Outline � � � � Why Selenium Grid Features / Components of Grid Node and Grid Hub Why we thought of Selenium Grid Jenkins plug-in for selenium How to write tests – test design Working example

What is Selenium Grid � Usual Selenium Setup

What is Selenium Grid � Usual Selenium Setup

Issues ? � RC (Remote Control) is quite slow. � Takes a lot of

Issues ? � RC (Remote Control) is quite slow. � Takes a lot of time to complete all your test suits • Not suitable for large scale testing � Can run a limited number of concurrent tests. � About six browsers On same RC

Work around. .

Work around. .

Work around… � Multiple RC’s to avoid the limitation on # of parallel tests.

Work around… � Multiple RC’s to avoid the limitation on # of parallel tests. � Issues: � Test needs to be aware of the RC being used. � Have to maintain a series of RC’s.

Solution : Selenium Grid � All your components � All Can be in different

Solution : Selenium Grid � All your components � All Can be in different machines. . All of them can communicate using selenese. �

Selenium Grid � A Distributed grid of RC’s. � Main two components � �

Selenium Grid � A Distributed grid of RC’s. � Main two components � � • Grid Hub Grid Nodes Grid Hub � Allocates RC’s for tests � Keeps an eye on test sessions � Entry point for all your tests � Load balances test requests to the RC’s.

� Grid Node � It is configured and started using a command. � Provide

� Grid Node � It is configured and started using a command. � Provide all your capabilities in the command. browser. Type Version Platform – i. e. Windows, linux, Cent. OS application. Name – a specific name for your node.

Grid Node � � � Capabilities are the unique attributes for a node. Selenium

Grid Node � � � Capabilities are the unique attributes for a node. Selenium Grid code uses “Desired. Capabilities” This capability object is passed into Remote. Web. Driver instance

Selenium Grid Console � It shows you all the connected grid clients(nodes)

Selenium Grid Console � It shows you all the connected grid clients(nodes)

More features � Supports parallel execution � We need to write our test to

More features � Supports parallel execution � We need to write our test to execute in parallel. � Use Junit 4 Parallel. Computer features.

Features. . • Supports Selenium Web. Driver / Remote Web. Driver • Grid 2.

Features. . • Supports Selenium Web. Driver / Remote Web. Driver • Grid 2. 0 is the latest, more features with it. • Easy to start the Grid Hub as well as the node.

Why we thought of Using Selenium � Our product has a GWT (Google web

Why we thought of Using Selenium � Our product has a GWT (Google web tool kit) based front end. Complex user scenarios involved. � Big , distributed team working on features. � Usual scrum team, a single tester � � No enough time to do end – end UI tests.

Why we thought of Selenium Grid � Different platforms to support � Windows/IE 9

Why we thought of Selenium Grid � Different platforms to support � Windows/IE 9 � XP/IE 8 � Cent. OS/FF � 64 bit/ 32 bit machine combinations. � Limited time and Need to execute all in one shot. “Grid allows multiple environments and parallel executions…. ”

Selenium Grid in Jenkins � Jenkins is a CI server. � Why Jenkins ?

Selenium Grid in Jenkins � Jenkins is a CI server. � Why Jenkins ? � � � Our code base is huge. Needs to ensure clean builds. It has lot of plugins. Its free and open Jenkins has a plug-in for selenium grid � � � Easy installation. Selenium grid is executed within the Jenkins server. You can start grid node by pointing to this grid url. With your desired capabilities.

Jenkins JOB

Jenkins JOB

Jenkins Selenium Plugin

Jenkins Selenium Plugin

How we write Tests

How we write Tests

Our Demo Setup

Our Demo Setup

Demo. . � Show time. .

Demo. . � Show time. .