Mastering Test Automation: How To Use Selenium Successfully

SpringPeople
SpringPeopleSpringPeople
by Gururaj
Learn How To Use Selenium Successfully
In Conjunction With Other Tools
• We have INSTRUCTOR -LED - both Online LIVE & Classroom Session
 Present for classroom sessions in Bangalore & Delhi (NCR)
 We are the ONLY Education delivery partners for Mulesoft, Elastic, Pivotal & Lightbend in
India
 We have delivered more than 5000 trainings and have over 400 courses and a vast pool of
over 200 experts to make YOU the EXPERT!
 FOLLOW US ON SOCIAL MEDIA TO STAY UPDATED ON THE UPCOMING WEBINARS
Non-Certified Courses
…and many more
Certified Partners
• Selenium tool
• Write maintainable and reusable Selenium scripts
• Reporting Structure by using external plugin's
• Cross browser testing (Running selenium grid with Docker)
• UI layout test using Galen framework
• Maven– automation build tool
• Code repository (Git)
• Jenkins CI tool
Agenda
Mastering Test Automation: How To Use Selenium Successfully
Selenium
Selenium is the best open source tool for doing automation for web based
application and it does not have any cost attached to it. The only cost is the effort which
will go for designing and developing the script for the application.
Selenium scripting can be done in a number of programming languages like C#, Perl,
PHP, Ruby, Java etc, unlike other commercial tools which support single scripting
language. Since Selenium scripting can be done in any language of choice, one can easily
find right resources for the programming language chosen for Selenium Automation.
Last but not the least, since this tool comes at ZERO PRICE, an organization’s
management will find that the only investment they have made is on the infrastructure and
human effort and not on the heavy licensing cost.
IDE WebDriver Grid
 Selenium uses what is called locators to find and match the
elements of your page that it needs to interact with:
 Link
 XPath
 ID
 Name
 CSS
Locators
Add on's
Css selector helper
WebDriver Element Locator
Page object generator - Plugin
Selenium Page Object Generator is an essential tool
to improve your workflow. It will generate Page
Object Model on active Chrome tab with a single
click, provided that all the options and template are
configured. The generated Page Object Model will
be saved to pre-configured Chrome download folder.
It strives to reduce manual involvement, but manual
tweak still recommended
Sample file
Preferred selector order to locators ;
Preferred Order
ID Locator
NAME Locator
CSS Locator
XPATH Locator
 Thread.sleep
 Implicit Waits
 Explicit Waits
 FluentWait
Implicit waits :Once set, the implicit wait is set for the life of
the WebDriver object instance.
Explicit waits: An explicit waits is code you define to wait for
a certain condition to occur before proceeding further in the
code
Exception Handling
Expected Conditions
Because it's quite a common occurrence to have to synchronize the DOM and your
instructions, most clients also come with a set of predefined expected conditions. As
might be obvious by the name, they are conditions that are predefined for frequent
wait operations.
The conditions available in the different language bindings vary, but this is a non-
exhaustive list of a few:
alert is present
element exists
element is visible
title contains
title is
visible text
Expected Conditions
Expected Conditions
Because it's quite a common occurrence to have to synchronize the DOM and your
instructions, most clients also come with a set of predefined expected conditions. As
might be obvious by the name, they are conditions that are predefined for frequent wait
operations.
The conditions available in the different language bindings vary, but this is a non-
exhaustive list of a few:
alert is present
element exists
element is visible
title contains
title is
visible text
Expected Conditions
Sample code...
Problem : open Jquery component and try to get tooltip for the
textbox
Other Options
FluentWait instance defines the maximum amount of time to wait for a condition, as
well as the frequency with which to check the condition.
User may configure the wait to ignore specific types of exceptions whilst waiting, such
as NoSuchElementExceptions when searching for an element on the page.
// Waiting 30 seconds for an element to be present on the page, checking
// for its presence once every 5 seconds.
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
.withTimeout(30, SECONDS)
.pollingEvery(5, SECONDS)
.ignoring(NoSuchElementException.class);
WebElement foo = wait.until(new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver driver) {
return driver.findElement(By.id("foo"));
}
});
Fluent Waits
 Common functions or Keywords
 Click, Verify, Wait for Element, EnterText, SelectBox etc..
 Page Object Model / Factory
Reusability
Example
 Page Object Model is a design pattern to create Object Repository for web
 UI elements.
 Under this model, for each web page in the application there should be
corresponding page class.
 This Page class will find the WebElements of that web page and also contain page
methods which perform operations on those WebElements.
 Name of these methods should be given as per the task they are performing
