selenium selenium edward cerullo thecamp dk 2014 selenium
play

Selenium Selenium Edward Cerullo www.thecamp.dk 2014 Selenium - PowerPoint PPT Presentation

Selenium Selenium Edward Cerullo www.thecamp.dk 2014 Selenium What is Selenium? What is Selenium? What is Selenium? What is Selenium? What is Selenium? Selenium is a non-metal with properties between Sulfur (S-above) and Tellurium


  1. Selenium

  2. Selenium Edward Cerullo www.thecamp.dk 2014

  3. Selenium

  4. What is Selenium?

  5. What is Selenium?

  6. What is Selenium?

  7. What is Selenium? What is Selenium? Selenium is a non-metal with properties between Sulfur (S-above) and Tellurium (Te-below).

  8. Why Selenium?

  9. Well, once upon a time, there was a testing application called Mercury...

  10. Well, once upon a time, there was a testing application called Mercury...

  11. Well, once upon a time, there was a testing application called Mercury...

  12. But Mercury was complex to use and very expensive...

  13. But Mercury was complex to use and very expensive...

  14. And then Mercury was bought by HP, and rebranded Quality Center.

  15. And then Mercury was bought by HP, and rebranded Quality Center. Want to guess how expensive it is now?

  16. Objectives - Navigate around in Selenium - Create some test cases manually - Create some test cases using the Record option - Group test cases together in a Test Suite - Look at Selenese - Add in JavaScript - Føniks Computer site - The Google

  17. There are two versions of Selenium:

  18. There are two versions of Selenium: � Selenium IDE

  19. There are two versions of Selenium: � Selenium IDE

  20. There are two versions of Selenium: � Selenium IDE � Selenium WebDriver

  21. There are two versions of Selenium: � Selenium IDE � Selenium WebDriver

  22. Selenium IDE � Interactive Development Environment for your tests.

  23. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back.

  24. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back. � Easy to select fields from pages.

  25. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back. � Easy to select fields from pages. � Test step by step.

  26. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back. � Easy to select fields from pages. � Test step by step. � Debug mode with breakpoints.

  27. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back. � Easy to select fields from pages. � Test step by step. � Debug mode with breakpoints. � Save tests as HTML files. (And other formats.)

  28. Selenium IDE � Interactive Development Environment for your tests. � Record tests and then play them back. � Easy to select fields from pages. � Test step by step. � Debug mode with breakpoints. � Save tests as HTML files. (And other formats.) � Accessed as a plug-in for Firefox.

  29. Selenium IDE � Firefox plug-in is available here: http://docs.seleniumhq.org/download/#side_plugins � There are several versions; start here: version 2.5.0 released on 01/Jan/2014

  30. The Selenium IDE plugin is here:

  31. The Selenium IDE plugin is here:

  32. Click the icon:

  33. File / New Test Case (Or Ctrl N):

  34. Enter a Base URL and File Save:

  35. Right Click / Insert a new cmd:

  36. selectWindow / Null:

  37. A * indicates the test needs to be saved:

  38. Click on the Source tab to see the HTML:

  39. Click on Table tab and press the Run button:

  40. And the test results will increment:

  41. Plus the Log will be populated:

  42. Easy, hæ?

  43. Now, let's make a suite of tests.

  44. File / New Test Suite:

  45. File / Save Test Suite:

  46. And, WaLa:

  47. Now, I want to test each tab:

  48. Turn on the Record function:

  49. Click every tab:

  50. Turn off the Record function:

  51. For each click, verify the title:

  52. ...and save the test as a new name:

  53. Repeat this for all 11 tabs:

  54. Edit the Test Suite file: <?xml version= "1.0" encoding= "UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns= "http://www.w3.org/1999/xhtml" xml:lang= "en" lang= "en" > <head profile= "http://selenium-ide.openqa.org/profiles/test-case" > <meta http-equiv= "Content-Type" content= "text/html; charset=UTF-8" /> <link rel= "selenium.base" href= "https://www.fcomputer.dk/" /> <title>FCTS1</title> </head> <body> <table cellpadding= "1" cellspacing= "1" border= "1" > <thead> <tr><td rowspan= "1" colspan= "3" >FCTS1</td></tr> </thead><tbody> <tr><td><a href= "TabTest01.html" >TabTest01</a></td></tr> <tr><td><a href= "TabTest02.html" >TabTest02</a></td></tr> <tr><td><a href= "TabTest03.html" >TabTest03</a></td></tr> <tr><td><a href= "TabTest04.html" >TabTest04</a></td></tr> <tr><td><a href= "TabTest05.html" >TabTest05</a></td></tr> <tr><td><a href= "TabTest06.html" >TabTest06</a></td></tr> <tr><td><a href= "TabTest07.html" >TabTest07</a></td></tr> <tr><td><a href= "TabTest08.html" >TabTest08</a></td></tr> <tr><td><a href= "TabTest09.html" >TabTest09</a></td></tr> <tr><td><a href= "TabTest10.html" >TabTest10</a></td></tr> <tr><td><a href= "TabTest11.html" >TabTest11</a></td></tr> </tbody></table> </body> </html>

  55. Insert search word into Google:

  56. Google returns:

  57. Insert search word into Google:

  58. Google returns:

  59. Tips for Selenium: - Be organized! Establish a naming convention for your test cases. - Be patient! Sometimes Selenium is a bit slow to respond. - Use it! Don't mix Selenium tests with manual tests. You will benefit in the long run.

  60. For further reference: - ISTQB - Agile Testing http://www.amazon.com/Agile-Testing-Practical-Guide-Testers/dp/0321534468/ref=sr_1_7?s=books&ie=UTF8&qid=1406207011&sr=1- 7&keywords=software+testing

Recommend


More recommend