15
Selenium Making Web Browsers Obedient Thursday, September 2, 2010

Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

  • Upload
    others

  • View
    21

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

SeleniumMaking Web Browsers Obedient

Thursday, September 2, 2010

Page 2: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

What is Selenium?

❖ A trace mineral necessary for proper nutrition

❖ An ingredient of hair-care products to reduce dandruff

❖ The weakness of alien life forms in David Duchovny films

❖ A way to control web browsers through external processes

Thursday, September 2, 2010

Page 3: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Parts of Selenium

❖ Selenium IDE

❖ Browser plugin to create / run Selenium tests

❖ Selenium RC

❖ Java server to run Selenium tests as requested

❖ Selenium Grid

❖ Manage Selenium RC servers by availability and browsers

Thursday, September 2, 2010

Page 4: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium IDEQuenching the Fox

Thursday, September 2, 2010

Page 5: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium IDE

❖ Integrated environment to create Selenium test case

❖ Record browser actions

❖ Play back

❖ Export to HTML, PHP, Python, Ruby, and Perl

❖ Run with Selenium RC

Thursday, September 2, 2010

Page 6: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Demonstration

Thursday, September 2, 2010

Page 7: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium RCJungle Love

Thursday, September 2, 2010

Page 8: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium RC

❖ Remotely launch a browser and run a Selenium test case

❖ Works on almost any OS

❖ Works with almost any browser

❖ Internet Explorer / Windows

❖ Firefox / OSX

Thursday, September 2, 2010

Page 9: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Setup Server

❖ Have Java installed

❖ Download Selenium RC

❖ http://seleniumhq.com

❖ Run selenium-server.jar

Thursday, September 2, 2010

Page 10: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Setup Client (Perl)

❖ Install Test::WWW::Selenium

❖ Export your test case to Perl

❖ If necessary, replace "localhost" with your Selenium RC

❖ Run

❖ Quickly switch to your Selenium RC to watch the fun

Thursday, September 2, 2010

Page 11: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Demonstration

Thursday, September 2, 2010

Page 12: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Why?

❖ Outputs TAP

❖ Works with prove, Smolder, and other existing tools

❖ Tests JavaScript using the browser

❖ Walk through a site exactly as the user would

❖ Verify that basic things work before shipping

Thursday, September 2, 2010

Page 13: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium GridFoxes and Swooshes and Singers, Oh My!

Thursday, September 2, 2010

Page 14: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Selenium Grid

❖ Lives in front of a group of Selenium RCs

❖ Parallelizes

❖ Dispatches based on desired OS and Browser

❖ "iexplore on windows"

❖ "safari on osx"

Thursday, September 2, 2010

Page 15: Selenium - WebGUI€¦ · Selenium IDE Integrated environment to create Selenium test case Record browser actions Play back Export to HTML, PHP, Python, Ruby, and Perl Run with Selenium

Thursday, September 2, 2010