Download - Selenium: What Is It Good For
![Page 1: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/1.jpg)
SELENIUM: WHAT IS IT GOODFOR?
ABSOLUTELY SOMETHING!DALLAS DRUPAL DAYS
SEPTEMBER 8, 2012
![Page 2: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/2.jpg)
WHATCHA GONNA DO?
Selenium
Selenium IDE: A comprehensive walkthrough of the
misunderstood IDE.
Store and Run Tests: A guide to Automated Testing at it's most
basic level.
PHPUnit
The Important Features: What we need to get Selenium working
with PHPUnit.
Translation from Selenium IDE: The first steps to using PHPUnit
for managing and running your tests.
![Page 3: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/3.jpg)
Hudson / Jenkins / Travis
Continuous Integration: What does it mean to be continuously
integrated?
![Page 4: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/4.jpg)
BUT FIRST!
![Page 5: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/5.jpg)
<SHAMELESS SELF PROMOTION>
Allan Chappell
Webdeveloper / Testing Expert
Drupal User:
@general_redneck
</SHAMELESS SELF PROMOTION>
368854
GeneralRedneck.com
![Page 6: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/6.jpg)
WHAT IS SELENIUM?
“Selenium automates browsers. That's it.”
![Page 7: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/7.jpg)
SELENIUM
SELENIUM IDE
Record Your Actions.
Modify Your Targets.
Fill In the Gaps With Tests.
Store and Run Your Tests.
![Page 8: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/8.jpg)
SELENIUM IDERECORD YOUR ACTIONS.
Live Demo Time!
![Page 9: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/9.jpg)
STORE TESTSWARNING: CONFLICTING INFORMATION!
If you plan to move on to more advanced testing:
Separate different features into different Test Suites.
If you plan to stick with what you got now:
Combine all features into the same Test Suite.
![Page 10: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/10.jpg)
STORE TESTSFor both do:
Separate tests into logical test cases.
Share and reap the rewards!
![Page 11: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/11.jpg)
RUN TESTSMake a backup of the database.
(Check out )
Run the Tests!
Restore if needed.
backup and migrate
![Page 12: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/12.jpg)
<BLINK>
CONGRATULATIONS!!!YOU ARE READY TO MOVE TO THE NEXT LEVEL!
</BLINK>
![Page 13: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/13.jpg)
WHERE DOES PHPUNIT COME IN?PHPUnit allows you to make the process more automated!
![Page 14: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/14.jpg)
PHPUNIT
SELENIUM FEATURE OVERVIEWYou can run your old tests! (with massaging)
You can now perform repetitive tasks!
You can now chain running your tests to events!
![Page 15: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/15.jpg)
TRANSLATION OF SELENIUM TESTSThere are 2 ways!
PHP Export Addon
Throwing your selenese test cases into a directory and telling
PHPUnit to run em.
![Page 16: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/16.jpg)
<IMPERSONATE CLASS='AUDIENCE'>
GREAT... BUT HOW TO DO I USE IT?</IMPERSONATE>
![Page 17: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/17.jpg)
Live Demo Time!
![Page 18: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/18.jpg)
<BLINK>
CONGRATULATIONS!!!YOU'VE LEVELED UP TWICE IN AN HOUR!
</BLINK>You should feel proud of yourself... No, Really!
![Page 19: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/19.jpg)
THERE'S MORE?!? I THOUGHT I MADE THE TESTSAUTOMATED?
But you can do more with continuous integration provided by a
platform such as Travis, Hudson, Jenkins.
![Page 20: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/20.jpg)
CONTINUOUS INTEGRATION
OVERVIEWContinuous Integration (CI) there to help your work's quality by:
Taking repetitive manual tasks and automating them
Doing these tasks more frequently
And doing these task faster!
![Page 21: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/21.jpg)
THINGS THAT NOW BECOME EASIER AND POSSIBLECode standard checking
Processing Tasks on events such as commits!
More information in an already formatted report!
Running Tests
![Page 22: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/22.jpg)
TO COMPLETE THIS LEVEL YOU MUST...Install a CI system: Hudson, Jenkins, and Travis are all free with
great documentation.
Build a job: Usually tell it when to run. For instance, on git commit to
github, or every night at midnight.
Tell it what to do: Anything commandline will run. PHPUnit is
commandline. Hudson, Travis, have Selenium built in!
![Page 23: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/23.jpg)
<BLINK>
CONGRATULATIONS!!!YOU'VE MADE IT TO THE END!
</BLINK>
But wait there's one more thing...
![Page 24: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/24.jpg)
WHAT THIS MEANS IS THAT YOU NOW HAVE ACHOICE BASED ON THE FOLLOWING...
How Automated do you want to go.
What works for your team?
How many resources do you have to dedicate to automation?
IN THE END, IT IS ALMOST ALWAYS BEST FOR YOUR PRODUCT TO GET TO THE LAST LEVEL.
![Page 25: Selenium: What Is It Good For](https://reader034.vdocuments.mx/reader034/viewer/2022042815/556d13dcd8b42ad34f8b5372/html5/thumbnails/25.jpg)
QUESTIONS?