Running Just the Test Cases You Need

*
Accepted Session
Short Form
Intermediate
Scheduled: Thursday, June 22, 2017 from 1:30 – 2:15pm in B301

Excerpt

When you're writing software, fast feedback is key. The less you have to wait for your tests to run, the sooner you'll know whether or not your code is correct.

Ruby's two main test frameworks (minitest and RSpec) support several different techniques for testing only what you need for what you're currently working on, and nothing more. In this talk, we'll go through several of these practices for both frameworks, each more automated and awesome than the last.

Description

We’ll discuss several ways to run just a subset of your tests, from quick tips for beginners, to powerful options that are hiding in your favorite test framework. Here are some of the techniques we’ll discuss:

  • Using the filesystem and command line to narrow your suite down
  • Running tests with a specific name or line number
  • Automatically testing the Ruby class you’re currently editing
  • Tagging test cases as “focused,” “slow,” and so on
  • Running just what failed last time
  • Bisecting your tests to reproduce failures quickly

Where possible, examples will be “bilingual” in both minitest and RSpec.

Tags

Ruby, testing, tdd

Speaking experience

I've spoken at several conferences, including Open Source Bridge, OSCON, and Pacific Northwest Software Quality Conference.

Speaker

  • 026dees 3

    Ian Dees

    New Relic

    Biography

    Ian Dees was first bitten by the programming bug in 1986 on a Timex Sinclair 1000, and has been having a blast in his software apprenticeship ever since. By day, Ian slings code, tests, and puns at New Relic. By night, he dons a cape and keeps watch over the city as Sidekick Man. In his (heh) “spare time,” he converts espresso into programming books, including the team effort Seven More Languages in Seven Weeks.

    Sessions

      • Title: Running Just the Test Cases You Need
      • Track: Practice
      • Room: B301
      • Time: 1:302:15pm
      • Excerpt:

        When you’re writing software, fast feedback is key. The less you have to wait for your tests to run, the sooner you’ll know whether or not your code is correct.

        Ruby’s two main test frameworks (minitest and RSpec) support several different techniques for testing only what you need for what you’re currently working on, and nothing more. In this talk, we’ll go through several of these practices for both frameworks, each more automated and awesome than the last.

      • Speakers: Ian Dees