SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
FUNCTIONAL TESTING
automatically with Selenium
@josephj6802
What’s FT?
Functional Testing in Stackla
Can u borrow me
your iPhone 5?
Headless vs. Selenium
Headless Browser
Selenium
Misunderstandings
Only available in Firefox
Need to write Java for Selenium test cases
or use Selenium IDE to record
(Probably true in Selenium 1.0)
Selenium 2.0
Selenium 1.0 + = Selenium 2.0
npm install selenium-webdriver
gem install selenium-webdriver
composer.phar require facebook/webdriver
Manipulate Chrome w/ Node.js + ChromeDriver
Get Feet Wet!
var webdriver = require(‘selenium-webdriver'),
expect = require('expect'),
driver = new webdriver.Builder().forBrowser('chrome').build();
driver.get('http://stackla.com');
driver.getTitle().then(function (title) {
expect(title).toBe(“Stackla - Social Media Aggregator“);
});
driver.quit();
Tip: Node.JS 4.x
Scalability
Scalability
Trial Run with
Manual Testing
Manual Testing
Automated Testing
My Tools
Browser testing on SauceLabs
Jasmine
Webdriver.io
Grunt
SauceLabs
exports.config = {
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY,
updateJob: true,
specs: ['./tests/*_test.js'],
capabilities: [{
browserName: 'firefox',
version: 37,
name: 'Firefox Selenium tests',
build: 'build-' + process.env.TRAVIS_BUILD_ID,
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
},{
browserName: 'chrome',
version: 43,
name: 'Chrome Selenium tests',
build: 'build-' + process.env.TRAVIS_BUILD_ID,
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
},{
browserName: 'internet explorer',
version: 11,
name: 'IE Selenium tests',
build: 'build-' + process.env.TRAVIS_BUILD_ID,
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
},{
browserName: 'safari',
version: 6,
name: 'Safari Selenium tests',
build: 'build-' + process.env.TRAVIS_BUILD_ID,
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
}],
baseUrl: 'http://localhost:8585',
framework: 'jasmine',
reporter: ‘spec'
};
./wdio-saucelab.conf.js // browser - webdriver instance
describe('Index Page', function() {
it('should have title', function* () {
yield browser.url('/index.html');
expect(yield browser.getTitle()).toBe('Browser
Testing');
});
it('shoud have Stackla widget', function* () {
yield browser.url('/');
expect(yield browser.isExisting('.stackla-widget'));
});
});
./tests/index_test.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Browser Testing</title>
</head>
<body>
<h1>Browser Testing</h1>
<div class="stackla-widget" data-id="6605" data-
hash="5663ac9e3843f" data-ct="" data-alias="josephj.stackla.com"
data-ttl="30" style="width: 100%; overflow: hidden;"></div>
<script type="text/javascript">
(function (d, id) {
if (d.getElementById(id)) return;
var t = d.createElement('script');
t.type = 'text/javascript';
t.src = '//assetscdn.stackla.com/media/js/widget/
fluid-embed.js';
t.id = id;
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(t);
}(document, 'stackla-widget-js'));
</script>
</body>
</html>
http://localhost:8585/index.html
Need to build a web server and tunnel
$ wdio wdio-saucelab.conf.js
Automated Build
TravisCI
My Tools
Delegating testing task to CI Server
Jasmine
Webdriver.io
Grunt
SauceLabs
Enable Build
https://github.com/josephj/browser-testing
Whenever user makes git push
Set environment variables for SauceConnect
Settings
language: node_js
node_js:
- "4.1"
before_script:
- npm install grunt-cli -g
- npm install webdriverio -g
- npm install jasmine -g
addons:
sauce_connect: true
branches:
only:
- master
- gh-pages
script:
- grunt test:saucelabs
Config File
./travis.yml
https://travis-ci.org/josephj/browser-testing
Let’s Build!
$ git push
Todo List
Pricing
Unlimted Automation Testing
but slow with 1 parallel VM
Better speed but with limited time
Fastest and quiet enough time
Google Trends
BrowserStack is the most
popular one
Resources
https://github.com/josephj/browser-testing

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (20)

Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
 
Selenium
SeleniumSelenium
Selenium
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Guide To Effective Cross Browser Testing
Guide To Effective Cross Browser TestingGuide To Effective Cross Browser Testing
Guide To Effective Cross Browser Testing
 
How To Automate Cross Browser Testing
How To Automate Cross Browser TestingHow To Automate Cross Browser Testing
How To Automate Cross Browser Testing
 
Selenium By Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
 
Selenium
SeleniumSelenium
Selenium
 
Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]Selenium 4 with Simon Stewart [Webinar]
Selenium 4 with Simon Stewart [Webinar]
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Selenium IDE and Beyond
Selenium IDE and BeyondSelenium IDE and Beyond
Selenium IDE and Beyond
 
An Overview of Selenium
An Overview of SeleniumAn Overview of Selenium
An Overview of Selenium
 
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
 
Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh PrajapatiSession on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Selenium
SeleniumSelenium
Selenium
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 

Ähnlich wie Automatic Functional Testing with Selenium and SauceLabs

Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
camp_drupal_ua
 

Ähnlich wie Automatic Functional Testing with Selenium and SauceLabs (20)

前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
 
Selenium
SeleniumSelenium
Selenium
 
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...
 
Integrační testy - Selenium
Integrační testy - SeleniumIntegrační testy - Selenium
Integrační testy - Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Selenium basic
Selenium basicSelenium basic
Selenium basic
 
Selenium RC Using Java and Maven + Maestro Integration
Selenium RC Using Java and Maven + Maestro IntegrationSelenium RC Using Java and Maven + Maestro Integration
Selenium RC Using Java and Maven + Maestro Integration
 
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
 
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-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
 
Selenium 101 Webinar
Selenium 101 WebinarSelenium 101 Webinar
Selenium 101 Webinar
 
Run Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerRun Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test Manager
 
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QA Fest 2019. Иван Крутов. Bulletproof Selenium ClusterQA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 
Selenium
SeleniumSelenium
Selenium
 

Mehr von Joseph Chiang

前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練
Joseph Chiang
 
Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練
Joseph Chiang
 
Debugging - 前端工程開發實務訓練
 Debugging - 前端工程開發實務訓練 Debugging - 前端工程開發實務訓練
Debugging - 前端工程開發實務訓練
Joseph Chiang
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練
Joseph Chiang
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練
Joseph Chiang
 
前端工程開發實務訓練
前端工程開發實務訓練前端工程開發實務訓練
前端工程開發實務訓練
Joseph Chiang
 
YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練
Joseph Chiang
 
CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練
Joseph Chiang
 
HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練
Joseph Chiang
 

Mehr von Joseph Chiang (20)

不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会
 
Let's Redux!
Let's Redux!Let's Redux!
Let's Redux!
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)
 
