Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Functional Testing with Zombie.js

Han
October 23, 2012

Functional Testing with Zombie.js

The pros and cons of functional testing with Zombie.js

Han

October 23, 2012
Tweet

More Decks by Han

Other Decks in Programming

Transcript

  1. Rhino is not good at the real world   http://stackoverflow.com/questions/1536896/apache-

    htmlunit-problem-in-handling-javascript   http://www.coderanch.com/t/95804/Testing/Better- JavaScript-support-than-HtmlUnit   http://stackoverflow.com/questions/2848398/htmlunit- doesnt-load-externally-referenced-javascript   http://stackoverflow.com/questions/2188905/java- htmlunit-crashes-upon-javascript-error   I could go on…
  2. Why is this happening?   Browser to Javascript engine interaction

      Chrome uses the HTML parser within Webkit   Zombie uses JSdom, which does not correctly handle a lot of edge cases; for example, a script containing “&” would be truncated and passed onto Zombie for evaluation as a partial script ending in “&”: https://github.com/assaf/zombie/issues/88   Result: Zombie.js can’t even handle google.com https://github.com/assaf/zombie/issues/121
  3. Make Selenium Run Faster   Run headless via Xvfb  

    Replace static waits with spin http://saucelabs.com/blog/index.php/2011/04/ how-to-lose-races-and-win-at-selenium/
  4. Make Selenium Run Selectively   Only run Selenium tests for

    mission critical functions   Use server side functional tests for other features