culerity and headless full stack integration testing

Post on 18-May-2015

2.834 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

Full Stack Integration Testing

Patrick Hüsler, huesler informatik

Control the Browser

2

Emulate a browser

3

The Lay of The Land

4

5

6

Thank you Martin Kleppmannhttp://www.slideshare.net/martinkleppmann/crossbrowser-testing-in-the-real-world

Headless

7

HTML Unit

8

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/

Celerity

10

11

<< A ruby wrapper around HTML Unit written in JRuby>>

Concerns

12

SLOW

13

Really SLOW!!!

14

Sometimes Brittle

15

Focus on the most important features

16

Rails

17

18

Status Quo Ante

Webrat

19

Selenium et. al

20

21

Headless

22

Culerity

23

http://github.com/langalex/culerity

Steam

24

http://github.com/svenfuchs/steam

Status Quo

25

Capybara

26

http://github.com/jnicklas/capybara

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

28

• rack-test•Celerity•Selenium• (env-js)

Capybara Drivers

Ideas/Approaches

29

Steam

30

http://github.com/svenfuchs/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).

envjs

31

http://github.com/jeresig/env-js

http://www.envjs.com/

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/

Johnson

33

Johnson wraps JavaScript in a loving Ruby embrace. It embeds the Mozilla SpiderMonkey JavaScript runtime as a C extension.

http://github.com/jbarnette/johnson

Johnson

34

require "johnson"

Johnson.evaluate("4 + 4") # => 8 Johnson.evaluate("4 + foo", :foo => 4) # => 8

Harmony

36

http://github.com/mynyml/harmony

page.execute_js("1+1") #=> 2page.execute_js("document.title") #=> "Foo"

Harmony

37

•Wrapper around• Johnson• Envjs

HolyGrail: Rails plugin for Harmony

38

http://github.com/mynyml/holygrail

The ruby tracer

39

http://github.com/cowboyd/therubyracer

Embed the Google V8 Javascript Interpreter into Ruby

Lyndon

40

Lyndon wraps JavaScript in a loving MacRuby embrace.

http://github.com/defunkt/lyndon

Headless Squirrel

41

http://github.com/Fingertips/headless-squirrel

A JavaScript test runner to run tests from the comfort of your terminal.

rdom

42

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.”

Thank You

43

• patrick.huesler@googlemail.com

• @phuesler

• http://github.com/phuesler

• http://www.huesler-informatik.ch/blog

Questions?

44

Thank You

45

• patrick.huesler@googlemail.com

• @phuesler

• http://github.com/phuesler

• http://www.huesler-informatik.ch/blog

top related