SlideShare a Scribd company logo
Building and Scaling
a Test Driven Culture
Engineering at Scale / AppNexus
Wednesday, May 8th 2013
@dblockdotorg
http://artsy.net
1
Open Source FTW!
1:0 Dev:Test
1124:1 Test:Code
http://www.sqlite.org/testing.html
3
full automation
everybody tests
rock solid
some automation
some people test
some software doesn’t install
4
2:1 Dev:Test
?:1 Test:Code
5
full automation
continuous everything
8 hours of sleep per day
5
1:0 Dev:Test
2:1 Test:Code
Artsy.net Website is [Relatively] Big
5534 Automated Tests
1h22m to Run / 6 Machines
http://art.sy/artwork/liu-di-animal-regulation-no-2
6
RSpec / BDD
“when X and Y it does X + Y”
 Data Models : ODM with real data
 Ruby API : HTTP request – response
 Integration : Capybara
7
Models = Mongo ODM + Fabricators: 2156 tests
context “spline” do
let(:spline) { Fabricate :spline }
it “reticulate! updates reticulated count” do
expect {
spline.reticulate!
}.to change(Spline.reticulated, :count).by(1)
end
end
8
Ruby API: 1894 Tests
context “spline” do
it “create” do
expect {
post “/api/spline?name=test”
response.status.should == 201
}.to change(Spline, :count).by(1)
end
end
9
Integration: 1484 Tests
context “spline” do
let(:spline) { Fabricate :spline }
it “displays a spline” do
visit “/spline/#{spline.id}”
page.should have_css “.spline[id=#{spline.id}]”
end
end
10
Building and Scaling a Test Driven Culture
12
10x Everything
JavaScript: 960 Tests
Jasmine
beforeEach ->
view = new App.Views.UsersEdit
view.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?
Ownership
https://groups.google.com/forum/?fromgroups=#!topic/ruby-grape/VELsU47wXkU
“It doesn’t work!”
 Management
 Money
 Consultants
23
Don’t Count On Them
 Remove Those that Talk About Testing
 Hire From Open-Source
 Remove the Safety Net
 Use a Non-Compiling Language
 Do Devops
24
Maintain a Test Driven Culture
@dblockdotorg
dblock@dblock.org
http://artsy.net
Thank You

More Related Content

PDF
TDD super mondays-june-2014
PDF
Massive concurrent modifications in web app. How to manage and test.
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
PDF
Taming the Testing Beast - AgileDC 2012
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
PDF
Node.js Development Workflow Automation with Grunt.js
PDF
Node.js Anti-Patterns and bad practices
TDD super mondays-june-2014
Massive concurrent modifications in web app. How to manage and test.
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Taming the Testing Beast - AgileDC 2012
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Node.js Development Workflow Automation with Grunt.js
Node.js Anti-Patterns and bad practices

What's hot (9)

PDF
Troubleshooting Node.js
PDF
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
PDF
Rubyslava debugging with_pry
PPTX
Staying Ahead of the Curve
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
PDF
Testing Angular 2 Applications - Rich Web 2016
PDF
Staying Ahead of the Curve
PDF
9 anti-patterns for node.js teams
PPTX
Unleash and Empower Your Engineers
Troubleshooting Node.js
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
Rubyslava debugging with_pry
Staying Ahead of the Curve
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Testing Angular 2 Applications - Rich Web 2016
Staying Ahead of the Curve
9 anti-patterns for node.js teams
Unleash and Empower Your Engineers
Ad

Similar to Building and Scaling a Test Driven Culture (20)

PPTX
Beginners overview of automated testing with Rspec
PPT
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
PDF
2010-07-19_rails_tdd_week1
PDF
TDD done right - tests immutable to refactor
KEY
WTF TDD?
PDF
Intro To JavaScript Unit Testing - Ran Mizrahi
PDF
Rethinking Testing
KEY
Javascript unit testing, yes we can e big
PDF
BDD Testing and Automating from the trenches - Presented at Into The Box June...
PDF
ITB2016 -BDD testing and automation from the trenches
PPTX
Testing Best Practices
PDF
Why Our Code Smells
PDF
Introduction to Automated Testing
PDF
Introduction to-automated-testing
PDF
Expedia 3x3 presentation
KEY
Best practices for writing good automated tests
PPTX
Testing Ext JS and Sencha Touch
PDF
WTF is TDD
PDF
Test-Driven Development with TypeScript+Jasmine+AngularJS
PPTX
Test Strategies in Microservices
Beginners overview of automated testing with Rspec
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
2010-07-19_rails_tdd_week1
TDD done right - tests immutable to refactor
WTF TDD?
Intro To JavaScript Unit Testing - Ran Mizrahi
Rethinking Testing
Javascript unit testing, yes we can e big
BDD Testing and Automating from the trenches - Presented at Into The Box June...
ITB2016 -BDD testing and automation from the trenches
Testing Best Practices
Why Our Code Smells
Introduction to Automated Testing
Introduction to-automated-testing
Expedia 3x3 presentation
Best practices for writing good automated tests
Testing Ext JS and Sencha Touch
WTF is TDD
Test-Driven Development with TypeScript+Jasmine+AngularJS
Test Strategies in Microservices
Ad

More from Daniel Doubrovkine (20)

PDF
The Future of Art @ Worlds Fair Nano
PDF
Nasdaq CTO Summit: Inspiring Team Leads to Give Away Legos
PDF
Product Development 101
PDF
Open-Source by Default, UN Community.camp
PDF
Your First Slack Ruby Bot
PDF
Single Sign-On with Waffle
PDF
How it All Goes Down
PDF
Taking Over Open Source Projects @ GoGaRuCo 2014
PDF
Mentoring Engineers & Humans
PDF
Tiling and Zooming ASCII Art @ iOSoho
PDF
Artsy ♥ ASCII ART
PDF
The Other Side of Your Interview
PDF
Hiring Engineers (the Artsy Way)
PDF
Mentoring 101 - the Artsy way
PPTX
Introducing Remote Install Framework
PDF
HackYale 0-60 in Startup Tech
PDF
GeneralAssemb.ly Summer Program: Tech from the Ground Up
PDF
Making Agile Choices in Software Technology
PDF
From Zero to Mongo, Art.sy Experience w/ MongoDB
PDF
Graduating to Jenkins CI for Ruby(-on-Rails) Teams
The Future of Art @ Worlds Fair Nano
Nasdaq CTO Summit: Inspiring Team Leads to Give Away Legos
Product Development 101
Open-Source by Default, UN Community.camp
Your First Slack Ruby Bot
Single Sign-On with Waffle
How it All Goes Down
Taking Over Open Source Projects @ GoGaRuCo 2014
Mentoring Engineers & Humans
Tiling and Zooming ASCII Art @ iOSoho
Artsy ♥ ASCII ART
The Other Side of Your Interview
Hiring Engineers (the Artsy Way)
Mentoring 101 - the Artsy way
Introducing Remote Install Framework
HackYale 0-60 in Startup Tech
GeneralAssemb.ly Summer Program: Tech from the Ground Up
Making Agile Choices in Software Technology
From Zero to Mongo, Art.sy Experience w/ MongoDB
Graduating to Jenkins CI for Ruby(-on-Rails) Teams

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Unlocking AI with Model Context Protocol (MCP)
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
sap open course for s4hana steps from ECC to s4
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology

Building and Scaling a Test Driven Culture

Editor's Notes

  • #4: https://github.com/intridea/grapehttps://github.com/twall/jnahttps://github.com/dblock/dotnetinstallerhttps://github.com/dblock/waffle
  • #7: Initializers: 190Models: 1966Acceptance: 1118Views: 136API: 1894Jasmine: 230Total: