testing at yammer with foounit, jellyfish, and sauce labs

161
Test Your Shit Friday, July 22, 11

Upload: sauce-labs

Post on 27-Jan-2015

112 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

Test Your Shit

Friday, July 22, 11

Page 2: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

Test Your Shit...please

Friday, July 22, 11

Page 3: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

bob remeika

Friday, July 22, 11

Page 4: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

foobarfighter(twitter, github and freenode)

Friday, July 22, 11

Page 5: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

i work at

Friday, July 22, 11

Page 6: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

larry wall is my jesus

Friday, July 22, 11

Page 7: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so testing...

Friday, July 22, 11

Page 8: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so testing... why?

Friday, July 22, 11

Page 9: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

your codebase will evolve

Friday, July 22, 11

Page 10: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

your priorities will change

Friday, July 22, 11

Page 11: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

but you already knew that

Friday, July 22, 11

Page 12: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

that means your code will change

Friday, July 22, 11

Page 13: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

that means your code will change

often

Friday, July 22, 11

Page 14: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so what are you going to do about it?

Friday, July 22, 11

Page 15: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

some of you will do nothing

Friday, July 22, 11

Page 16: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you will fail

Friday, July 22, 11

Page 17: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

unless you’re facebook ;-)

Friday, July 22, 11

Page 18: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you’re not facebook

Friday, July 22, 11

Page 19: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you will hire new people

Friday, July 22, 11

Page 20: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

they will break things

Friday, July 22, 11

Page 21: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

tests help them ramp up

Friday, July 22, 11

Page 22: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

better codez

Friday, July 22, 11

Page 23: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

tests force decoupling

Friday, July 22, 11

Page 24: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

separate the shit out of those concerns

Friday, July 22, 11

Page 25: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

tests at yammera brief case study

Friday, July 22, 11

Page 26: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

just ship™

Friday, July 22, 11

Page 27: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

just ship™we launch features... not tests

Friday, July 22, 11

Page 28: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

features are why we are having success

Friday, July 22, 11

Page 29: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

but things are changing

Friday, July 22, 11

Page 30: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

stability matters

Friday, July 22, 11

Page 31: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

speed matters

Friday, July 22, 11

Page 32: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

quality matters

Friday, July 22, 11

Page 33: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we share code internally

Friday, July 22, 11

Page 34: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we have a lot of paying customers now

Friday, July 22, 11

Page 35: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

they are enterprises

Friday, July 22, 11

Page 36: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

breaking them is not cool

Friday, July 22, 11

Page 37: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

‘this.updateMessageList’ is not a method

Friday, July 22, 11

Page 38: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

‘this.updateMessageList’ is not a method

you didn’t even run that code????????!?!!?!

Friday, July 22, 11

Page 39: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

how could we have caught that?

Friday, July 22, 11

Page 40: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

how could we have caught that?

we only had three javascript engineers

Friday, July 22, 11

Page 41: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

our codebase was growing

Friday, July 22, 11

Page 42: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we needed to be more stable

Friday, July 22, 11

Page 43: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we needed some controls

Friday, July 22, 11

Page 44: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we needed some more beer

Friday, July 22, 11

Page 45: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so now we have tests

Friday, July 22, 11

Page 46: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

(insert graph)

Friday, July 22, 11

Page 47: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fewer face palms

Friday, July 22, 11

Page 48: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

better reliability

Friday, July 22, 11

Page 49: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

improved new employee ramp up

Friday, July 22, 11

Page 50: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fearless refactoring

Friday, July 22, 11

Page 51: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

because we rarely get it right the first time

Friday, July 22, 11

Page 52: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so testing...

Friday, July 22, 11

Page 53: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

so testing... how?

Friday, July 22, 11

Page 54: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

i can’t cover everything

Friday, July 22, 11

Page 55: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

stop!

Friday, July 22, 11

Page 56: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

go!

