Test Driven Development
Diego Caxito
Changing Software Reason
1. Adding a feature
1. Fixing a bug
1. Improving the design
1. Optmize resource usage
Working Effectively With Legacy Code
Usual Flow
Build Code
Build App
Test Manually
at the time
Change can be paintfull
In software, when something is
painful, the way to reduce the pain is
to do it more frequently, not less
Continuous Delivery
Lean startup loop fundamental
Do push para a produção - Agile Brazil 2014
Type of Tests
Continuous Delivery
Test pyramid
Martin Fowler Bliki
Do push para a produção - Agile Brazil 2014
when someone begin with
automation
Software testing pattern Ice-cream Cone Anti-Pattern
Watirmelon.com
Diferent tests can be overlap
Pragmmatic not dogmatic TDD
Ideal
Watirmelon.com
Test pyramid
Martin Fowler Bliki
Unit Test
Unit test
“Unit tests is the idea that they are tests in isolation of
individual components of software.”
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
TDD
Baby steps
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.
Hello world!!!!!
Jasmine
● describe
● it
● expect
○ toEqual
○ toBe
○ not
http://jasmine.github.io/
Exercise
Dojo
Mock
Mock roles, not objects!
● como testar seu projeto javascript com dependência
○ isolando-a
Obrigado!

Treinamento TDD

Editor's Notes

  • #3 Working Effectively With Legacy Code
  • #4 quanto mais aplicação se constrói, mas difícil fica de sair testando tudo
  • #24 Não depende de linguagem, language of your preference