como não testar seu projeto de software

96
O que não testar no seu projeto!

Upload: alexandre-freire

Post on 05-Jul-2015

1.427 views

Category:

Technology


2 download

DESCRIPTION

Slides de acompanhamento da palestra e discussão "O que não testar" na #AgileBR 2012

TRANSCRIPT

O que não testar no seu projeto!

?

Você APAGA seus testes?

@klausapaguei um teste no avião vindo para cá!

@dhhI find over-testing to be most common among those 1st adopting TDD. So excited about the idea that they go completely overboard.

Don’t use Cucumber unless you live in the magic kingdom of non-coders-writing-tests (and send me some fairy dust if you are!)

@mfeathers Ultimately, tests are a feedback mechanism, and we should make active decisions about what feedback we need and when.

@unclebobmartin 1 of Kent’s older wise sayings was: “Test everything that could possibly break.” I think that’s a pretty good recipe.

@joshuakerievskyTest first/after misses the point that TDD is more about emergent design than it is about testing. Do you practice emergent design?

@kentbeckIf I don’t typically make a mistake(...), I don’t test for it.

Wish there were more examples of “what not to test”.

100% COVERED CODE.

OF CODE YOU COVERLINE

PIXEL NAZI

fixtures considered harmful?

It will only run once

VS

<- costumerfacing

back office ->

JAVASCRIPT?

Being good at stupid doesn’t count.

POR QUE TESTAMOS?

Lei de Murphy

DOR

FLUIDEZ

0

375.00

750.00

1125.00

1500.00

Untitled 1

Velocidade Robustez

@jamesshoresacrifice the chickento the computer gods

HUMILHAÇÃO PÚBLICA

Quanta qualidade é suficiente?

Bugs/1KLOC

0

1

3

4

5

Indústria Nasa

Bugs/1KLOC

0

1

3

4

5

Indústria Nasa

Bugs/1KLOC

0

1

3

4

5

Indústria Nasa

Bugs/1KLOC

0

1

3

4

5

Indústria Nasa

0,004

Pair Programming

Cost($/LOC)

0

225

450

675

900

Indústria Nasa

5

850

Cost($/LOC)

0

225

450

675

900

Indústria Nasa

5

850

@marickI test the high risk code thoroughly. I use up most of the remaining time testing the medium risk code. I don’t intentionally test the low risk code

@martinfowleryou’re doing enough testing if the following is true:■You rarely get bugs that escape

into production■You are rarely hesitant to change

some code for fear it will cause production bugs

@jamesshoreSkill and discipline give us fluency. Then fluency gives us ease and joy.

O que é difícil? Como testar?

baby steps: grow up, o mundo real não é um dojo

DRY

WET

Test journeys

Acúmulode sleep()

non-deterministic test suite

non-deterministic

code

lack of isolation

@neal4rdunderstand one layer bellow your abstraction

external dependencies:

NON-FUNCTIONAL REQUIREMENTS

Love Metrics

Love MetricsDelivered customer benefit?

Love MetricsDelivered customer benefit?Customers actively using it?

Love MetricsDelivered customer benefit?Customers actively using it?

Customers tellings others about it?

técnicavs

ferramenta

feedbackvs

noise

Evolução do Desing

vsGarantia de

Funcionamento

decidir o que não testar é tão importante quanto escrever testes

bring the pain forward

Javascript

JOINTHEBETAHELPUSTESTTDDeLearningexercises

inJAVASCRIPT

industriallogic.com

agradecimentos:@camiloribeiro, @lucabastos,

@neal4rd, @tottinge, @brownie490, @hugocorbucci, @dtsato,

@p_balduino, @mauricioaniche, @cecifernandes, @marick,

@mfeathers, @dhh, @martinfowler, @jamesshore, @joshuakeriesvisky,

@kentbeck, @unclebobmartin, @klauswuestefeld, @guilhermesilveira