SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Cloud Browser Testing
with Gradle and Geb
David M. Carr; June 12 2014
Cloud Browser Testing
• Each browser has behavioral quirks
• Often the same page will behave differently in different
browsers (Chrome, FireFox, Safari, Internet Explorer)
• Some behaviors will vary based on the browser version
or operating system
• Test all of them!
• But that’s a lot of work… cloud services to the rescue
Sauce Labs/BrowserStack
• Services that provide access to VM-based browsers
on demand
• Provide support for secure tunneling to test apps
within your firewall
• Easy to test lots of browser/version/OS combinations
• https://saucelabs.com
• https://www.browserstack.com
Geb
• Library for browser automation in Groovy
• Powered by WebDriver
• Often used with Spock/JUnit/TestNG
• www.gebish.org
Geb Config
BrowserStackDriverFactory
• Sets up a connection to the cloud service with a browser configuration
• «browser»:«operating system»:«version»
def browserStackBrowser = System.getProperty("geb.browserstack.browser")
if (browserStackBrowser) {
driver = {
def username = System.getenv("GEB_BROWSERSTACK_USERNAME")
def accessKey = System.getenv("GEB_BROWSERSTACK_AUTHKEY")
new BrowserStackDriverFactory().create(browserStackBrowser, username, accessKey)
}
}
SauceLabsDriverFactory is very similar
Gradle Config
Gradle geb-browserstack Plugin
• Open manages secure tunnel for local testing
• Configures tasks for different browser specifications
• Example: firefoxMac19Test, chromeMacTest, internetExplorerWindows9Test... and
allBrowserStackTests
apply plugin: "geb-browserstack"
buildscript {
repositories { mavenCentral() }
dependencies { classpath ‘org.gebish:geb-gradle:@geb-version@' }
}
browserStack {
application 'http://localhost:8080'
browsers {
firefox_mac_19
chrome_mac
internetExplorer_windows_9
}
task {
testClassesDir = test.testClassesDir
testSrcDirs = test.testSrcDirs
classpath = test.classpath
}
account {
username = System.getenv(BrowserStackAccount.USER_ENV_VAR)
accessKey = System.getenv(BrowserStackAccount.ACCESS_KEY_ENV_VAR)
}
}
Gradle geb-saucelabs Plugin is very similar
Resources
• http://www.gebish.org/
• http://www.browserstack.com/
• https://saucelabs.com/
• https://github.com/geb/geb-example-gradle

Weitere ähnliche Inhalte

Was ist angesagt?

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development Environments
Beau Lebens
 
Content-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache SlingContent-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache Sling
Fabrice Hong
 

Was ist angesagt? (20)

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Bower power
Bower powerBower power
Bower power
 
Nuxt Talk
Nuxt TalkNuxt Talk
Nuxt Talk
 
Nuxt.js - Introduction
Nuxt.js - IntroductionNuxt.js - Introduction
Nuxt.js - Introduction
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS Introdruction
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
 
Zk doc1
Zk doc1Zk doc1
Zk doc1
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development Environments
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with Webpack
 
Stanislaw potoczny kra_qa_21.01.20
Stanislaw potoczny kra_qa_21.01.20Stanislaw potoczny kra_qa_21.01.20
Stanislaw potoczny kra_qa_21.01.20
 
ZK framework
ZK frameworkZK framework
ZK framework
 
Content-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache SlingContent-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache Sling
 
Native-Javascript Bridging Using WKWebViews in iOS8
Native-Javascript Bridging Using WKWebViews in iOS8Native-Javascript Bridging Using WKWebViews in iOS8
Native-Javascript Bridging Using WKWebViews in iOS8
 
Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with Webpack
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
 

Ähnlich wie Cloud browser testing with Gradle and Geb

Development of automated tests for ext js based web sites
Development of automated tests for ext js based web sitesDevelopment of automated tests for ext js based web sites
Development of automated tests for ext js based web sites
ISsoft
 

Ähnlich wie Cloud browser testing with Gradle and Geb (20)

Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
 
Development of automated tests for ext js based web sites
Development of automated tests for ext js based web sitesDevelopment of automated tests for ext js based web sites
Development of automated tests for ext js based web sites
 
Kudu voodoo slideshare
Kudu voodoo   slideshareKudu voodoo   slideshare
Kudu voodoo slideshare
 
QA Lab in the Cloud
QA Lab in the CloudQA Lab in the Cloud
QA Lab in the Cloud
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
VorlonJS
VorlonJSVorlonJS
VorlonJS
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
 
IaaS azure_vs_amazon
IaaS azure_vs_amazonIaaS azure_vs_amazon
IaaS azure_vs_amazon
 
Head in the clouds
Head in the cloudsHead in the clouds
Head in the clouds
 
uMobile Development Strategies
uMobile Development StrategiesuMobile Development Strategies
uMobile Development Strategies
 
Build Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumBuild Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with Selenium
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
Guide To Effective Cross Browser Testing
Guide To Effective Cross Browser TestingGuide To Effective Cross Browser Testing
Guide To Effective Cross Browser Testing
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the Cloud
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Cloud browser testing with Gradle and Geb

  • 1. Cloud Browser Testing with Gradle and Geb David M. Carr; June 12 2014
  • 2. Cloud Browser Testing • Each browser has behavioral quirks • Often the same page will behave differently in different browsers (Chrome, FireFox, Safari, Internet Explorer) • Some behaviors will vary based on the browser version or operating system • Test all of them! • But that’s a lot of work… cloud services to the rescue
  • 3. Sauce Labs/BrowserStack • Services that provide access to VM-based browsers on demand • Provide support for secure tunneling to test apps within your firewall • Easy to test lots of browser/version/OS combinations • https://saucelabs.com • https://www.browserstack.com
  • 4. Geb • Library for browser automation in Groovy • Powered by WebDriver • Often used with Spock/JUnit/TestNG • www.gebish.org
  • 5. Geb Config BrowserStackDriverFactory • Sets up a connection to the cloud service with a browser configuration • «browser»:«operating system»:«version» def browserStackBrowser = System.getProperty("geb.browserstack.browser") if (browserStackBrowser) { driver = { def username = System.getenv("GEB_BROWSERSTACK_USERNAME") def accessKey = System.getenv("GEB_BROWSERSTACK_AUTHKEY") new BrowserStackDriverFactory().create(browserStackBrowser, username, accessKey) } } SauceLabsDriverFactory is very similar
  • 6. Gradle Config Gradle geb-browserstack Plugin • Open manages secure tunnel for local testing • Configures tasks for different browser specifications • Example: firefoxMac19Test, chromeMacTest, internetExplorerWindows9Test... and allBrowserStackTests apply plugin: "geb-browserstack" buildscript { repositories { mavenCentral() } dependencies { classpath ‘org.gebish:geb-gradle:@geb-version@' } } browserStack { application 'http://localhost:8080' browsers { firefox_mac_19 chrome_mac internetExplorer_windows_9 } task { testClassesDir = test.testClassesDir testSrcDirs = test.testSrcDirs classpath = test.classpath } account { username = System.getenv(BrowserStackAccount.USER_ENV_VAR) accessKey = System.getenv(BrowserStackAccount.ACCESS_KEY_ENV_VAR) } } Gradle geb-saucelabs Plugin is very similar
  • 7. Resources • http://www.gebish.org/ • http://www.browserstack.com/ • https://saucelabs.com/ • https://github.com/geb/geb-example-gradle