SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Dernier (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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 Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - 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...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

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