Friday, July 22, 11

Page 57: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you need a ci environment

Friday, July 22, 11

Page 58: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you might need unit tests

Friday, July 22, 11

Page 59: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you definitely need functional tests

Friday, July 22, 11

Page 60: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

(c)ontinuous(i)ntegration

Friday, July 22, 11

Page 61: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we have this setup at yammer

hi my name is peterhi, i’m paul

i’m a street light

Friday, July 22, 11

Page 62: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

if you are writing tests for the browser

Friday, July 22, 11

Page 63: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

require(‘saucelabs’)

Friday, July 22, 11

Page 64: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

use your vc money

Friday, July 22, 11

Page 65: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

we use saucelabs at yammer

Friday, July 22, 11

Page 66: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

Friday, July 22, 11

Page 67: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

because it is awesome

Friday, July 22, 11

Page 68: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

awesomesauce

Friday, July 22, 11

Page 69: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

how do you know if you need unit tests?

Friday, July 22, 11

Page 70: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

Friday, July 22, 11

Page 71: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

unit tests

Friday, July 22, 11

Page 72: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

convenience to the developer

Friday, July 22, 11

Page 73: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

convenience to the next developer

Friday, July 22, 11

Page 74: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

writing libraries

Friday, July 22, 11

Page 75: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

require(‘unit tests’)// doesn’t run

Friday, July 22, 11

Page 76: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

require(‘foounit’)// totally runs... teh asum

Friday, July 22, 11

Page 77: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

foounita brief intro

Friday, July 22, 11

Page 78: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

another javascript test framework

Friday, July 22, 11

Page 79: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

another javascript test framework

really?

Friday, July 22, 11

Page 80: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

... ya but

Friday, July 22, 11

Page 81: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

it has some lofty goals

Friday, July 22, 11

Page 82: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

cross host

Friday, July 22, 11

Page 83: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test shared code on client/server

Friday, July 22, 11

Page 84: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test shared code on client/server

these shenanigans exist at yammer

Friday, July 22, 11

Page 85: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test shared code on client/server

these shenanigans exist at yammeri’m not gonna lie, this is hard to do

Friday, July 22, 11

Page 86: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

beautiful syntax

Friday, July 22, 11

Page 87: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

not owned by the man

Friday, July 22, 11

Page 88: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

where it’s going

Friday, July 22, 11

Page 89: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

great ehraaahs

Friday, July 22, 11

Page 90: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

great doc generation

Friday, July 22, 11

Page 91: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

jellyfish integration

Friday, July 22, 11

Page 92: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

ui sandboxing

Friday, July 22, 11

Page 93: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

easy to use ui

Friday, July 22, 11

Page 94: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

turn into a jet and fly into the sun

Friday, July 22, 11

Page 95: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

var f = require(‘foounit’).globalize();

describe(‘this is a group’, function (){ it(‘has a test’, function (){ expect(myTest).to(runEverywhere); });});

f.run();

Friday, July 22, 11

Page 96: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

it’s a lot like jasmine

Friday, July 22, 11

Page 97: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

it’s a lot like jasminethere’s reasons for that

Friday, July 22, 11

Page 98: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

check it outhttp://foounit.org

Friday, July 22, 11

Page 99: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

functional tests

Friday, July 22, 11

Page 100: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test end result

Friday, July 22, 11

Page 101: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test your application

Friday, July 22, 11

Page 102: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

test what the user sees

Friday, July 22, 11

Page 103: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

require(‘jellyfish’)

Friday, July 22, 11

Page 104: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

h8rz g0n h8

Friday, July 22, 11

Page 105: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

h8rz g0n h8testing fallacies

Friday, July 22, 11

Page 106: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fallacy #1

Friday, July 22, 11

Page 107: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

people will tell you that you don’t need tests

Friday, July 22, 11

Page 108: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

let’s analyze that

Friday, July 22, 11

Page 109: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

