Speedy Tests 4.22 http://spkr8.com/t/3759

Description:

Your project's software practices are deteriorating every minute the developers wait for slow tests to finish. Once developers get fed up and stop running the tests, disregard for failing builds can't be far behind, and from there it's only a short leap to the albatross of a brittle/irrelevant test suite. Luckily this can all be avoided by adopting some time-saving testing standards and practices.

If everyone knows that test suites should be fast then why do they take so damn long? Some of that is lack of knowledge about what’s fast and what is not, but mostly the problem is lack of awareness of 2 things:

  1. When you write tests you should be thinking about their speed.
  2. A test that needs lots of setup is telling you something: Your object sucks.

Test suites usually grow and stumble along without too much thought. “Hey thing X looks shiny, let’s add that in.” is about as far as the process often goes. You need to architect your test suite just like any other part of your code. This does NOT mean lots of meetings and UML diagrams, but adopting a set of team testing guidelines and practices. And, of course, communicating those guidelines and practices to new developers.

Some topics I’ll be discussing:

  • Big Setup == Big Problem
  • before :each {waste_my_time}
  • FactoryGirl is too damn awesome
  • The extra tricky test suite
  • Just because mocking can solve some of your problems…
  • Use all your cores, damnit

I’ve been on 10 projects with automated tests in the last 6 years and I’ve seen speedy confidence inducing suites and others that only served to make developers feel dread and guilt about testing. The point of this talk is to communicate tangible strategies for speedily testing Ruby.

Comments on this Talk

New_headshot_color Alex Sharp, 17 Jul 08:29 PM

Great content about various "silver bullet" testing solutions, as well as good testing practices. Also, couldn't agree more wrt factory girl.

Stream.13254 kylejginavan, 17 Jul 08:34 PM

Comment deleted by kylejginavan on July 17, 2010 at 8:38 PM

Stream.2657 cdumler, 17 Jul 08:35 PM

That was a very impressive and en engaging presentation. Great number of take-home points!

Stream.13254 kylejginavan, 17 Jul 08:39 PM

Comment deleted by kylejginavan on July 17, 2010 at 8:39 PM

Stream.13254 kylejginavan, 17 Jul 08:40 PM

I've waited for a talk on this subject for a while. Great stuff. This project helped substantially speed up my tests. link text

Have an account? Sign in or register.

Leave a Comment

19 Ratings: 4.22

Delivery: 4.16

Content: 4.28

Last Five Ratings