SlideShare a Scribd company logo
Automated web application testing using Selenium   - Muthukrishnan Shanmugam Automated web application testing using Selenium   - Muthukrishnan Shanmugam
Browser based suite of tools to automate web application testing across many platforms.  Selenium is developed by ThoughtWorks. An open source released under the Apache 2.0 license. Developed in JavaScript/DHTML. Official site -  http://selenium.openqa.org/ Introduction Overview
Alerts Same origin policy File uploads and more.. Overview Supports testing apps built by web 2.0 technologies like AJAX Suitable for Functionality and Browser Compatibility Testing Table/Keyword driven Testing Testing can be controlled by many programming languages and testing frameworks Faster Test Execution Thumbs Up   Thumbs Down  
Selenium IDE Selenium Core Selenium Remote Control (RC) Selenium Grid Selenium on Rails Cubic test Selenium Products Overview
Selenium IDE 1.0b2
Introduction Overview Selenium IDE is a tool to test functionality of web applications Acts as a complete IDE for selenium tests, as it lets the user to record, playback,  edit and debug tests, view test logs and results Runs in the browser, Implemented as Firefox extension. Platform support Only Firefox 2+ browsers All Operating systems Programming Languages – HTML, C#, Java, Perl, PHP, Python and Ruby
Method 1 – From open qa’s site   http://selenium-ide.openqa.org/download.jsp Method 2 – From Mozilla’s Add-ons site   https://addons.mozilla.org/en-US/firefox/addon/2079 Installing Selenium IDE 1.0b2 Overview Exploring Selenium IDE 1.0b2 Run and Record toolbar Script pane Lower pane Menu
Commands –  tells sel. What to do Actions  – Manipulates the state of application e.g. click/clickAndWait, type/typeAndWait Accessors  – Examines the state of application and stores the results in a variable   e.g. storeTitle Assertions  – Verifies the state of application and conforms to what is expected. All selenium assertions can be used in 3 modes ‘assert’, ‘verify’ and ‘waitFor’. Element Locators –  tells sel. Which HTML element a command refers to Locators could be of id, name, dom, xpath, link or css Patterns –  can be used for various reasons. e.g. can be used to specify an expected value Patterns could be of values, exact/reg-ex/glob string Script pane – in detail Overview
By Default, the test is recorded as a Selenese HTML script Recording can be done in any of the supported programming languages and same  could be exported for editing. P.S : Selenium IDE does not allow the user to run scripts other than Selenese HTML Recording Overview Playing Back Scripts could be played back with the following options Playing the entire Test suite Playing the current Test case Playing with Sel. IDE Test runner Playing by the speed of user’s choice
Plan your Test Prepare Manual Test Cases Record the Base scripts Play it back for verification Convert Manual Test cases into Automation Test Scripts (Editing / Inserting Test  scripts) Run the Test scripts Analyze the Test results Testing Functionality of a simple web app. using Selenium IDE Overview
Sample Test run using Selenium IDE…..
Selenium Core 0.8.3
Introduction Overview Selenium Core is a tool to Test Functionality and Browser Compatibility of web  applications Runs directly in the browser and lets the user only to run the tests Platform support Browsers – FF 3, FF 2, IE 7, Safari 3, Safari 2, Opera 9, Opera 8 OS – Windows, OS X, Linux, Solaris How ever works on any platform with JavaScript enabled browsers
Installing Selenium Core 0.8.3 Overview Download Sel. Core from  http://selenium-core.openqa.org/download.jsp Make it available from the same web server as the application you want to test If you can’t modify the application’s web server you want to test, then core isn’t the right  tool for you ! Open Sel. Test runner as a http page and NOT as a file
How Selenium core works? Overview Uses JavaScript and Iframes to embed a Test Automation engine in your browser Why I’ve to Install Sel.core on the same place as web server is?
Exploring Selenium Test Runner 0.8.3 Overview
Testing using Selenium Core Overview Generate Test Scripts using Selenium IDE Place the Test Suite in Tests folder of Sel. Core Give away the Test suite’s path in Test Runner and click Go Run the Test Suite / Test Cases Analyze the Test Results for its Functionality Analyze the Test Results for its Browser Compatibility
Overview HTA mode HTA mode works only with IE on windows, can’t use it for testing with any other browsers HTA file is a special type of HTML file, that is allowed to violate the same origin policy You don’t have to install core onto the web server Just open TestRunner.hta file in the Sel. Core installation folder, you’re now free to run your tests  against any website
Selenium Remote Control 0.9.2
Introduction Overview Selenium Remote Control is a tool to test the functionality and browser  compatibility of web applications Test scripts can be generated in programming languages of user choice Platform support Programming Languages - HTML, C#, Java, Perl, PHP, Python and Ruby Browsers – FF 3, FF 2, IE 7, Safari 3, Safari 2, Opera 9, Opera 8 OS – Windows, OS X, Linux, Solaris How ever works on any platform with JavaScript enabled browsers RC is great for testing complex AJAX based web UI under a continuous integration system
Selenium RC Architecture Overview
Overview RC client driver reaches out the RC server RC server launches a browser RC server bundles selenium Core and automatically loads into  the browser TestRunner in core will now open AUT The Test script starts running How Selenium RC works?
Installing Selenium RC 0.9.2 Overview Download selenium RC from  http://selenium-rc.openqa.org/download.html Install the latest version of JRE and add it to path env. variable check using  java –version  in the command prompt Install the latest version of PERL Install selenium PERL client driver, run the foll. commands in PERL client driver directory perl makefile.pl  – you’ll now find an auto-generated make file nmake install  (for windows) – PERL modules will be downloaded from CPAN
Testing options on Selenium RC Overview Testing without Coding Normal Mode Interactive Mode – for rapid prototyping of tests Proxy Injection Mode – Experimental feature for now Programming the Test using any of the supported Programming Languages
A Sample Test using RC in Interactive mode Overview Start the server in interactive mode the cmd line -  java -jar selenium-server.jar -interactive Launch the browser -  cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com   (or) cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com Jot down the session id; say, session id = 260113 Lets do a Google search ! cmd=open&1=http://www.google.com/webhp&sessionId=260113 cmd=type&1=q&2=hello world&sessionId=260113 cmd=click&1=btnG&sessionId=260113 Getting the page’s title  cmd=getTitle&sessionId=260113 Wind up -  cmd=testComplete&sessionId=260113
Sample Test run using Selenium RC with PERL script…
More on RC…. Overview RC circumvents Same origin policy by acting as a client-configured proxy Automatically Launching other browsers cmd=getNewBrowserSession&1=*custom c:\Program      Files\Netscape\Netscape\Netscp.exe&2=http://www.google.com  – Must manually configure HTTP  proxy as ‘localhost:4444’ Running Tests under multi-window -  java -jar selenium-server.jar -multiWindow
Selenium Grid 1.0.1
Introduction Overview Selenium Grid is a tool that dramatically speeds up end-to-end web testing Transparently distributes your tests on multiple machines, so that tests run on parallel Cuts down time required for running in-browser test suites How Selenium Grid works?
Installing Selenium Grid 1.0.1 Overview Hub machine Install the latest version of JRE and JDK, check using  java -version Install the latest version of ANT Download the binary distribution Add the ANT folder to PATH env. Variable check using  ant –version Download the latest Selenium Grid from  http://selenium-grid.openqa.org/download.html Transparently distributes your tests on multiple machines, so that tests run on parallel Go to the root of Selenium Grid directory validate the installation –  ant sanity-check Remote control machines should have Selenium RCs installed
Running Tests in Sequence on Firefox on a single machine Overview Launch Hub by using  ant launch-hub  in Hub machine Check whether that the Hub is running by looking at  http://localhost:4444/console Launch RC in a new terminal using  ant launch-remote-control  in Hub machine Now check  http://localhost:4444/console  for a running remote control Run demo in sequence using  ant run-demo-in-sequence  in a new terminal
Running Tests in Parallel on Firefox on a single machine Overview Launch Hub by using  ant launch-hub  in Hub machine Check whether that the Hub is running by looking at  http://localhost:4444/console Launch RC in a new terminal using  ant launch-remote-control  in Hub machine Launch 3 more RCs in separate terminals  ant -Dport=5556 launch-remote-control, ant -Dport=5557  launch-remote-control, ant -Dport=5558 launch-remote-control Now check  http://localhost:4444/console  for all four running remote controls Run demo in parallel using  ant run-demo-in-parallel  in a new terminal
Running Tests in Parallel on Multiple Machines Overview
Running Tests with RCc Providing different environment Overview
Thank you !!! Overview