Page Object Model
POM - Example
TestCases
Pages
Page Factory
Page Factory is an inbuilt page object model concept for Selenium WebDriver
@FindBy elements - use of @FindBy annotations. With this annotation, we can define a
strategy for looking up the element, along with the necessary information for identifying
it:
@FindBy can accept tagName, partialLinkText, name, linkText, id, css,
className, xpath as attributes.
Example
LoginPage = PageFactory.initElements(driver, LoginPagePOF.class);
}
@Test
public void test() {
LoginPage.LogIn_Action("guest", "guest");
System.out.println(" Login Successfully, now it is the time to Log Off buddy.");
}
Page Factory
Page Factory Class
To initialize WebElements
Page Factory - Project
Page Factory
TestNG classes
Test Data
Config
Utility Factory
Reports
Screen Shots
Logs
`
`
`
`
Generating reports is always challenge with Selenium, since it doesn't comes with
any reporting features. There are lot of plugin's available will see in action;
REPORTING
XSLT
Report NG
ATU Reports
Extent
<target name="xsltreports">
<mkdir dir="${basedir}/XSLT_Reports/output"/>
<xslt in="${ng.result}/testng-results.xml"
style="src/com/xslt/testng-results.xsl"
out="${basedir}/XSLT_Reports/output/index.html"
classpathref="classpath_jars" processor="SaxonLiaison">
<param name="testNgXslt.outputDir"
expression="${basedir}/XSLT_Reports/output/"/>
<param name="testNgXslt.showRuntimeTotals"
expression="true"/>
</xslt>
</target>
XSLT - Reporting
Create ANT task in build.xml file with target
Sample Report
ReportNG is a simple HTML reporting plug-in for the TestNGunit-testing
framework. It is intended as a replacement for the default TestNG HTML report.
The default report is comprehensive but is not so easy to understand at-a-glance.
ReportNG provides a simple, colour-coded view of the test results.
ReportNG generates 100% valid XHTML 1.0 files. The output can be customised
by over-riding the default stylesheet with your own CSS file.
ReportNG - Plugin
Sample Report
Very simple to use API
Beautiful and responsive UI
Provides dashboard for the entire run
Parallel execution of classes and methods supported
Creates a single report file, so less management of artifacts required (Online only*,
Offline
report stores all artifacts locally)
Separate section for categories, provides analysis of tests by category
Easily integrate test-runner logs
Can be customized heavily using an external config file
and this is developed by http://extentreports.relevantcodes.com
Extent Reports - Plugin
Very simple to use API
Beautiful and responsive UI
Provides dashboard for the entire run
Parallel execution of classes and methods supported
Creates a single report file, so less management of artifacts required (Online only*, Offline
report stores all artifacts locally)
Separate section for categories, provides analysis of tests by category
Easily integrate test-runner logs
Can be customized heavily using an external config file
and this is developed by http://extentreports.relevantcodes.com
Extent Reports - Plugin
Sample Report
ATU Reporter is free open source plugin/utility for Selenium. This will be a TestNG
listener for generating customized graphical reports. Following reports can be
generated by this listener.
Line Charts
Bar Charts
Pie Charts
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="false">
<test name="Test">
<classes>
<class name="com.test.AUTReporting.ReporterGoogleTest"/>
</classes>
</test>
<listeners>
<listener class-name="atu.testng.reports.listeners.ATUReportsListener"></listener>
<listener class-name="atu.testng.reports.listeners.ConfigurationListener"></listener>
<listener class-name="atu.testng.reports.listeners.MethodListener"></listener>
</listeners>
</suite>
ATU Reports - Plugin
Sample Report
Cross Browser Testing is a type of functional test to check that your web application
works as expected in different browsers.
Cross Browser Testing
CBT – With cloud
services
Running test on local machine with different OS with different combination of
browsers its always a challenge, either we need to get more machine and really on
selenium grid to solve the problem. Now without installing any OS or browser can we
run the selenium scripts on cloud, yes its possible with some of the cloud services like
Testing bot
Sauce lab
BrowserSTack.
public static final String KEY = "your key paste here";
public static final String SECRET = "your secret paste here";
public static final String URL = "http://" + KEY + ":" + SECRET + "@hub.testingbot.com/wd/hub";
public static void main(String[] args) throws IOException, InterruptedException {
// TODO Auto-generated method stub
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "WIN8");
caps.setCapability("version", "35");
caps.setCapability("browserName", "chrome");
// Remote web driver to register with testing bot key and secret, so that it will launch browser on these machines
driver = new RemoteWebDriver(new URL(URL), caps);
driver.get("https://timetracker.anuko.com/login.php");
Grid with Cloud Services
 In simple words, Docker – with use of linux-containers – allows you to
pack all your application dependencies, like database, system libraries
and so on, into standardized and portable units, called containers.
 You don’t need to ship entire OS to your CI or production server.
 We can manage this with containers with independent units.
