Top Banner
Test Driven Development Diego Caxito
28

Treinamento TDD

Jul 24, 2015

Download

Software

Diego Caxito
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Treinamento TDD

Test Driven DevelopmentDiego Caxito

Page 2: Treinamento TDD

Changing Software Reason

1. Adding a feature

2. Fixing a bug

3. Improving the design

4. Optmize resource usage

Working Effectively With Legacy Code

Page 3: Treinamento TDD

Usual Flow

Build Code

Build App

Test Manually

Page 4: Treinamento TDD

at the time

Change can be paintfull

Page 6: Treinamento TDD

Lean startup loop fundamental

Page 7: Treinamento TDD

Do push para a produção - Agile Brazil 2014

Page 9: Treinamento TDD

Test pyramid

Martin Fowler Bliki

Page 10: Treinamento TDD

Do push para a produção - Agile Brazil 2014

Page 11: Treinamento TDD

when someone begin with automation

Page 12: Treinamento TDD

Software testing pattern Ice-cream Cone Anti-Pattern

Watirmelon.com

Page 13: Treinamento TDD

Diferent tests can be overlap

Pragmmatic not dogmatic TDD

Page 15: Treinamento TDD

Test pyramid

Martin Fowler Bliki

Page 16: Treinamento TDD

Unit Test

Page 17: Treinamento TDD

Unit test

“Unit tests is the idea that they are tests in isolation of individual components of software.”

Page 18: Treinamento TDD

Good Unit Test

It should be automated and repeatable.

It should be easy to implement.

Once it’s written, it should remain for future use.

Anyone should be able to run it.

It should run at the push of a button.

It should run quickly.The art of uniting testing

Page 19: Treinamento TDD
Page 20: Treinamento TDD

TDD

Page 21: Treinamento TDD

Baby steps

Page 22: Treinamento TDD

Como a prática de TDD influencia o projeto de classes em sistemas orientados a objetos.

Como a prática de TDD influencia o projeto de classes em sistemas orientados a objetos.

Page 23: Treinamento TDD

Hello world!!!!!

Page 24: Treinamento TDD

Jasmine

● describe● it● expect

○ toEqual○ toBe○ not

http://jasmine.github.io/

Page 25: Treinamento TDD

Exercise

Page 26: Treinamento TDD

Dojo

Page 27: Treinamento TDD

Mock

Mock roles, not objects!

● como testar seu projeto javascript com dependência○ isolando-a

Page 28: Treinamento TDD

Obrigado!