More Related Content

What's hot (20)

PPTX
Api testing
Keshav Kashyap
 
PDF
Automation Testing using Selenium
Naresh Chintalcheru
 
PDF
Selenium interview questions and answers
kavinilavuG
 
PPTX
Selenium introduction
Deepak Kumar Digar
 
PPT
Selenium Concepts
Swati Bansal
 
PPTX
BDD with CucumberJS and WebdriverIO
M Rizwanur Rashid
 
PDF
Webdriver.io
LinkMe Srl
 
PDF
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
PDF
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
PPTX
Apache JMeter - A brief introduction
silenceIT Inc.
 
PPTX
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
PDF
발표자료 1인qa로살아남는6가지방법
SangIn Choung
 
PPTX
ATLAS Automation POC
aakashmc
 
PPTX
Selenium test automation
Srikanth Vuriti
 
PPTX
Test automation
Xavier Yin
 
PPSX
Cucumber & gherkin language
selvanathankapilan
 
PPT
Selenium
Kalyan ch
 
PPTX
Selenium
Rakshitha Raviprakash
 
Api testing
Keshav Kashyap
 
Automation Testing using Selenium
Naresh Chintalcheru
 
Selenium interview questions and answers
kavinilavuG
 
Selenium introduction
Deepak Kumar Digar
 
