SlideShare a Scribd company logo
1 of 19
Consulting
Services
Application
Development
Technology
Integration
Demo with Selenium WebDriver &
Jenkins as Integration Server
Brindusa Gamaniata
Paul Brodner
Selenium WebDriver
◦ Introduction
◦ Installation details
◦ IDE & test environment configuration
◦ Demo
Jenkins
◦ Introduction
◦ Configuration Setup
◦ Selenium WebDriver test integration with Jenkins
◦ Second approach (Selenium WebDriver, Jenkins &
Ruby)
2
No, I’m not referring to the chemical element:
Is an open source framework
Provides a set of different tools for test
automation
◦ Selenium IDE
◦ Selenium Grid
◦ Selenium 1 (Selenium RC or Selenium Remote Control)
◦ Selenium 2 (Selenium WebDriver)
3
2. Install Java1. Download Selenium
Selenium Client Drivers
◦ http://seleniumhq.org/downl
oad or
◦ https://code.google.com/p/s
elenium/
Download Java libraries
(.jar files)
Download Java JDK from
the following location:
◦ http://www.oracle.com/tech
network/java/javase/downlo
ads/index.html
2. Add Home to Path1. Download Ant
Download Apache Ant
◦ http://mirrors.hostingromani
a.ro/apache.org//ant/binarie
s/apache-ant-1.9.1-bin.zip
◦ Ant is the abbreviation for
Another Neat Tool ☺☺☺☺
Add environment variables
◦ set ANT_HOME=C:apache-ant-1.9.1
◦ set JAVA_HOME=C:jdk1.6.0_24
◦ set PATH=%ANT_HOME%bin;
%JAVA_HOME%bin
2. New Project1. Download Eclipse
Download Eclipse IDE for
Java Developers
◦ http://www.eclipse.org/dow
nloads/index-helios.php
Create a new project
◦ File>New>Project
1. Locate the element on the page using Firebug or
Developers Tools
7
2. Choose how you will identify the element
• By id
selenium.findElement(By.id (“search”));
• By xpath
• Locate the element using his attributes
selenium.findElement(By.xpath (“//input[@id=‘search’]”));
• Locate the element using the previous element. This is useful when we have multiple
elements with the same attributes
selenium.findElement(By.xpath (“//fieldset/span/input[@id=‘search’]”));
3. Interact with the element
By searchLocator = By.xpath( “//fieldset//input[@id=‘search’]”);
WebElement searchInput = selenium.findElement(searchLocator);
String searchedText = “testing”;
searchInput.sendKeys(searchedText);
8
We can use assert methods:
◦ assertEquals(expected, actual);
◦ assertTrue(actual);
◦ assertFalse(actual);
◦ assertNull(actual);
◦ assertNotNull(actual);
Related to our previous example
String actualText = searchInput.getText()
assertEquals(“testing”, actualText);
9
10
DEMODEMODEMODEMO
((((WebDriverWebDriverWebDriverWebDriver ---- Java approach)Java approach)Java approach)Java approach)
Pickels ?
◦ Based on Cucumber http://cukes.info/ (Making BDD fun)
◦ Watir (Web Application Testing in Ruby) http://watir.com/
◦ and other useful libraries all in one package
11
How to use it ?
◦ You must know Ruby language
◦ You can have access to Watir Api documentation
http://wtr.rubyforge.org/rdoc/1.6.5/
◦ Learn using the example provided by pickels
◦ You will create tests using Model based approach
12
Demo
13
Continuous Integration Server
Automate a specific task
Self test a specific build after commit
Maintain a build history of test results
Easy to configure and extend (using plugins)
Supports Revision Controls tools (Subversion, Git,
Perforce)
Much more https://wiki.jenkins-
ci.org/display/JENKINS/Meet+Jenkins
14
2. Open the Interface1. Download Jenkins
Download Jenkins native
packages
◦ Windows, Linux, Mac
(http://jenkins-ci.org/)
Open in browser
◦ localhost:8080
4. Create Job3. Install Plugins
Install you plugins
◦ http://localhost:8080/plugin
Manager/?
◦ Manage Jenkins -> Plugin
Manager
Plugins examples:
◦ Ant
◦ Subversion
◦ Cucumber Reports
◦ AnsiColor
New Job – Test ISTC Demo
17
DEMODEMODEMODEMO
(Jenkins)(Jenkins)(Jenkins)(Jenkins)
http://docs.seleniumhq.org/docs/03_webdriver.jsp
http://code.google.com/p/selenium/wiki/GettingSt
arted
http://ant.apache.org/manual/using.html
https://wiki.jenkins-
ci.org/display/JENKINS/Meet+Jenkins
http://jenkins-ci.org/
http://wtr.rubyforge.org/rdoc/1.6.5/
18
19
Thanks for watching!Thanks for watching!Thanks for watching!Thanks for watching!

More Related Content

What's hot

Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
Nick Belhomme
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
COMAQA.BY
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
Adam Christian
 

What's hot (20)

Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
 
Automated android testing using jenkins ci
Automated android testing using jenkins ciAutomated android testing using jenkins ci
Automated android testing using jenkins ci
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkins
 
Run Selenium Tests With Jenkins and BrowseEmAll
Run Selenium Tests With Jenkins and BrowseEmAllRun Selenium Tests With Jenkins and BrowseEmAll
Run Selenium Tests With Jenkins and BrowseEmAll
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
 
Jenkins
JenkinsJenkins
Jenkins
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
 
JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!JavaScript + Jenkins = Winning!
JavaScript + Jenkins = Winning!
 
Selenoid: browsers in containers
Selenoid: browsers in containersSelenoid: browsers in containers
Selenoid: browsers in containers
 
Controlling the browser through python and selenium
Controlling the browser through python and seleniumControlling the browser through python and selenium
Controlling the browser through python and selenium
 

Similar to Automation Testing

Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
Er. Sndp Srda
 

Similar to Automation Testing (20)

Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousa
 
Selenium Webdriver
Selenium WebdriverSelenium Webdriver
Selenium Webdriver
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
 
Selenium Testing with TestingBot.com
Selenium Testing with TestingBot.comSelenium Testing with TestingBot.com
Selenium Testing with TestingBot.com
 
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdfTop 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
 
Selenium interview questions and answers
Selenium interview questions and answersSelenium interview questions and answers
Selenium interview questions and answers
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
 
Experienced Selenium Interview questions
Experienced Selenium Interview questionsExperienced Selenium Interview questions
Experienced Selenium Interview questions
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Gilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion ChallengesGilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion Challenges
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Automation Testing

  • 1. Consulting Services Application Development Technology Integration Demo with Selenium WebDriver & Jenkins as Integration Server Brindusa Gamaniata Paul Brodner
  • 2. Selenium WebDriver ◦ Introduction ◦ Installation details ◦ IDE & test environment configuration ◦ Demo Jenkins ◦ Introduction ◦ Configuration Setup ◦ Selenium WebDriver test integration with Jenkins ◦ Second approach (Selenium WebDriver, Jenkins & Ruby) 2
  • 3. No, I’m not referring to the chemical element: Is an open source framework Provides a set of different tools for test automation ◦ Selenium IDE ◦ Selenium Grid ◦ Selenium 1 (Selenium RC or Selenium Remote Control) ◦ Selenium 2 (Selenium WebDriver) 3
  • 4. 2. Install Java1. Download Selenium Selenium Client Drivers ◦ http://seleniumhq.org/downl oad or ◦ https://code.google.com/p/s elenium/ Download Java libraries (.jar files) Download Java JDK from the following location: ◦ http://www.oracle.com/tech network/java/javase/downlo ads/index.html
  • 5. 2. Add Home to Path1. Download Ant Download Apache Ant ◦ http://mirrors.hostingromani a.ro/apache.org//ant/binarie s/apache-ant-1.9.1-bin.zip ◦ Ant is the abbreviation for Another Neat Tool ☺☺☺☺ Add environment variables ◦ set ANT_HOME=C:apache-ant-1.9.1 ◦ set JAVA_HOME=C:jdk1.6.0_24 ◦ set PATH=%ANT_HOME%bin; %JAVA_HOME%bin
  • 6. 2. New Project1. Download Eclipse Download Eclipse IDE for Java Developers ◦ http://www.eclipse.org/dow nloads/index-helios.php Create a new project ◦ File>New>Project
  • 7. 1. Locate the element on the page using Firebug or Developers Tools 7
  • 8. 2. Choose how you will identify the element • By id selenium.findElement(By.id (“search”)); • By xpath • Locate the element using his attributes selenium.findElement(By.xpath (“//input[@id=‘search’]”)); • Locate the element using the previous element. This is useful when we have multiple elements with the same attributes selenium.findElement(By.xpath (“//fieldset/span/input[@id=‘search’]”)); 3. Interact with the element By searchLocator = By.xpath( “//fieldset//input[@id=‘search’]”); WebElement searchInput = selenium.findElement(searchLocator); String searchedText = “testing”; searchInput.sendKeys(searchedText); 8
  • 9. We can use assert methods: ◦ assertEquals(expected, actual); ◦ assertTrue(actual); ◦ assertFalse(actual); ◦ assertNull(actual); ◦ assertNotNull(actual); Related to our previous example String actualText = searchInput.getText() assertEquals(“testing”, actualText); 9
  • 10. 10 DEMODEMODEMODEMO ((((WebDriverWebDriverWebDriverWebDriver ---- Java approach)Java approach)Java approach)Java approach)
  • 11. Pickels ? ◦ Based on Cucumber http://cukes.info/ (Making BDD fun) ◦ Watir (Web Application Testing in Ruby) http://watir.com/ ◦ and other useful libraries all in one package 11
  • 12. How to use it ? ◦ You must know Ruby language ◦ You can have access to Watir Api documentation http://wtr.rubyforge.org/rdoc/1.6.5/ ◦ Learn using the example provided by pickels ◦ You will create tests using Model based approach 12
  • 14. Continuous Integration Server Automate a specific task Self test a specific build after commit Maintain a build history of test results Easy to configure and extend (using plugins) Supports Revision Controls tools (Subversion, Git, Perforce) Much more https://wiki.jenkins- ci.org/display/JENKINS/Meet+Jenkins 14
  • 15. 2. Open the Interface1. Download Jenkins Download Jenkins native packages ◦ Windows, Linux, Mac (http://jenkins-ci.org/) Open in browser ◦ localhost:8080
  • 16. 4. Create Job3. Install Plugins Install you plugins ◦ http://localhost:8080/plugin Manager/? ◦ Manage Jenkins -> Plugin Manager Plugins examples: ◦ Ant ◦ Subversion ◦ Cucumber Reports ◦ AnsiColor New Job – Test ISTC Demo
  • 19. 19 Thanks for watching!Thanks for watching!Thanks for watching!Thanks for watching!