A World Without Bugs

Mike Selander / @Mike_Selander

What is a bug?

Scoped Functionality Issues or Visual Bugs
that can be fixed BEFORE a client sees them

"Caring is not in scope, but we do it anyway"

- David Droga

QA is not for the complacent

You Have to Care, a LOT

Start with
a Solid Foundation

Use Engineering Standards

Use Libraries for Themes/Plugins

Tools

WordPress Standards
10up Engineering Standards
Inpsyde Standards

Content Matters

Build with Content

Build with a LOT of Content

Build with a LOT of Real Content

Tools

Test Content Library

Theme Unit Test

Unit Test
All the Things

Unit Test:

Individually and independently testing the smallest parts of an application

Prove with every push that code still works

function my_permalink_function( $id ){
	return str_replace( 'foo', 'bar', get_permalink( $id ) );
}
public function my_test(){
  \WP_Mock::wpFunction( 'get_permalink', array(
    'args' => 42,
    'return' => 'http://example.com/foo'
  ) );

  $result = my_permalink_function( 42 );

  $this->assertEquals( 'https://example.com/bar', $result );
}

Tools:

WP Mock

WP Factory

Code Audits

1. Manual Code Audits

2. Automated Code Reviews

Manual Code Audits for:

  • Security Issues
  • Comprehensibility
  • Conciseness

Some Tips:

  • Review < 400 lines an hour
  • Keep it positive
  • Make everyone accountable

Automate the Rest

Automated Reviews for:

  • Stylistic Adherence
  • Code Repetition
  • Unused Code

Tools:

Scrutinizer

WP VIP Audit Guidelines

Fogcreek Audit Checklist

Visual Review

Use Checklists

Browser Test

Every Browser

Build a Device Lab

Internal
Testing

Have a lot of people test at each stage

For Example:

Me Dev PM Designer

Track Your
Progress

Set a Metric

i.e.: 0 client found bugs

With Every Launch, Keep Track

Celebrate the Victories

Thank You

@Mike_Selander
MikeSelander.com