2017/Running Just the Test Cases You Need

From Open Source Bridge Wiki
Jump to: navigation, search

Session Link

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.

Slides

Next-Level Testing Maneuvers using RSpec (most of these are also available in MiniTest using slightly different syntax; see the slides):

  • Copy/paste to run the spec at a given line
  • Focus on specific specs: 
fdescribe / fit
  • Run specs with specific tags: -t tag:value
  • Run just what failed:
 --only-failures, --next-failure
  • Bisect to track down errors