Slide 1

Slide 1 text

Selenium Testing IDE Presentation for: South Florida PHP Users Group By: Adam Culp Twitter: @adamculp http://www.geekyboy.com

Slide 2

Slide 2 text

Selenium Testing IDE  About Me  Work for my own company from my home-based office consulting with many larger companies.  Zend PHP 5.3 Certified Engineer  Created ReqHarbor.com, OutsourceHarbor.com, more harbors coming.  Projects coming github.com/adamculp  Looking forward to php|tek '12 in a couple weeks  Ultra-runner (still trying to finish a 100 miler), scuba diver, judo player (black belt), husband, father (of 3), grand-dad (7 times, kids need a hobby)  Organizer of South Florida PHP Users Group for the past 2 years

Slide 3

Slide 3 text

Selenium Testing IDE  What is Selenium IDE?  Integrated development environment to create, edit, and run Selenium scripts.  Runs as a Firefox plugin but can be used as Remote Control for any browser. (We will only cover the Firefox plugin for time constraint.)  Written in Javascript, considered another Firefox window.  Handy way to test web forms and other elements in a web page/application.  Great helper when troubleshooting.

Slide 4

Slide 4 text

Selenium Testing IDE  Get Started  Install (Firefox addon site is a bit behind) http://addons.mozilla.org/en-US/firefox/addon/selenium-ide http://release.seleniumhq.org/selenium-ide/1.8.0/selenium-ide-1.8.0.xpi  Execute Tools->Selenium IDE  Record new test, or open a saved test

Slide 5

Slide 5 text

Selenium Testing IDE  Basic keyboard/mouse action recording  Selenium IDE starts recording when it is started (by default).  Click the record button to stop the recording when completed.

Slide 6

Slide 6 text

Selenium Testing IDE  Breakdown of test case  The test case is broken down into each step/click of the mouse, or input from the keyboard.

Slide 7

Slide 7 text

Selenium Testing IDE  Tests in XML/HTML  Readable and editable without the IDE

Slide 8

Slide 8 text

Selenium Testing IDE  A test suite is a collection of test cases  Also in XML/HTML format, it is a list of test cases

Slide 9

Slide 9 text

Selenium Testing IDE  Browser and editor view of test suite

Slide 10

Slide 10 text

Selenium Testing IDE  Executing a test case  By opening a test case you can execute it by clicking the Play Current Test Case button.

Slide 11

Slide 11 text

Selenium Testing IDE  Executing a test suite (collection of test cases)  By opening a test suite you can execute the entire suite by clicking the Play Entire Test Suite button.

Slide 12

Slide 12 text

Selenium Testing IDE  Executing a test suite (collection of test cases)  By opening a test suite you can execute the entire suite by clicking the Play Entire Test Suite button.

Slide 13

Slide 13 text

Selenium Testing IDE  Editing items of a test case are easy

Slide 14

Slide 14 text

Selenium Testing IDE  Why manual commands?  If your form gracefully errors out and presents a nicely formatted message the page actually succeeded. There is no failure for Selenium to catch if you are simply recording mouse and keyboard actions.  In Selenium you would need to set additional assertions to look for certain elements or text that would indicate a failure.

Slide 15

Slide 15 text

Selenium Testing IDE  Although you have a test suite open you can still select individual test cases within the suite and execute just that single test case.  Changing in individual test case does not affect the suite. The suite is a list of pointers to the cases. (Change a case, save the case. Add a case, save the case and suite.)

Slide 16

Slide 16 text

Selenium Testing IDE  If you receive “false” test failures because the server is responding too slowly you can adjust the speed in which the IDE executes the test(s).

Slide 17

Slide 17 text

Selenium Testing IDE  Setting breaks  If you need Selenium to stop in the middle of a test case so you can perform an action, or be alerted of progress, insert a break. This is handy to give you time to perform a needed action before the rest of the test suite runs. (ex. - a new user needs to add a password or if a password reset link is sent in email for the user to manually perform an action.)

Slide 18

Slide 18 text

Selenium Testing IDE  Other run comands  If you would like to insert a point where Selenium should stop during a specific run, but not every time, you can set a breakpoint. This will not be saved to the test case, but will affect the current run.  You can also set/clear start points if you want a case to run from a certain point.  You can also tell Selenium to run a specific line of a case.

Slide 19

Slide 19 text

Selenium Testing IDE  See Selenium run  Run Selenium, Run!

Slide 20

Slide 20 text

Selenium Testing IDE  Other uses:  Coding and need to test a form/page repeatedly to view outputs.  Automate Google searches and continue cycling through results until you find your site. (SEO)  Pre-record actions for presentations

Slide 21

Slide 21 text

Selenium Testing IDE  Thank you Adam Culp http://www.geekyboy.com http://github.com/adamculp Twitter @adamculp