Creating A Unit Testing Strategy

Post on 12-Jan-2017

296 views 2 download

Transcript of Creating A Unit Testing Strategy

@gil_zilberfeld

Unit testing strategy

@gil_zilberfeld

Hello!

I AM GIL ZILBERFELD

www.gilzilberfeld.comwww.everydayunittesting.com

www.fastee.im

@gil_zilberfeld

@gil_zilberfeld

What is unit testing?

@gil_zilberfeld

What is unit testing?

And why does it need a strategy?

@gil_zilberfeld

Brian Marick’s Testing

Quadrants

@gil_zilberfeld

Skills

PlanningWriting

DesigningPrioritizing

TestingReporting

RefactoringAnd more…

@gil_zilberfeld

The grand plan

Where do we test?

What kind of tests?

What can give us the most confidence?

What can we not test?

@gil_zilberfeld

Ten steps to the epiphany

@gil_zilberfeld

Prerequisites

Source control

Continuous integration

Branching methodology

Training

@gil_zilberfeld

Which way to go?

Test first or after

TDD and BDD

Which tools to use

Skillz

@gil_zilberfeld

Understanding the problem

Slicing the stories

Mapping test cases

Risks

Edge cases

@gil_zilberfeld

Dealing with legacy code

What are the risks

Critical code

Recurring bugs

Preparatory refactoring

@gil_zilberfeld

Designing a solution

Where are the dependencies

What will need mocking

Remember to involve the testers

@gil_zilberfeld

Design for testability

Use ports and adapters

Expose seams

Avoid the evil singletons

Use the SOLID principles

@gil_zilberfeld

Test categorization

What is a unit

Test organization

What can we run quickly

Set the CI to run the different levels

@gil_zilberfeld

Write the tests

About time, isn’t it?

@gil_zilberfeld

Review

Code review

Test review

Documentation

Definition of Done

@gil_zilberfeld

Knowledge sharing

… is knowledge caring

Don’t keep what you’ve learned for

yourself!

@gil_zilberfeld

Unit testing?

There’s a process for that!

@gil_zilberfeld

Thanks!

ANY QUESTIONS?

You can find me at:@gil_zilberfeld

http://www.GilZilberfeld.comhttp://www.EverydayUnitTesting.com

http://www.fastee.im