Selenium Grid with Docker
Docker is a lightweight container (read: a scaled-down VM) that provides a fast and programmatic
way to run distributed applications. Selenium Grid is distributed system of nodes for running tests.
Instead of running your grid across multiple machines or VMs, you can run them all on a single
large machine using Docker.
`docker-selenium` project is about packaging selenium grid as docker containers
(https://github.com/seleniumhq/docker-selenium)
We don't have to build any selenium infrastructure machines. I just run the provided images by
docker-selenium project (https://hub.docker.com/r/selenium/).
We don't have to install selenium jar, java, browsers and other runtime dependencies. They are
already built in a docker image and I can just run them as either selenium grid with hub and nodes
or as standalone selenium on any docker engine enabled vm.
Docker
Setup
Create Docker images for your Selenium Grid hub and node(s)
Add Java to the hub to run the Selenium server jar
Add Java, plus Firefox and Xvfb to the node (Xvfb is an X server that can run on
machines with no display hardware and no physical input devices. It emulates a dumb
framebuffer using virtual memory.)
Create a docker-compose.yml file to define how the images will interact with each other
Start docker-compose and scale out to as many nodes as you need – or that your
machine can handle
http://www.conductor.com/nightlight/running-selenium-grid-using-docker-compose/
Steps for setup
Responsive Web design Testing
About Galen
Layout testing with GALEN
Responsive web design Testing
http://www.hangar17.in/en/responsive-webdesign
Pages should be readable on all resolutions
Text, Image alignment, controls
Color, shading, gradient consistency
What to Test
Selecting different set of devices for test
Frequent changes in requirements
Do emulators / simulators all the devices in the market
Tools
Applitools
Viewport Resize for Chrome
Galen
Challenges
Its open source
Build with Responsive Web design in Mind
Uses Selenium for web page interactions
Developed by : Ivan Subin
Galen Framework
How Galen Works
Sample Spec File
Test Report
Detailed Report
Maven – build automation tool
Maven – a build automation tool which is distributed under Apache Software
Foundation. It is mainly used for java projects. It makes build consistent with other
project.
Maven is used to manage the dependencies.
Maven provides pom.xml which is the core to any project.
Maven stores all project jars. Library jar are in place called repository which could
be central, local or remote repository.
<repositories>
<repository>
<id>libraryId</id>
<url>http://comanyrepositryId</url>
</repository>
</repositories>
Project example
Command to run → mvn clean test
Git – Code Repository
Git Hub is a Collaboration platform. It is built on top of git. It allows you to keep
both local and remote copies of your project. A project which you can publish it
among your team members as they can use it and update it from there itself.
Advantages :
Multiple people when they work on the same project they can update project
details and inform other team members simultaneously.
Jenkins can help us to regularly build the project from the remote repository
this helps us to keep track of failed builds.
Setup
Jenkins is the leading open-source continuous integration tool
developed by Hudson lab. It is cross-platform and can be used on
Windows, Linux, Mac OS and Solaris environments. It fires pre-
configured actions when a particular step occurs in jobs.
Jenkins
 Running Selenium tests in Jenkins allows you to run your tests every time
your software changes and deploy the software to a new environment
 Jenkins can schedule your tests to run at specific time.
 You can save the execution history and Test Reports.
 Jenkins supports Maven for building and testing a project in continuous
integration.
 Jenkins supports Docker plugin
Why – Jenkins and Selenium
Mastering Test Automation: How To Use Selenium Successfully
Docker - > http://blog.unicsolution.com/2015/07/scale-selenium-grid-in-5-seconds-with.html
Docker Conference : https://confengine.com/selenium-conf-2015/proposal/1365/docker-
selenium-getting-started
Galen : http://galenframework.com/
Extent Reporting : http://extentreports.relevantcodes.com
My Blog : http://gururajhm.blogspot.in/p/welcome.html
Selenium Git Hub : https://github.com/SeleniumHQ/selenium
Page object Model : http://martinfowler.com/bliki/PageObject.html
https://code.google.com/p/selenium/wiki/PageFactory
http://seleniumhq.github.io/selenium/docs/api/java/index.html
References
Mastering Test Automation: How To Use Selenium Successfully
1 sur 61

Recommandé

Continuous Delivery, Continuous Integration par
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
3.6K vues59 diapositives
Mobile UI Testing using Appium and Docker par
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMoataz Nabil
5.7K vues39 diapositives
Zalenium - How to run Selenium Script using Docker and Selenium Grid par
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridMoataz Nabil
3K vues26 diapositives
Continuous delivery applied par
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
2.9K vues57 diapositives
Continuous integration with Jenkins par
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with JenkinsMohammad Hossein Rimaz
406 vues28 diapositives
Continuous integration par
Continuous integrationContinuous integration
Continuous integrationamscanne
15.6K vues33 diapositives

Contenu connexe

Tendances

Improve Development Process with Open Source Software par
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Softwareelliando dias
663 vues22 diapositives
What is Jenkins | Jenkins Tutorial for Beginners | Edureka par
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaEdureka!
1.8K vues30 diapositives
Automate your build on Android with Jenkins par
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with JenkinsBeMyApp
2.3K vues28 diapositives
Test driven development_continuous_integration par
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integrationhaochenglee
3.6K vues91 diapositives
Jenkins CI par
Jenkins CIJenkins CI
Jenkins CIhaochenglee
28.1K vues63 diapositives
Continuous Integration at T3CON08 par
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08Sebastian Kurfürst
954 vues61 diapositives

Tendances(20)

Improve Development Process with Open Source Software par elliando dias
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Software
elliando dias663 vues
What is Jenkins | Jenkins Tutorial for Beginners | Edureka par Edureka!
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!1.8K vues
Automate your build on Android with Jenkins par BeMyApp
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
BeMyApp2.3K vues
Test driven development_continuous_integration par haochenglee
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integration
haochenglee3.6K vues
Continuous integration / deployment with Jenkins par cherryhillco
Continuous integration / deployment with JenkinsContinuous integration / deployment with Jenkins
Continuous integration / deployment with Jenkins
cherryhillco2.3K vues
2013 10-28 php ug presentation - ci using phing and hudson par Shreeniwas Iyer
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson
Shreeniwas Iyer3.3K vues
Continuous Testing using Shippable and Docker par Mukta Aphale
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
Mukta Aphale5.3K vues
Testing desktop apps with selenium par Filip Braun
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with selenium
Filip Braun2.3K vues
Story Testing Approach for Enterprise Applications using Selenium Framework par Oleksiy Rezchykov
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov3.8K vues
Continuous Integration, Build Pipelines and Continuous Deployment par Christopher Read
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
Christopher Read26.8K vues
Jenkins as the Test Reporting Framework par Nitin Sharma
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
Nitin Sharma1.9K vues
Docker в автоматизации тестирования par COMAQA.BY
Docker в автоматизации тестированияDocker в автоматизации тестирования
Docker в автоматизации тестирования
COMAQA.BY 936 vues
Continuous Integration (Jenkins/Hudson) par Dennys Hsieh
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh44.2K vues
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand par Troublemaker Khunpech
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Jenkins - From Continuous Integration to Continuous Delivery par Virendra Bhalothia
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
Virendra Bhalothia21.2K vues
Testing in DevOps world par Moataz Nabil
Testing in DevOps worldTesting in DevOps world
Testing in DevOps world
Moataz Nabil1.5K vues
Testing with Jenkins, Selenium and Continuous Deployment par Max Klymyshyn
Testing with Jenkins, Selenium and Continuous DeploymentTesting with Jenkins, Selenium and Continuous Deployment
Testing with Jenkins, Selenium and Continuous Deployment
Max Klymyshyn15.2K vues

Similaire à Mastering Test Automation: How To Use Selenium Successfully

Selenium-Webdriver With PHPUnit Automation test for Joomla CMS! par
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
2.6K vues36 diapositives
Stepin evening presented par
Stepin evening presentedStepin evening presented
Stepin evening presentedVijayan Reddy
946 vues25 diapositives
Automation - web testing with selenium par
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
1.2K vues44 diapositives
Selenium Automation Testing Interview Questions And Answers par
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersAjit Jadhav
1.1K vues213 diapositives
Good practices for debugging Selenium and Appium tests par
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsAbhijeet Vaikar
233 vues42 diapositives
Selenium par
SeleniumSelenium
SeleniumSun Technlogies
400 vues37 diapositives

Similaire à Mastering Test Automation: How To Use Selenium Successfully(20)

Selenium-Webdriver With PHPUnit Automation test for Joomla CMS! par Puneet Kala
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Puneet Kala2.6K vues
Automation - web testing with selenium par Tzirla Rozental
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental1.2K vues
Selenium Automation Testing Interview Questions And Answers par Ajit Jadhav
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav1.1K vues
Good practices for debugging Selenium and Appium tests par Abhijeet Vaikar
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar233 vues
Test Automation Framework Development Introduction par Ganuka Yashantha
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
Ganuka Yashantha1.2K vues
Manageable Robust Automated Ui Test par John.Jian.Fang
Manageable Robust Automated Ui TestManageable Robust Automated Ui Test
Manageable Robust Automated Ui Test
John.Jian.Fang631 vues
Automation with Selenium Presented by Quontra Solutions par Quontra Solutions
Automation with Selenium Presented by Quontra SolutionsAutomation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra Solutions
Sakai10 Selenium Workshop par coreyjack
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
coreyjack485 vues
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013 par Mack Hardy
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Mack Hardy8.1K vues
The Web on OSGi: Here's How par mrdon
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
mrdon8.3K vues
Pragmatic Parallels: Java and JavaScript par davejohnson
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
davejohnson1.2K vues
Selenium interview-questions-freshers par Naga Mani
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshers
Naga Mani347 vues
Selenium & PHPUnit made easy with Steward (Berlin, April 2017) par Ondřej Machulda
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Ondřej Machulda1.4K vues

Plus de SpringPeople

Growth hacking tips and tricks that you can try par
Growth hacking tips and tricks that you can tryGrowth hacking tips and tricks that you can try
Growth hacking tips and tricks that you can trySpringPeople
534 vues13 diapositives
Top Big data Analytics tools: Emerging trends and Best practices par
Top Big data Analytics tools: Emerging trends and Best practicesTop Big data Analytics tools: Emerging trends and Best practices
Top Big data Analytics tools: Emerging trends and Best practicesSpringPeople
1.9K vues14 diapositives
Introduction to Big Data par
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataSpringPeople
574 vues20 diapositives
Introduction to Microsoft Azure IaaS par
Introduction to Microsoft Azure IaaSIntroduction to Microsoft Azure IaaS
Introduction to Microsoft Azure IaaSSpringPeople
844 vues29 diapositives
Introduction to Selenium WebDriver par
Introduction to Selenium WebDriverIntroduction to Selenium WebDriver
Introduction to Selenium WebDriverSpringPeople
301 vues23 diapositives
Introduction to Open stack - An Overview par
Introduction to Open stack - An Overview Introduction to Open stack - An Overview
Introduction to Open stack - An Overview SpringPeople
241 vues23 diapositives

Plus de SpringPeople(20)

Growth hacking tips and tricks that you can try par SpringPeople
Growth hacking tips and tricks that you can tryGrowth hacking tips and tricks that you can try
Growth hacking tips and tricks that you can try
SpringPeople534 vues
Top Big data Analytics tools: Emerging trends and Best practices par SpringPeople
Top Big data Analytics tools: Emerging trends and Best practicesTop Big data Analytics tools: Emerging trends and Best practices
Top Big data Analytics tools: Emerging trends and Best practices
SpringPeople1.9K vues
Introduction to Microsoft Azure IaaS par SpringPeople
Introduction to Microsoft Azure IaaSIntroduction to Microsoft Azure IaaS
Introduction to Microsoft Azure IaaS
SpringPeople844 vues
Introduction to Selenium WebDriver par SpringPeople
Introduction to Selenium WebDriverIntroduction to Selenium WebDriver
Introduction to Selenium WebDriver
SpringPeople301 vues
Introduction to Open stack - An Overview par SpringPeople
Introduction to Open stack - An Overview Introduction to Open stack - An Overview
Introduction to Open stack - An Overview
SpringPeople241 vues
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ... par SpringPeople
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
SpringPeople544 vues
Why 2 million Developers depend on MuleSoft par SpringPeople
Why 2 million Developers depend on MuleSoftWhy 2 million Developers depend on MuleSoft
Why 2 million Developers depend on MuleSoft
SpringPeople137 vues
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials par SpringPeople
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
SpringPeople828 vues
An Introduction of Big data; Big data for beginners; Overview of Big Data; Bi... par SpringPeople
An Introduction of Big data; Big data for beginners; Overview of Big Data; Bi...An Introduction of Big data; Big data for beginners; Overview of Big Data; Bi...
An Introduction of Big data; Big data for beginners; Overview of Big Data; Bi...
SpringPeople338 vues
SpringPeople - Introduction to Cloud Computing par SpringPeople
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
SpringPeople252 vues
SpringPeople - Devops skills - Do you have what it takes? par SpringPeople
SpringPeople - Devops skills - Do you have what it takes?SpringPeople - Devops skills - Do you have what it takes?
SpringPeople - Devops skills - Do you have what it takes?
SpringPeople194 vues
Elastic - ELK, Logstash & Kibana par SpringPeople
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
SpringPeople3.5K vues
Hadoop data access layer v4.0 par SpringPeople
Hadoop data access layer v4.0Hadoop data access layer v4.0
Hadoop data access layer v4.0
SpringPeople1.3K vues
Introduction To Core Java - SpringPeople par SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
SpringPeople10K vues
Introduction To Hadoop Administration - SpringPeople par SpringPeople
Introduction To Hadoop Administration - SpringPeopleIntroduction To Hadoop Administration - SpringPeople
Introduction To Hadoop Administration - SpringPeople
SpringPeople4.8K vues
Introduction To Cloud Foundry - SpringPeople par SpringPeople
Introduction To Cloud Foundry - SpringPeopleIntroduction To Cloud Foundry - SpringPeople
Introduction To Cloud Foundry - SpringPeople
SpringPeople9.6K vues
Introduction To Spring Enterprise Integration - SpringPeople par SpringPeople
Introduction To Spring Enterprise Integration - SpringPeopleIntroduction To Spring Enterprise Integration - SpringPeople
Introduction To Spring Enterprise Integration - SpringPeople
SpringPeople7.2K vues
Introduction To Groovy And Grails - SpringPeople par SpringPeople
Introduction To Groovy And Grails - SpringPeopleIntroduction To Groovy And Grails - SpringPeople
Introduction To Groovy And Grails - SpringPeople
SpringPeople2.2K vues
Introduction To Jenkins - SpringPeople par SpringPeople
Introduction To Jenkins - SpringPeopleIntroduction To Jenkins - SpringPeople
Introduction To Jenkins - SpringPeople
SpringPeople6.6K vues

Dernier

Business Analyst Series 2023 - Week 4 Session 7 par
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
110 vues31 diapositives
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...ShapeBlue
69 vues29 diapositives
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue par
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
149 vues7 diapositives
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... par
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
121 vues15 diapositives
Microsoft Power Platform.pptx par
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptxUni Systems S.M.S.A.
74 vues38 diapositives
"Surviving highload with Node.js", Andrii Shumada par
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
49 vues29 diapositives

Dernier(20)

Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 vues
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue69 vues
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue par ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue149 vues
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... par ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 vues
"Surviving highload with Node.js", Andrii Shumada par Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 vues
NTGapps NTG LowCode Platform par Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu287 vues
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... par ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue74 vues
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue par ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 vues
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... par James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson142 vues
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ par ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue58 vues
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... par ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue97 vues
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... par ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue105 vues
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... par ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue114 vues
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue52 vues
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... par ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue128 vues
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive par Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Igniting Next Level Productivity with AI-Infused Data Integration Workflows par Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software373 vues
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... par ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue48 vues

Mastering Test Automation: How To Use Selenium Successfully

  • 1. by Gururaj Learn How To Use Selenium Successfully In Conjunction With Other Tools
  • 2. • We have INSTRUCTOR -LED - both Online LIVE & Classroom Session  Present for classroom sessions in Bangalore & Delhi (NCR)  We are the ONLY Education delivery partners for Mulesoft, Elastic, Pivotal & Lightbend in India  We have delivered more than 5000 trainings and have over 400 courses and a vast pool of over 200 experts to make YOU the EXPERT!  FOLLOW US ON SOCIAL MEDIA TO STAY UPDATED ON THE UPCOMING WEBINARS
  • 3. Non-Certified Courses …and many more Certified Partners
  • 4. • Selenium tool • Write maintainable and reusable Selenium scripts • Reporting Structure by using external plugin's • Cross browser testing (Running selenium grid with Docker) • UI layout test using Galen framework • Maven– automation build tool • Code repository (Git) • Jenkins CI tool Agenda
  • 6. Selenium Selenium is the best open source tool for doing automation for web based application and it does not have any cost attached to it. The only cost is the effort which will go for designing and developing the script for the application. Selenium scripting can be done in a number of programming languages like C#, Perl, PHP, Ruby, Java etc, unlike other commercial tools which support single scripting language. Since Selenium scripting can be done in any language of choice, one can easily find right resources for the programming language chosen for Selenium Automation. Last but not the least, since this tool comes at ZERO PRICE, an organization’s management will find that the only investment they have made is on the infrastructure and human effort and not on the heavy licensing cost. IDE WebDriver Grid
  • 7.  Selenium uses what is called locators to find and match the elements of your page that it needs to interact with:  Link  XPath  ID  Name  CSS Locators
  • 11. Page object generator - Plugin Selenium Page Object Generator is an essential tool to improve your workflow. It will generate Page Object Model on active Chrome tab with a single click, provided that all the options and template are configured. The generated Page Object Model will be saved to pre-configured Chrome download folder. It strives to reduce manual involvement, but manual tweak still recommended
  • 13. Preferred selector order to locators ; Preferred Order ID Locator NAME Locator CSS Locator XPATH Locator
  • 14.  Thread.sleep  Implicit Waits  Explicit Waits  FluentWait Implicit waits :Once set, the implicit wait is set for the life of the WebDriver object instance. Explicit waits: An explicit waits is code you define to wait for a certain condition to occur before proceeding further in the code Exception Handling
  • 15. Expected Conditions Because it's quite a common occurrence to have to synchronize the DOM and your instructions, most clients also come with a set of predefined expected conditions. As might be obvious by the name, they are conditions that are predefined for frequent wait operations. The conditions available in the different language bindings vary, but this is a non- exhaustive list of a few: alert is present element exists element is visible title contains title is visible text Expected Conditions
  • 16. Expected Conditions Because it's quite a common occurrence to have to synchronize the DOM and your instructions, most clients also come with a set of predefined expected conditions. As might be obvious by the name, they are conditions that are predefined for frequent wait operations. The conditions available in the different language bindings vary, but this is a non- exhaustive list of a few: alert is present element exists element is visible title contains title is visible text Expected Conditions
  • 17. Sample code... Problem : open Jquery component and try to get tooltip for the textbox
  • 19. FluentWait instance defines the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. User may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementExceptions when searching for an element on the page. // Waiting 30 seconds for an element to be present on the page, checking // for its presence once every 5 seconds. Wait<WebDriver> wait = new FluentWait<WebDriver>(driver) .withTimeout(30, SECONDS) .pollingEvery(5, SECONDS) .ignoring(NoSuchElementException.class); WebElement foo = wait.until(new Function<WebDriver, WebElement>() { public WebElement apply(WebDriver driver) { return driver.findElement(By.id("foo")); } }); Fluent Waits
  • 20.  Common functions or Keywords  Click, Verify, Wait for Element, EnterText, SelectBox etc..  Page Object Model / Factory Reusability
  • 22.  Page Object Model is a design pattern to create Object Repository for web  UI elements.  Under this model, for each web page in the application there should be corresponding page class.  This Page class will find the WebElements of that web page and also contain page methods which perform operations on those WebElements.  Name of these methods should be given as per the task they are performing Page Object Model
  • 24. Page Factory Page Factory is an inbuilt page object model concept for Selenium WebDriver @FindBy elements - use of @FindBy annotations. With this annotation, we can define a strategy for looking up the element, along with the necessary information for identifying it: @FindBy can accept tagName, partialLinkText, name, linkText, id, css, className, xpath as attributes.
  • 26. LoginPage = PageFactory.initElements(driver, LoginPagePOF.class); } @Test public void test() { LoginPage.LogIn_Action("guest", "guest"); System.out.println(" Login Successfully, now it is the time to Log Off buddy."); } Page Factory Page Factory Class To initialize WebElements
  • 27. Page Factory - Project Page Factory TestNG classes Test Data Config Utility Factory Reports Screen Shots Logs ` ` ` `
  • 28. Generating reports is always challenge with Selenium, since it doesn't comes with any reporting features. There are lot of plugin's available will see in action; REPORTING XSLT Report NG ATU Reports Extent
  • 29. <target name="xsltreports"> <mkdir dir="${basedir}/XSLT_Reports/output"/> <xslt in="${ng.result}/testng-results.xml" style="src/com/xslt/testng-results.xsl" out="${basedir}/XSLT_Reports/output/index.html" classpathref="classpath_jars" processor="SaxonLiaison"> <param name="testNgXslt.outputDir" expression="${basedir}/XSLT_Reports/output/"/> <param name="testNgXslt.showRuntimeTotals" expression="true"/> </xslt> </target> XSLT - Reporting Create ANT task in build.xml file with target
  • 31. ReportNG is a simple HTML reporting plug-in for the TestNGunit-testing framework. It is intended as a replacement for the default TestNG HTML report. The default report is comprehensive but is not so easy to understand at-a-glance. ReportNG provides a simple, colour-coded view of the test results. ReportNG generates 100% valid XHTML 1.0 files. The output can be customised by over-riding the default stylesheet with your own CSS file. ReportNG - Plugin
  • 33. Very simple to use API Beautiful and responsive UI Provides dashboard for the entire run Parallel execution of classes and methods supported Creates a single report file, so less management of artifacts required (Online only*, Offline report stores all artifacts locally) Separate section for categories, provides analysis of tests by category Easily integrate test-runner logs Can be customized heavily using an external config file and this is developed by http://extentreports.relevantcodes.com Extent Reports - Plugin
  • 34. Very simple to use API Beautiful and responsive UI Provides dashboard for the entire run Parallel execution of classes and methods supported Creates a single report file, so less management of artifacts required (Online only*, Offline report stores all artifacts locally) Separate section for categories, provides analysis of tests by category Easily integrate test-runner logs Can be customized heavily using an external config file and this is developed by http://extentreports.relevantcodes.com Extent Reports - Plugin
  • 36. ATU Reporter is free open source plugin/utility for Selenium. This will be a TestNG listener for generating customized graphical reports. Following reports can be generated by this listener. Line Charts Bar Charts Pie Charts <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite" parallel="false"> <test name="Test"> <classes> <class name="com.test.AUTReporting.ReporterGoogleTest"/> </classes> </test> <listeners> <listener class-name="atu.testng.reports.listeners.ATUReportsListener"></listener> <listener class-name="atu.testng.reports.listeners.ConfigurationListener"></listener> <listener class-name="atu.testng.reports.listeners.MethodListener"></listener> </listeners> </suite> ATU Reports - Plugin
  • 38. Cross Browser Testing is a type of functional test to check that your web application works as expected in different browsers. Cross Browser Testing
  • 39. CBT – With cloud services Running test on local machine with different OS with different combination of browsers its always a challenge, either we need to get more machine and really on selenium grid to solve the problem. Now without installing any OS or browser can we run the selenium scripts on cloud, yes its possible with some of the cloud services like Testing bot Sauce lab BrowserSTack. public static final String KEY = "your key paste here"; public static final String SECRET = "your secret paste here"; public static final String URL = "http://" + KEY + ":" + SECRET + "@hub.testingbot.com/wd/hub"; public static void main(String[] args) throws IOException, InterruptedException { // TODO Auto-generated method stub DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platform", "WIN8"); caps.setCapability("version", "35"); caps.setCapability("browserName", "chrome"); // Remote web driver to register with testing bot key and secret, so that it will launch browser on these machines driver = new RemoteWebDriver(new URL(URL), caps); driver.get("https://timetracker.anuko.com/login.php"); Grid with Cloud Services
  • 40.  In simple words, Docker – with use of linux-containers – allows you to pack all your application dependencies, like database, system libraries and so on, into standardized and portable units, called containers.  You don’t need to ship entire OS to your CI or production server.  We can manage this with containers with independent units. Selenium Grid with Docker
  • 41. Docker is a lightweight container (read: a scaled-down VM) that provides a fast and programmatic way to run distributed applications. Selenium Grid is distributed system of nodes for running tests. Instead of running your grid across multiple machines or VMs, you can run them all on a single large machine using Docker. `docker-selenium` project is about packaging selenium grid as docker containers (https://github.com/seleniumhq/docker-selenium) We don't have to build any selenium infrastructure machines. I just run the provided images by docker-selenium project (https://hub.docker.com/r/selenium/). We don't have to install selenium jar, java, browsers and other runtime dependencies. They are already built in a docker image and I can just run them as either selenium grid with hub and nodes or as standalone selenium on any docker engine enabled vm. Docker
  • 42. Setup
  • 43. Create Docker images for your Selenium Grid hub and node(s) Add Java to the hub to run the Selenium server jar Add Java, plus Firefox and Xvfb to the node (Xvfb is an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.) Create a docker-compose.yml file to define how the images will interact with each other Start docker-compose and scale out to as many nodes as you need – or that your machine can handle http://www.conductor.com/nightlight/running-selenium-grid-using-docker-compose/ Steps for setup
  • 44. Responsive Web design Testing About Galen Layout testing with GALEN
  • 45. Responsive web design Testing http://www.hangar17.in/en/responsive-webdesign
  • 46. Pages should be readable on all resolutions Text, Image alignment, controls Color, shading, gradient consistency What to Test
  • 47. Selecting different set of devices for test Frequent changes in requirements Do emulators / simulators all the devices in the market Tools Applitools Viewport Resize for Chrome Galen Challenges
  • 48. Its open source Build with Responsive Web design in Mind Uses Selenium for web page interactions Developed by : Ivan Subin Galen Framework
  • 53. Maven – build automation tool Maven – a build automation tool which is distributed under Apache Software Foundation. It is mainly used for java projects. It makes build consistent with other project. Maven is used to manage the dependencies. Maven provides pom.xml which is the core to any project. Maven stores all project jars. Library jar are in place called repository which could be central, local or remote repository. <repositories> <repository> <id>libraryId</id> <url>http://comanyrepositryId</url> </repository> </repositories>
  • 54. Project example Command to run → mvn clean test
  • 55. Git – Code Repository Git Hub is a Collaboration platform. It is built on top of git. It allows you to keep both local and remote copies of your project. A project which you can publish it among your team members as they can use it and update it from there itself. Advantages : Multiple people when they work on the same project they can update project details and inform other team members simultaneously. Jenkins can help us to regularly build the project from the remote repository this helps us to keep track of failed builds.
  • 56. Setup
  • 57. Jenkins is the leading open-source continuous integration tool developed by Hudson lab. It is cross-platform and can be used on Windows, Linux, Mac OS and Solaris environments. It fires pre- configured actions when a particular step occurs in jobs. Jenkins
  • 58.  Running Selenium tests in Jenkins allows you to run your tests every time your software changes and deploy the software to a new environment  Jenkins can schedule your tests to run at specific time.  You can save the execution history and Test Reports.  Jenkins supports Maven for building and testing a project in continuous integration.  Jenkins supports Docker plugin Why – Jenkins and Selenium
  • 60. Docker - > http://blog.unicsolution.com/2015/07/scale-selenium-grid-in-5-seconds-with.html Docker Conference : https://confengine.com/selenium-conf-2015/proposal/1365/docker- selenium-getting-started Galen : http://galenframework.com/ Extent Reporting : http://extentreports.relevantcodes.com My Blog : http://gururajhm.blogspot.in/p/welcome.html Selenium Git Hub : https://github.com/SeleniumHQ/selenium Page object Model : http://martinfowler.com/bliki/PageObject.html https://code.google.com/p/selenium/wiki/PageFactory http://seleniumhq.github.io/selenium/docs/api/java/index.html References