Selenium Concepts
Swati Bansal
 
BDD with CucumberJS and WebdriverIO
M Rizwanur Rashid
 
Webdriver.io
LinkMe Srl
 
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Apache JMeter - A brief introduction
silenceIT Inc.
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
발표자료 1인qa로살아남는6가지방법
SangIn Choung
 
ATLAS Automation POC
aakashmc
 
Selenium test automation
Srikanth Vuriti
 
Test automation
Xavier Yin
 
Cucumber & gherkin language
selvanathankapilan
 
Selenium
Kalyan ch
 

Similar to Selenium (20)

PPT
Selenium (1)
onlinemindq
 
PPT
Selenium Introduction
Mayur Khairnar
 
PPT
Selenium
BugRaptors
 
DOC
Sel
Sandeep A R
 
PPT
Selenium
shrialinda
 
DOC
Selenium Automation Using Ruby
Kumari Warsha Goel
 
PPTX
Automated Web Testing With Selenium
Jodie Miners
 
PPT
Selenium
Daksh Sharma
 
PPTX
Selenium Testing
Shreshtt Bhatt
 
PDF
First steps with selenium rc
Dang Nguyen
 
PPT
Selenium Primer
gueste1e4db
 
PDF
Selenium by using JAVA
mahirayavarapu
 
PPTX
Selenium – testing tool jack
Jackseen Jeyaluck
 
PPT
BCS Selenium Workshop
Colin McDonald
 
PDF
Selenium Tutorial
prad_123
 
PPTX
Test Automation Using Selenium
Nikhil Kapoor
 
PPT
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
PPT
Selenium
tanvir afzal
 
PPT
Tanvir Afzal: Selenium
SQABD
 
Selenium (1)
onlinemindq
 
Selenium Introduction
Mayur Khairnar
 
Selenium
BugRaptors
 
Selenium
shrialinda
 
Selenium Automation Using Ruby
Kumari Warsha Goel
 
Automated Web Testing With Selenium
Jodie Miners
 
Selenium
Daksh Sharma
 
Selenium Testing
Shreshtt Bhatt
 
First steps with selenium rc
Dang Nguyen
 
Selenium Primer
gueste1e4db
 
Selenium by using JAVA
mahirayavarapu
 
Selenium – testing tool jack
Jackseen Jeyaluck
 
BCS Selenium Workshop
Colin McDonald
 
Selenium Tutorial
prad_123
 
Test Automation Using Selenium
Nikhil Kapoor
 
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium
tanvir afzal
 
Tanvir Afzal: Selenium
SQABD
 
Ad

Recently uploaded (20)

PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Ad

