Your SlideShare is downloading. ×
0
Headless Browser Testingwith Rubyby Justin Halsall (@juice10)CTO of Betribes.com
Our process
Make user storieswrite out all the different actions users can andcan’t do
Write out Acceptance testsUsing Rspec/Steak
Run the tests!Doesn’t do much but its working!
Write out the first scenarioDo this before you actually create the feature
Run the tests!And it fails! But we where expecting that...
Go ahead!Create thatfeature!Yeah boi, its hammertime!
Run it again and... no failures!Yippy!
That wasn’ttoo hardLets step it up
Write out the second scenario
Visit the page
Specify area with CSS expression
Click on the link
Make sure you end up where you expect
Run tests: Red, green, refactorhttp://www.flickr.com/photos/tasuki/3503304405
Of course you can do moreeg. interacting with forms
Of course you can do moreeg. interacting with forms
Wow that was awesome!Yeah I know right!
Whats the difference?
Its way faster!http://www.flickr.com/photos/scallop_holden/2203771977
Headless Browser vsSeleniumSpeed speed speeeed! (our test suitetakes 30 minutes to complete on a fastmachine using a headl...
Tools   Ruby http://ruby-lang.org   Rspec http://rspec.info/   Capybara https://github.com/jnicklas/capybara   HtmlUnit ht...
Kthnx questions?Me: Justin HalsallTwitter: @juice10E-mail: justin@betribes.comGuess who’s looking for colleagues?We are!  ...
Upcoming SlideShare
Loading in...5
×

Headless browser testing with ruby

3,724

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,724
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
21
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Headless browser testing with ruby"

  1. 1. Headless Browser Testingwith Rubyby Justin Halsall (@juice10)CTO of Betribes.com
  2. 2. Our process
  3. 3. Make user storieswrite out all the different actions users can andcan’t do
  4. 4. Write out Acceptance testsUsing Rspec/Steak
  5. 5. Run the tests!Doesn’t do much but its working!
  6. 6. Write out the first scenarioDo this before you actually create the feature
  7. 7. Run the tests!And it fails! But we where expecting that...
  8. 8. Go ahead!Create thatfeature!Yeah boi, its hammertime!
  9. 9. Run it again and... no failures!Yippy!
  10. 10. That wasn’ttoo hardLets step it up
  11. 11. Write out the second scenario
  12. 12. Visit the page
  13. 13. Specify area with CSS expression
  14. 14. Click on the link
  15. 15. Make sure you end up where you expect
  16. 16. Run tests: Red, green, refactorhttp://www.flickr.com/photos/tasuki/3503304405
  17. 17. Of course you can do moreeg. interacting with forms
  18. 18. Of course you can do moreeg. interacting with forms
  19. 19. Wow that was awesome!Yeah I know right!
  20. 20. Whats the difference?
  21. 21. Its way faster!http://www.flickr.com/photos/scallop_holden/2203771977
  22. 22. Headless Browser vsSeleniumSpeed speed speeeed! (our test suitetakes 30 minutes to complete on a fastmachine using a headless web browser)Easier to set up the environment andtest edge cases.Abstracted so easy to change out fordifferent browser in the future.
  23. 23. Tools Ruby http://ruby-lang.org Rspec http://rspec.info/ Capybara https://github.com/jnicklas/capybara HtmlUnit http://htmlunit.sourceforge.net/optio nal Akaphelos http://oinopa.com/akephalos/optio nal Steak https://github.com/cavalle/steakoptio nal Ruby on Rails http://rubyonrails.comoptio nal Machinist https://github.com/notahat/machinist
  24. 24. Kthnx questions?Me: Justin HalsallTwitter: @juice10E-mail: justin@betribes.comGuess who’s looking for colleagues?We are! .com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×