JavaScript Promise
JavaScript PromiseJavaScript Promise
JavaScript Promise
 
F2E for Enterprise
F2E for EnterpriseF2E for Enterprise
F2E for Enterprise
 
JavaScript Code Quality
JavaScript Code QualityJavaScript Code Quality
JavaScript Code Quality
 
F2E, the Keystone
F2E, the KeystoneF2E, the Keystone
F2E, the Keystone
 
前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練
 
Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練
 
Debugging - 前端工程開發實務訓練
 Debugging - 前端工程開發實務訓練 Debugging - 前端工程開發實務訓練
Debugging - 前端工程開發實務訓練
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練
 
前端工程開發實務訓練
前端工程開發實務訓練前端工程開發實務訓練
前端工程開發實務訓練
 
YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練
 
CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練
 
HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練
 
模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京
 
YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)
 
YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎
 
Git - The Social Coding System
Git - The Social Coding SystemGit - The Social Coding System
Git - The Social Coding System
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Automatic Functional Testing with Selenium and SauceLabs

  • 3. Functional Testing in Stackla Can u borrow me your iPhone 5?
  • 5. Misunderstandings Only available in Firefox Need to write Java for Selenium test cases or use Selenium IDE to record (Probably true in Selenium 1.0)
  • 6. Selenium 2.0 Selenium 1.0 + = Selenium 2.0 npm install selenium-webdriver gem install selenium-webdriver composer.phar require facebook/webdriver
  • 7. Manipulate Chrome w/ Node.js + ChromeDriver Get Feet Wet! var webdriver = require(‘selenium-webdriver'), expect = require('expect'), driver = new webdriver.Builder().forBrowser('chrome').build(); driver.get('http://stackla.com'); driver.getTitle().then(function (title) { expect(title).toBe(“Stackla - Social Media Aggregator“); }); driver.quit(); Tip: Node.JS 4.x
  • 14. My Tools Browser testing on SauceLabs Jasmine Webdriver.io Grunt SauceLabs
  • 15. exports.config = { user: process.env.SAUCE_USERNAME, key: process.env.SAUCE_ACCESS_KEY, updateJob: true, specs: ['./tests/*_test.js'], capabilities: [{ browserName: 'firefox', version: 37, name: 'Firefox Selenium tests', build: 'build-' + process.env.TRAVIS_BUILD_ID, 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER },{ browserName: 'chrome', version: 43, name: 'Chrome Selenium tests', build: 'build-' + process.env.TRAVIS_BUILD_ID, 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER },{ browserName: 'internet explorer', version: 11, name: 'IE Selenium tests', build: 'build-' + process.env.TRAVIS_BUILD_ID, 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER },{ browserName: 'safari', version: 6, name: 'Safari Selenium tests', build: 'build-' + process.env.TRAVIS_BUILD_ID, 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER }], baseUrl: 'http://localhost:8585', framework: 'jasmine', reporter: ‘spec' }; ./wdio-saucelab.conf.js // browser - webdriver instance describe('Index Page', function() { it('should have title', function* () { yield browser.url('/index.html'); expect(yield browser.getTitle()).toBe('Browser Testing'); }); it('shoud have Stackla widget', function* () { yield browser.url('/'); expect(yield browser.isExisting('.stackla-widget')); }); }); ./tests/index_test.js <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Browser Testing</title> </head> <body> <h1>Browser Testing</h1> <div class="stackla-widget" data-id="6605" data- hash="5663ac9e3843f" data-ct="" data-alias="josephj.stackla.com" data-ttl="30" style="width: 100%; overflow: hidden;"></div> <script type="text/javascript"> (function (d, id) { if (d.getElementById(id)) return; var t = d.createElement('script'); t.type = 'text/javascript'; t.src = '//assetscdn.stackla.com/media/js/widget/ fluid-embed.js'; t.id = id; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(t); }(document, 'stackla-widget-js')); </script> </body> </html> http://localhost:8585/index.html Need to build a web server and tunnel $ wdio wdio-saucelab.conf.js
  • 17. TravisCI My Tools Delegating testing task to CI Server Jasmine Webdriver.io Grunt SauceLabs
  • 19. Whenever user makes git push Set environment variables for SauceConnect Settings
  • 20. language: node_js node_js: - "4.1" before_script: - npm install grunt-cli -g - npm install webdriverio -g - npm install jasmine -g addons: sauce_connect: true branches: only: - master - gh-pages script: - grunt test:saucelabs Config File ./travis.yml
  • 23. Pricing Unlimted Automation Testing but slow with 1 parallel VM Better speed but with limited time Fastest and quiet enough time
  • 24. Google Trends BrowserStack is the most popular one