successful open source projects have tests

Friday, July 22, 11

Page 110: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

rails

Friday, July 22, 11

Page 111: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

one million tests

Friday, July 22, 11

Page 112: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

jquery

Friday, July 22, 11

Page 113: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

1336 tests

Friday, July 22, 11

Page 114: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

dojo

Friday, July 22, 11

Page 115: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

1337 tests

Friday, July 22, 11

Page 116: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

1337 testsone more than jquery cause it’s better

Friday, July 22, 11

Page 117: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

1337 testsone more than jquery cause it’s better

l337

Friday, July 22, 11

Page 118: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you want to be successful, right?

Friday, July 22, 11

Page 119: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you want to be successful, right?

write tests

Friday, July 22, 11

Page 120: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

if you really care about the numbers

Friday, July 22, 11

Page 121: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

if you really care about the numbersyou can run the suites yourself

Friday, July 22, 11

Page 122: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fallacy #2

Friday, July 22, 11

Page 123: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you don’t need to test view code

Friday, July 22, 11

Page 124: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you don’t need to test view code

if your ‘view code’ is just html... cool

Friday, July 22, 11

Page 125: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you don’t need to test view code

if your ‘view code’ is just html... coolbut you are building a big client side app

Friday, July 22, 11

Page 126: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

do you consider jquery to be just ‘view code’?

Friday, July 22, 11

Page 127: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

no

Friday, July 22, 11

Page 128: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

it has a lot of tests

Friday, July 22, 11

Page 129: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

because it’s complicated

Friday, July 22, 11

Page 130: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

complex ui interactions are not just ‘view code’

Friday, July 22, 11

Page 131: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fallacy #3

Friday, July 22, 11

Page 132: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

tests slow you down

Friday, July 22, 11

Page 133: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

until the next guy needs to change

something

Friday, July 22, 11

Page 134: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

until you spend hours face palming

Friday, July 22, 11

Page 135: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

until you need to test error conditions

Friday, July 22, 11

Page 136: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

fallacy #4

Friday, July 22, 11

Page 137: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you need 100% coverage

Friday, July 22, 11

Page 138: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you aren’t building the space shuttle

Friday, July 22, 11

Page 139: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you don’t even need 90%

Friday, July 22, 11

Page 140: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

you need enough to help you refactor with

confidence

Friday, July 22, 11

Page 141: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

it’s hard to find the balance

Friday, July 22, 11

Page 142: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

but you should try

Friday, July 22, 11

Page 143: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

what’s a good unit test?

Friday, July 22, 11

Page 144: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

tdd/bdd dictates that you should test

everything

Friday, July 22, 11

Page 145: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

sure you can do that

Friday, July 22, 11

Page 146: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

... if you have that culture

Friday, July 22, 11

Page 147: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

i’m looking at you pivots

Friday, July 22, 11

Page 148: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

but there are diminishing returns

Friday, July 22, 11

Page 149: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

this.prototype.start = function (){ if (this.isStarted()){ return; } this._start()}

Friday, July 22, 11

Page 150: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

find a happy place

Friday, July 22, 11

Page 151: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

some things are hard to test

Friday, July 22, 11

Page 152: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

your mileage will vary

Friday, July 22, 11

Page 153: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

emulating xhr

Friday, July 22, 11

Page 154: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

multi-step interactions

Friday, July 22, 11

Page 155: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

consider integration tests

Friday, July 22, 11

Page 156: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

mock services ftw

Friday, July 22, 11

Page 157: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

please talk to me

Friday, July 22, 11

Page 158: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

or contact me online

Friday, July 22, 11

Page 159: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

i actually like people

Friday, July 22, 11

Page 160: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

foobarfighter(twitter, github and freenode)

Friday, July 22, 11

Page 161: Testing at Yammer with FooUnit, Jellyfish, and Sauce Labs

foounithttp://foounit.org

Friday, July 22, 11