Building and Scaling a Test Driven Culture
Upcoming SlideShare
Loading in...5
×
 

Building and Scaling a Test Driven Culture

on

  • 689 views

Talk given at AppNexus NYC, May 2013.

Talk given at AppNexus NYC, May 2013.

Statistics

Views

Total Views
689
Views on SlideShare
687
Embed Views
2

Actions

Likes
1
Downloads
2
Comments
0

1 Embed 2

https://twitter.com 2

Accessibility

Categories

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
  • https://github.com/intridea/grapehttps://github.com/twall/jnahttps://github.com/dblock/dotnetinstallerhttps://github.com/dblock/waffle
  • Initializers: 190Models: 1966Acceptance: 1118Views: 136API: 1894Jasmine: 230Total:

Building and Scaling a Test Driven Culture Building and Scaling a Test Driven Culture Presentation Transcript

  • Building and Scalinga Test Driven CultureEngineering at Scale / AppNexusWednesday, May 8th 2013@dblockdotorghttp://artsy.net1
  • Open Source FTW!
  • 1:0 Dev:Test1124:1 Test:Codehttp://www.sqlite.org/testing.html3full automationeverybody testsrock solid
  • some automationsome people testsome software doesn’t install42:1 Dev:Test?:1 Test:Code
  • 5full automationcontinuous everything8 hours of sleep per day51:0 Dev:Test2:1 Test:Code
  • Artsy.net Website is [Relatively] Big5534 Automated Tests1h22m to Run / 6 Machineshttp://art.sy/artwork/liu-di-animal-regulation-no-26
  • RSpec / BDD“when X and Y it does X + Y” Data Models : ODM with real data Ruby API : HTTP request – response Integration : Capybara7
  • Models = Mongo ODM + Fabricators: 2156 testscontext “spline” dolet(:spline) { Fabricate :spline }it “reticulate! updates reticulated count” doexpect {spline.reticulate!}.to change(Spline.reticulated, :count).by(1)endend8
  • Ruby API: 1894 Testscontext “spline” doit “create” doexpect {post “/api/spline?name=test”response.status.should == 201}.to change(Spline, :count).by(1)endend9
  • Integration: 1484 Testscontext “spline” dolet(:spline) { Fabricate :spline }it “displays a spline” dovisit “/spline/#{spline.id}”page.should have_css “.spline[id=#{spline.id}]”endend10
  • 1210x Everything
  • JavaScript: 960 TestsJasminebeforeEach ->view = new App.Views.UsersEditview.model = new App.Models.User fabricate ‘user’describe ‘#save’, ->it ‘saves the model’, ->view.model.set ‘name’, ‘updated’view.save()JSON.parse(jqLastAjaxRequest.data).name.should equal ‘updated’13
  • JavaScript: Recent Projects Node – headless unit testing for client-side code Mocha – rspec-like testing Sinon – stub JSDom – simulate DOM API Zombie – headless browser integration testing
  • Test Driven Culture Tests are second nature A bug becomes a test becomes a fix A feature starts as a test becomes a feature Tests absorb developer stress Everyone has confidence in moving forward
  • Successful Test Driven Culture“It Works”
  • Signs of a Test Driven Culture
  • Cost of Failure A very important demo with a potential investor A very important person using our site Hundreds of thousands of users You’re selling things for $
  • “To Be or Not to Be”
  • Testability
  • UI?
  • Ownershiphttps://groups.google.com/forum/?fromgroups=#!topic/ruby-grape/VELsU47wXkU“It doesn’t work!”
  •  Management Money Consultants23Don’t Count On Them
  •  Remove Those that Talk About Testing Hire From Open-Source Remove the Safety Net Use a Non-Compiling Language Do Devops24Maintain a Test Driven Culture
  • @dblockdotorgdblock@dblock.orghttp://artsy.netThank You