• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Culerity - Headless full stack testing for JavaScript
 

Culerity - Headless full stack testing for JavaScript

on

  • 4,051 views

This is a presentation i gave at the Java Script User group (twitter.com/berlinjs). It is about testing your entire web application including javascript without opening a browser for that.

This is a presentation i gave at the Java Script User group (twitter.com/berlinjs). It is about testing your entire web application including javascript without opening a browser for that.

Statistics

Views

Total Views
4,051
Views on SlideShare
4,029
Embed Views
22

Actions

Likes
1
Downloads
20
Comments
0

1 Embed 22

http://www.slideshare.net 22

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Culerity - Headless full stack testing for JavaScript Culerity - Headless full stack testing for JavaScript Presentation Transcript

    • Culerity Headless Fullstack Testing for Web Applications see github.com/langalex/culerity
    • Look How ’s talking!
    • Thilo with a H! github.com/thilo
    • 1st Thursday every Month, rug-b.de
    • coworking-space, co-up.de
    • UPSTREAM my company, upstre.am
    • we done lot of web apps our own latest product: co-bot.me
    • Done all apps test driven
    • Problem we have unit tests for all our code. And some integration tests. But....
    • Does it work as a whole? All the bits and pieces fit together? I could test manually It is Cumbersome Better Automate it too, we are developers
    • 2 Flavors
    • In Browser run your test in an actual browser by scripting it
    • Headless some software only "Browser"
    • Properties of Headless Testing
    • Consistent Behavior
    • Direct API for Interaction
    • Enter Culerity First solution to test web apps full-stack including Javascript with ruby
    • The Components (Cucumber) Culerity Celerity HtmlUnit Rhino culerity is just a part, but an important one
    • written in ruby
    • PlainText Acceptance Test Uses a human readable DSL to specify test cases
    • Matched agains Test Steps each line is matched against a step which implements logic steps include, setup (Given), interaction (When), assertions (Then)
    • Culerity
    • mostly ruby small part runs in Jruby
    • Proxy Library
    • Interaction - Low Level can be used without webrat.
    • Can get complicated! finding a link either by text, id, title or partial matching text
    • Cucumber Steps that uses the Proxy provides easy cucumber steps that wraps interaction
    • Celerity
    • in Jruby
    • Api Wrapper for HTML Unit
    • HtmlUnit
    • pure Jave
    • GUI-Less browser so no fancy gui to show here
    • simulates browser behavior of Firefox2, Firefox3 or IE
    • Rhino JavaScript implementation in Java part of html that does the javascript
    • How it fits together Culerity BrowserProxy ObjectProxy CelerityServer CelerityBrowser HTMLUnit Above line ruby, below Jruby 1. Culerity starts Celerity Server as a Subprocess in Jruby - Serialize back end forth Calls through STDIN and STDOUT 2. Browser Proxy object controls a Celerity Browser instance 3. ObjectProxies are created for non literal Results when interacting with the celerity browser
    • Action see code at github.com/thilo/culerity_talk_src
    • Shortcomings • Dynamic Changes only on element level (wrapping div) • Blocks have no access to context • HTMLUnit Bugs • Extra Process
    • The Future is Now! Some other solutions with improvements - Only one Test Process with Ruby Java Bridge - Steam - Mutli Backends - With Capybara - Javascript Only Dom Enviroment on Rhino - Env-Js (since 2007)
    • Thanks!
    • Questions ?
    • Credits • http://www.flickr.com/photos/montyhood/4414773547/ • jruby.org • ruby.org • http://www.mozilla.org/rhino/ • http://hubblesite.org/gallery/album/entire/pr2001025a/ • FF, IE, Java Logo from wikipedia • Rug-B Logo Copyright by Nico Hagenburger • Cucumber Logo from cukes.info by Gideon Bullock