~/talk

How to Write Better Code Using Mutation Testing

Talkat RailsConf 2017 · 2017-04-25..04-27· [testing, ruby]
slides:none on file

A practical demo of Mutant and Mutest shows automated mutation of real Ruby code against RSpec, turning fragile line coverage into tests that fail when meaningful changes occur and revealing 31 different conditions in a small permissions method. Examples include switching Date.parse to iso8601 vs Date.parse and replacing regex anchors and using the new match? performance method. The tools run incrementally (since a git revision, by test selector), find surprising mutations, and fit into CI.

AI-written summary · about

  1. 0:00Intro
  2. 0:30Talk Outline
  3. 2:12Mutation Testing by Hand
  4. 7:55Internal API
  5. 11:48Hardening Regular Expressions
  6. 16:49X-Raying Legacy Code
  7. 18:43Thorough Test Coverage
  8. 22:50Incredible Dead Code Detection
  9. 25:43Code Simplification
  10. 31:43Learn more about Ruby
  11. 32:54Learn faster
  12. 33:14Improve your testing skills
  13. 33:55Introduce fewer regressions
  14. 34:32Write simpler code
  15. 35:00Mutation Testing on the Job
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.