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

Like this? Share it with your network


Building and Scaling a Test Driven Culture



Talk given at AppNexus NYC, May 2013.

Talk given at AppNexus NYC, May 2013.



Total Views
Views on SlideShare
Embed Views



1 Embed 2 2



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.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Initializers: 190Models: 1966Acceptance: 1118Views: 136API: 1894Jasmine: 230Total:

Building and Scaling a Test Driven Culture Presentation Transcript

  • 1. Building and Scalinga Test Driven CultureEngineering at Scale / AppNexusWednesday, May 8th 2013@dblockdotorghttp://artsy.net1
  • 2. Open Source FTW!
  • 3. 1:0 Dev:Test1124:1 Test:Code automationeverybody testsrock solid
  • 4. some automationsome people testsome software doesn’t install42:1 Dev:Test?:1 Test:Code
  • 5. 5full automationcontinuous everything8 hours of sleep per day51:0 Dev:Test2:1 Test:Code
  • 6. Website is [Relatively] Big5534 Automated Tests1h22m to Run / 6 Machines
  • 7. RSpec / BDD“when X and Y it does X + Y” Data Models : ODM with real data Ruby API : HTTP request – response Integration : Capybara7
  • 8. 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
  • 9. Ruby API: 1894 Testscontext “spline” doit “create” doexpect {post “/api/spline?name=test”response.status.should == 201}.to change(Spline, :count).by(1)endend9
  • 10. Integration: 1484 Testscontext “spline” dolet(:spline) { Fabricate :spline }it “displays a spline” dovisit “/spline/#{}”page.should have_css “.spline[id=#{}]”endend10
  • 11. 1210x Everything
  • 12. 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’ equal ‘updated’13
  • 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
  • 14. 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
  • 15. Successful Test Driven Culture“It Works”
  • 16. Signs of a Test Driven Culture
  • 17. 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 $
  • 18. “To Be or Not to Be”
  • 19. Testability
  • 20. UI?
  • 21. Ownership!topic/ruby-grape/VELsU47wXkU“It doesn’t work!”
  • 22.  Management Money Consultants23Don’t Count On Them
  • 23.  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
  • 24. @dblockdotorgdblock@dblock.orghttp://artsy.netThank You