• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
JUTE Workshop
 

JUTE Workshop

on

  • 795 views

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

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

Statistics

Views

Total Views
795
Views on SlideShare
795
Embed Views
0

Actions

Likes
1
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

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
  • Get manager-speak out of the wayYou have heard all of this before from industry – from manager – from co-workers - there’s a reason: less pain for you – less pain for you managers – better codeWhy everyone all up in me about these things?You probably already agree it’s a good thingmanagers NEED you to succeedSmall = testableSimple = testable – minimize side effects – side effects harder to test – harder to capture – harder to explain
  • Lots of little – no bigPer function – test ONE THING AT A TIMEDo no create - injectIsolate what you want to testMocking out dependenciesCreating causes tight couplingClever comes later – if at all – don’t get cute or too clever – optimize LATER
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -
  • NOWDon’t have to test first -

JUTE Workshop JUTE Workshop Presentation Transcript

  • Unit Test/JUTE WorkshopMark Ethan Trostler trostler@yahoo- inc.com @zzoass
  • Minimize Your Pain•Write Small•Write Simple•Test Early•Test Often
  • Write Small – Write Simple•Isolate code to test•Loosely couple dependencies•Be obvious•Optimize last
  • Test Early – Test Often Test Now
  • Install JUTE•NodeJS (nodejs.org)•npm (curl http://npmjs.org/install.sh | sh)•JUTE (npm install jute –g) Yahoo’s: % yinsti –b test jute
  • Write Some Tests!http://yuilibrary.com/yui/docs/test/
  • What To Test Your Function/Method ONLY!!Mock/Manage Dependencies:•Explicit•Internal•Environment
  • Run In BrowserLoad up your HTML & let it fly!
  • Run Within JUTE - Browser% npmconfig set jute:<variable><value>%....% yinst restart jute –gLoad JUTE web UI & run some tests!
  • Run Within JUTE – Command line% jute_submit_test –test ….In parallel each captured browser runsevery test
  • Run Within JUTE – SeleniumGrab latest selenium-server-standalone% java –jar selenium…% jute_submit_test –sel_host<> --test …Serialized tests
  • Run Within JUTE – V8% jute_submit_test –v8 <> --test …Serialized tests
  • 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!
  • Keep Writing Those Tests!!Yahoo wants 75% coverage!