JUTE Workshop

1,046 views

Published on

Slides for JUTE workshop at YUIConf 2011 11/2/11

Published in: Technology, Business
  • Be the first to comment

JUTE Workshop

  1. 1. Unit Test/JUTE WorkshopMark Ethan Trostler trostler@yahoo- inc.com @zzoass
  2. 2. Minimize Your Pain•Write Small•Write Simple•Test Early•Test Often
  3. 3. Write Small – Write Simple•Isolate code to test•Loosely couple dependencies•Be obvious•Optimize last
  4. 4. Test Early – Test Often Test Now
  5. 5. Install JUTE•NodeJS (nodejs.org)•npm (curl http://npmjs.org/install.sh | sh)•JUTE (npm install jute –g) Yahoo’s: % yinsti –b test jute
  6. 6. Write Some Tests!http://yuilibrary.com/yui/docs/test/
  7. 7. What To Test Your Function/Method ONLY!!Mock/Manage Dependencies:•Explicit•Internal•Environment
  8. 8. Run In BrowserLoad up your HTML & let it fly!
  9. 9. Run Within JUTE - Browser% npmconfig set jute:<variable><value>%....% yinst restart jute –gLoad JUTE web UI & run some tests!
  10. 10. Run Within JUTE – Command line% jute_submit_test –test ….In parallel each captured browser runsevery test
  11. 11. Run Within JUTE – SeleniumGrab latest selenium-server-standalone% java –jar selenium…% jute_submit_test –sel_host<> --test …Serialized tests
  12. 12. Run Within JUTE – V8% jute_submit_test –v8 <> --test …Serialized tests
  13. 13. Run Within JUTE – Selenium Grid% jute_submit_test –sel_host<> --seleniums 5 --test …Tests in ‘seleniums’ chunks to eachSelenium slave in parallel.Will block if you don’t have enough slaves!
  14. 14. Keep Writing Those Tests!!Yahoo wants 75% coverage!

×