Selenium

  • 1. Automated web application testing using Selenium - Muthukrishnan Shanmugam Automated web application testing using Selenium - Muthukrishnan Shanmugam
  • 2. Browser based suite of tools to automate web application testing across many platforms. Selenium is developed by ThoughtWorks. An open source released under the Apache 2.0 license. Developed in JavaScript/DHTML. Official site - http://selenium.openqa.org/ Introduction Overview
  • 3. Alerts Same origin policy File uploads and more.. Overview Supports testing apps built by web 2.0 technologies like AJAX Suitable for Functionality and Browser Compatibility Testing Table/Keyword driven Testing Testing can be controlled by many programming languages and testing frameworks Faster Test Execution Thumbs Up  Thumbs Down 
  • 4. Selenium IDE Selenium Core Selenium Remote Control (RC) Selenium Grid Selenium on Rails Cubic test Selenium Products Overview
  • 6. Introduction Overview Selenium IDE is a tool to test functionality of web applications Acts as a complete IDE for selenium tests, as it lets the user to record, playback, edit and debug tests, view test logs and results Runs in the browser, Implemented as Firefox extension. Platform support Only Firefox 2+ browsers All Operating systems Programming Languages – HTML, C#, Java, Perl, PHP, Python and Ruby
  • 7. Method 1 – From open qa’s site http://selenium-ide.openqa.org/download.jsp Method 2 – From Mozilla’s Add-ons site https://addons.mozilla.org/en-US/firefox/addon/2079 Installing Selenium IDE 1.0b2 Overview Exploring Selenium IDE 1.0b2 Run and Record toolbar Script pane Lower pane Menu
  • 8. Commands – tells sel. What to do Actions – Manipulates the state of application e.g. click/clickAndWait, type/typeAndWait Accessors – Examines the state of application and stores the results in a variable e.g. storeTitle Assertions – Verifies the state of application and conforms to what is expected. All selenium assertions can be used in 3 modes ‘assert’, ‘verify’ and ‘waitFor’. Element Locators – tells sel. Which HTML element a command refers to Locators could be of id, name, dom, xpath, link or css Patterns – can be used for various reasons. e.g. can be used to specify an expected value Patterns could be of values, exact/reg-ex/glob string Script pane – in detail Overview
  • 9. By Default, the test is recorded as a Selenese HTML script Recording can be done in any of the supported programming languages and same could be exported for editing. P.S : Selenium IDE does not allow the user to run scripts other than Selenese HTML Recording Overview Playing Back Scripts could be played back with the following options Playing the entire Test suite Playing the current Test case Playing with Sel. IDE Test runner Playing by the speed of user’s choice
  • 10. Plan your Test Prepare Manual Test Cases Record the Base scripts Play it back for verification Convert Manual Test cases into Automation Test Scripts (Editing / Inserting Test scripts) Run the Test scripts Analyze the Test results Testing Functionality of a simple web app. using Selenium IDE Overview
  • 11. Sample Test run using Selenium IDE…..
  • 13. Introduction Overview Selenium Core is a tool to Test Functionality and Browser Compatibility of web applications Runs directly in the browser and lets the user only to run the tests Platform support Browsers – FF 3, FF 2, IE 7, Safari 3, Safari 2, Opera 9, Opera 8 OS – Windows, OS X, Linux, Solaris How ever works on any platform with JavaScript enabled browsers
  • 14. Installing Selenium Core 0.8.3 Overview Download Sel. Core from http://selenium-core.openqa.org/download.jsp Make it available from the same web server as the application you want to test If you can’t modify the application’s web server you want to test, then core isn’t the right tool for you ! Open Sel. Test runner as a http page and NOT as a file
  • 15. How Selenium core works? Overview Uses JavaScript and Iframes to embed a Test Automation engine in your browser Why I’ve to Install Sel.core on the same place as web server is?
  • 16. Exploring Selenium Test Runner 0.8.3 Overview
  • 17. Testing using Selenium Core Overview Generate Test Scripts using Selenium IDE Place the Test Suite in Tests folder of Sel. Core Give away the Test suite’s path in Test Runner and click Go Run the Test Suite / Test Cases Analyze the Test Results for its Functionality Analyze the Test Results for its Browser Compatibility
  • 18. Overview HTA mode HTA mode works only with IE on windows, can’t use it for testing with any other browsers HTA file is a special type of HTML file, that is allowed to violate the same origin policy You don’t have to install core onto the web server Just open TestRunner.hta file in the Sel. Core installation folder, you’re now free to run your tests against any website
  • 20. Introduction Overview Selenium Remote Control is a tool to test the functionality and browser compatibility of web applications Test scripts can be generated in programming languages of user choice Platform support Programming Languages - HTML, C#, Java, Perl, PHP, Python and Ruby Browsers – FF 3, FF 2, IE 7, Safari 3, Safari 2, Opera 9, Opera 8 OS – Windows, OS X, Linux, Solaris How ever works on any platform with JavaScript enabled browsers RC is great for testing complex AJAX based web UI under a continuous integration system
  • 22. Overview RC client driver reaches out the RC server RC server launches a browser RC server bundles selenium Core and automatically loads into the browser TestRunner in core will now open AUT The Test script starts running How Selenium RC works?
  • 23. Installing Selenium RC 0.9.2 Overview Download selenium RC from http://selenium-rc.openqa.org/download.html Install the latest version of JRE and add it to path env. variable check using java –version in the command prompt Install the latest version of PERL Install selenium PERL client driver, run the foll. commands in PERL client driver directory perl makefile.pl – you’ll now find an auto-generated make file nmake install (for windows) – PERL modules will be downloaded from CPAN
  • 24. Testing options on Selenium RC Overview Testing without Coding Normal Mode Interactive Mode – for rapid prototyping of tests Proxy Injection Mode – Experimental feature for now Programming the Test using any of the supported Programming Languages
  • 25. A Sample Test using RC in Interactive mode Overview Start the server in interactive mode the cmd line - java -jar selenium-server.jar -interactive Launch the browser - cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com (or) cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com Jot down the session id; say, session id = 260113 Lets do a Google search ! cmd=open&1=http://www.google.com/webhp&sessionId=260113 cmd=type&1=q&2=hello world&sessionId=260113 cmd=click&1=btnG&sessionId=260113 Getting the page’s title cmd=getTitle&sessionId=260113 Wind up - cmd=testComplete&sessionId=260113
  • 26. Sample Test run using Selenium RC with PERL script…
  • 27. More on RC…. Overview RC circumvents Same origin policy by acting as a client-configured proxy Automatically Launching other browsers cmd=getNewBrowserSession&1=*custom c:\Program Files\Netscape\Netscape\Netscp.exe&2=http://www.google.com – Must manually configure HTTP proxy as ‘localhost:4444’ Running Tests under multi-window - java -jar selenium-server.jar -multiWindow
  • 29. Introduction Overview Selenium Grid is a tool that dramatically speeds up end-to-end web testing Transparently distributes your tests on multiple machines, so that tests run on parallel Cuts down time required for running in-browser test suites How Selenium Grid works?
  • 30. Installing Selenium Grid 1.0.1 Overview Hub machine Install the latest version of JRE and JDK, check using java -version Install the latest version of ANT Download the binary distribution Add the ANT folder to PATH env. Variable check using ant –version Download the latest Selenium Grid from http://selenium-grid.openqa.org/download.html Transparently distributes your tests on multiple machines, so that tests run on parallel Go to the root of Selenium Grid directory validate the installation – ant sanity-check Remote control machines should have Selenium RCs installed
  • 31. Running Tests in Sequence on Firefox on a single machine Overview Launch Hub by using ant launch-hub in Hub machine Check whether that the Hub is running by looking at http://localhost:4444/console Launch RC in a new terminal using ant launch-remote-control in Hub machine Now check http://localhost:4444/console for a running remote control Run demo in sequence using ant run-demo-in-sequence in a new terminal
  • 32. Running Tests in Parallel on Firefox on a single machine Overview Launch Hub by using ant launch-hub in Hub machine Check whether that the Hub is running by looking at http://localhost:4444/console Launch RC in a new terminal using ant launch-remote-control in Hub machine Launch 3 more RCs in separate terminals ant -Dport=5556 launch-remote-control, ant -Dport=5557 launch-remote-control, ant -Dport=5558 launch-remote-control Now check http://localhost:4444/console for all four running remote controls Run demo in parallel using ant run-demo-in-parallel in a new terminal
  • 33. Running Tests in Parallel on Multiple Machines Overview
  • 34. Running Tests with RCc Providing different environment Overview
  • 35. Thank you !!! Overview