abordando tdd no i os

Post on 23-Jan-2018

117 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ABORDANDO TDD NO IOSUtilizando Xcode, swift e boa fé.

GABRIEL OLIVA

➤ Mineiro que não come queijo;

➤ iOS developer @ CI&T;

➤ Coffee addicted;

➤ Baterista aposentado.

@gabrieloliva_

/gabrieloliva

AGENDA

➤ O que é TDD?

➤ Por que utilizar TDD?

➤ Como utilizar TDD no iOS?

O QUE É TDD?

O QUE É TDD?

➤ Escrever primeiramente o teste falho

➤ Escrever a quantidade mínima de código para o teste passar

➤ Refatorar

O QUE É TDD?

POR QUE UTILIZAR TDD?

POR QUE UTILIZAR TDD?

0

20

40

60

80

Hoje 1 mês depois 2 meses depois 3 meses depois

POR QUE UTILIZAR TDD?

➤ No final das contas, TDD é sobre automatizar essa processo chato de escrever teste

VANTAGENS DO TDD

➤ Alta cobertura de teste

➤ Menos debug

➤ Testes documentam o código

➤ Fácil manutenção

➤ Código modular

➤ Você só escreve o código que precisa

DESVANTAGENS DO DDD

➤ Não é bala de prata

➤ Parece mais lento no início

➤ Todos os membros do time precisam utilizar

➤ Não é recomendável para protótipos

COMO UTILIZAR TDD NO IOS

COMO UTILIZAR TDD NO IOS?

SUnit

1994

OCUnit

1998

OCUnit no Xcode

2005

“Core Data 1.0 is not perfect, but it is a rock solid product that I’m damned proud of. The quality and performance achieved could not have been done without the use of unit testing.

-Bill Bumgarner

http://www.friday.com/bbum/2005/09/24/unit-testing/

COMO UTILIZAR TDD NO IOS?

OCUnit no iPhone SDK 2.2

2008

Renomeado para XCUnit

2012

Teste unitário se torna first-class citizen com introdução do XCTest

2013

TDD NO XCODE

E AGORA?

➤ Apple promove teste unitário (XCTest, UITesting, Apple Server, etc)

➤ Vai levar tempo…

➤ Pratique!

LIVROS

INTERNET

http://nshipster.com/unit-testing/

INTERNET

https://www.objc.io/issues/15-testing/

OBRIGADO!

top related