Culerity and Headless Full Stack Integration Testing

3,119 views

Published on

A presentation about Full Stack Integration testing with a focus on headless solutions and a list of promising new solutions using johnson. Presented at RailsWayCon 2010

Published in: Technology, Design
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,119
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
25
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Culerity and Headless Full Stack Integration Testing

  1. 1. Patrick Hüsler, huesler informatik Full Stack Integration Testing
  2. 2. Control the Browser 2
  3. 3. Emulate a browser 3
  4. 4. The Lay of The Land 4
  5. 5. 5
  6. 6. Thank you Martin Kleppmann http://www.slideshare.net/martinkleppmann/crossbrowser-testing-in-the-real-world 6
  7. 7. Headless 7
  8. 8. HTML Unit 8
  9. 9. << HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc... just like you do in your "normal" browser. >> http://htmlunit.sourceforge.net/ 9
  10. 10. Celerity 10
  11. 11. << A ruby wrapper around HTML Unit written in JRuby >> 11
  12. 12. Concerns 12
  13. 13. SLOW 13
  14. 14. Really SLOW!!! 14
  15. 15. Sometimes Brittle 15
  16. 16. Focus on the most important features 16
  17. 17. Rails 17
  18. 18. Status Quo Ante 18
  19. 19. Webrat 19
  20. 20. Selenium et. al 20
  21. 21. 21
  22. 22. Headless 22
  23. 23. Culerity http://github.com/langalex/culerity 23
  24. 24. Steam http://github.com/svenfuchs/steam 24
  25. 25. Status Quo 25
  26. 26. Capybara http://github.com/jnicklas/capybara 26
  27. 27. << Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb. It is inspired by and aims to replace Webrat as a DSL for interacting with a webapplication. It is agnostic about the driver running your tests and currently comes bundled with rack-test, Culerity, Celerity and Selenium support built in. >> http://github.com/jnicklas/capybara 27
  28. 28. Capybara Drivers • rack-test • Celerity • Selenium • (env-js) 28
  29. 29. Ideas/Approaches 29
  30. 30. Steam Steam is a headless integration testing tool driving HtmlUnit to enable testing JavaScript-driven web sites. In that it is similar to Culerity which drives Celerity (which also drives HtmlUnit). http://github.com/svenfuchs/steam 30
  31. 31. envjs http://www.envjs.com/ http://github.com/jeresig/env-js 31
  32. 32. ENVJS IS A SIMULATED BROWSER ENVIRONMENT WRITTEN IN JAVASCRIPT. IT WAS ORIGINALLY DEVELOPED BY JOHN RESIG AND DISCUSSED IN HIS BLOG HERE. ENVJS IS NOW SUPPORTED BY A COMMUNITY OF DEVELOPERS WHO ALL USE ENVJS AS PART OF THEIR OWN OPEN SOURCE PROJECTS. http://www.envjs.com/ 32
  33. 33. Johnson Johnson wraps JavaScript in a loving Ruby embrace. It embeds the Mozilla SpiderMonkey JavaScript runtime as a C extension. http://github.com/jbarnette/johnson 33
  34. 34. Johnson require "johnson" Johnson.evaluate("4 + 4") # => 8 Johnson.evaluate("4 + foo", :foo => 4) # => 8 34
  35. 35. Johnson Presentation 2008 http://rubyconf2008.confreaks.com/how-i-learned-to- love-javascript.html 35
  36. 36. Harmony http://github.com/mynyml/harmony page.execute_js("1+1") #=> 2 page.execute_js("document.title") #=> "Foo" 36
  37. 37. Harmony • Wrapper around • Johnson • Envjs 37
  38. 38. HolyGrail: Rails plugin for Harmony http://github.com/mynyml/holygrail 38
  39. 39. The ruby tracer Embed the Google V8 Javascript Interpreter into Ruby http://github.com/cowboyd/therubyracer 39
  40. 40. Lyndon Lyndon wraps JavaScript in a loving MacRuby embrace. http://github.com/defunkt/lyndon 40
  41. 41. Headless Squirrel A JavaScript test runner to run tests from the comfort of your terminal. http://github.com/Fingertips/headless-squirrel 41
  42. 42. rdom tweet from the author, sven fuchs: “maybe you want to mention steam and/or rdom http://bit.ly/db4vxL, browser/env in ruby w/ nokogiri + johnson, not complete yet.” 42
  43. 43. Thank You • patrick.huesler@googlemail.com • @phuesler • http://github.com/phuesler • http://www.huesler-informatik.ch/blog 43
  44. 44. Questions? 44
  45. 45. Thank You • patrick.huesler@googlemail.com • @phuesler • http://github.com/phuesler • http://www.huesler-informatik.ch/blog 45

×