Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

Fast, Sexy, and Svelte: Our Kind of Rails Testing by Mind Map: Fast, Sexy, and Svelte: Our Kind of Rails Testing
0.0 stars - 0 reviews range from 0 to 5

Fast, Sexy, and Svelte: Our Kind of Rails Testing

speakers

Dan Manges (ThoughtWorks)

Zak Tamsen (ThoughtWorks)

spectrum

unit

what is?, finegrained and focus, one object at a time, fast!!

avoid unit test brittleness, activerecord test -> hit the database, remove db from the equation, gem install unit_record, ActiveRecord::Base.disconnect!

unit test are for any class (not only models), controllers, using mocks to avoid dependencies of the model, gem install unit_controller, do_not_render_view, views, brittle! don't do it, in the view shouldnt be interesting logic

new way, unit test for any class, no fixtures, not hitting the db

functional

less fine grained

still fast

hits the db, test sql

requires data, problems with fixtures, pain maintaining, arbirtrary use by different devs, model factory (Factory Method Pattern)

for any class, models, interaction between controller and view

speed, slower, in parallel faster (33%), deepTest

integration

classic integration tests

sometimes useful for special purpose tests, performance tests, smoke tests, tests simulating multiple users

--denial--

acceptance

coarse grained test

selenium

very slow!

writting acceptance tests, encapsulating a page

acceptance test

data access, focused acceptance test, hacking cookies to avoid login page

acceptance test parallelization