Anatomy of a bug

Preview:

Citation preview

TheAnatomy

ofa

Bug

Four Parts:- Triage

- Reproduction

- Finding the Root Cause

- The Fix

But first...

Part 1: TriageIdentification & Priority

Is itreally

abug?

It isa

bug!It can be

“reproduced”, or at least clearly seen to

be affecting users.

Let’s ask some questions to help us assess the priority with which we should fix this bug.

Who reported it?

me

otherdevelopers

payingcustomers

myboss

CEO

QA people

productowner

Which environment?

development

staging

test

production

Who is affected?

that one user who uses Konqueror

a small percentage of users

only non-paying users

all users will experience the bug when using the app

a large percentage of users

What happens?

deletesuser data

warning in log; user experience not affected

menu misaligned in Safari

users cannot give you money

When did it start happening?

immediately after a new feature was released.

several days/weeks after the last release

during a vendor outage (payment gateway etc)

So, how urgent?

Part 2: Reproduction

Step 1:

Experience the bug in the environment it appears in.

Step 2:

Set up your local environment so that you can (manually) reproduce it there.

Step 3:

Write a test that captures the bug. It should fail.

Part 3: Finding the Root Cause

Time to break out the debugging tools!

puts / logging

better_errors

Airbrake

rails console

pry

byebug

pry on steroids- pry-byebug

- pry-remote

Part 4: The Fix- Two aspects: the spec

addition and the actualfix.

- Don’t rush the fix, thinkabout the most correctway to adjust the code.

Thanks :-)

We are hiring!

rrsoft.co/jobs

Recommended