testes automatizados o time e o cliente saem ganhando! @ agile vale 2014
DESCRIPTION
Entenda por que devemos ter testes automatizados em qualquer sistema, independente do seu tamanho. Por que teste automatizado é um investimento. Conheça o TDD e o BDD. Saiba qual o valor gerado pelos testes automatizados para o time e para o cliente. Como vender os testes automatizados ao vender o seu projeto.TRANSCRIPT
![Page 1: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/1.jpg)
TESTES AUTOMATIZADOS O TIME E O CLIENTE SAEM
GANHANDO!
![Page 2: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/2.jpg)
MAURO QUEM…
![Page 3: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/3.jpg)
![Page 4: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/4.jpg)
![Page 6: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/6.jpg)
POR QUE DEVEMOS TESTAR?
![Page 7: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/7.jpg)
POR QUE DEVEMOS TESTAR?Sistemas grandes sem testes
![Page 8: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/8.jpg)
POR QUE DEVEMOS TESTAR?Teste é investimento
![Page 9: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/9.jpg)
POR QUE DEVEMOS TESTAR?Sistemas sem testes
![Page 10: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/10.jpg)
POR QUE DEVEMOS TESTAR?Sistemas pequenos viram grandes
![Page 11: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/11.jpg)
POR QUE DEVEMOS TESTAR?Mas isso vende?
![Page 12: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/12.jpg)
TESTES AUTOMATIZADOS
![Page 13: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/13.jpg)
TDDTest-driven development
![Page 14: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/14.jpg)
TDDO que é
![Page 15: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/15.jpg)
calculator_spec.rbRSpec.describe Calculator do!! describe ‘.sum' do!! it 'sum 2 and 2' do! expect(Calculator.sum(2, 2)).to eq(4)! end! end!end!
![Page 16: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/16.jpg)
console$ rspec spec/calculator_spec.rb!!/path/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:481:in `load_missing_constant': Unable to autoload constant Calculator, expected /path/calculator.rb to define it (LoadError)!! from /path/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:180:in `const_missing'!! from /path/spec/calculator_spec.rb:3:in `<top (required)>'!! from /path/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load'!! from /path/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `block in load_spec_files'!! from /path/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `each'!! from /path/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load_spec_files’ …
![Page 17: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/17.jpg)
calculator.rbclass Calculator!! def self.sum(a, b)! 4! end!end
![Page 18: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/18.jpg)
console$ rspec spec/calculator_spec.rb!!Run options: include {:focus=>true}!!All examples were filtered out; ignoring {:focus=>true}!!Calculator! .sum! sum 2 and 2!!Finished in 0.20637 seconds (files took 4.72 seconds to load)!1 example, 0 failures!!Randomized with seed 49032
![Page 19: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/19.jpg)
calculator_spec.rbRSpec.describe Calculator do!! describe '.sum' do!! it 'sum 2 and 2' do! expect(Calculator.sum(2, 2)).to eq(4)! end!! it 'sum 3 and 2' do! expect(Calculator.sum(3, 2)).to eq(5)! end! end!end!
![Page 20: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/20.jpg)
console 1) Calculator.sum sum 3 and 2! Failure/Error: expect(Calculator.sum(3, 2)).to eq(5)!! expected: 5! got: 4!! (compared using ==)! # ./spec/calculator_spec.rb:12:in `block (3 levels) in <top (required)>'!!Finished in 0.24562 seconds (files took 4.67 seconds to load)!2 examples, 1 failure!!Failed examples:!!rspec ./spec/calculator_spec.rb:11 # Calculator.sum sum 3 and 2
![Page 21: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/21.jpg)
calculator.rbclass Calculator!! def self.sum(a, b)! a + b! end!end!
![Page 22: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/22.jpg)
consoleRun options: include {:focus=>true}!!All examples were filtered out; ignoring {:focus=>true}!!Calculator! .sum! sum 2 and 2! sum 3 and 2!!Finished in 0.20995 seconds (files took 4.78 seconds to load)!2 examples, 0 failures!!Randomized with seed 64301
![Page 23: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/23.jpg)
TDDBaby steps
![Page 24: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/24.jpg)
TDDRefactoring
![Page 25: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/25.jpg)
TDDDesign de código
![Page 26: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/26.jpg)
TDDSimplicidade
![Page 27: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/27.jpg)
TDDQualidade
![Page 28: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/28.jpg)
TDDCoding Dojo
![Page 29: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/29.jpg)
BDDBehavior-driven development
![Page 30: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/30.jpg)
calculator_spec.rbRSpec.describe Calculator do!! describe '.sum' do!! it 'sum positive values' do! expect(Calculator.sum(2, 2)).to eq(4)! end!! it 'sum negative values' do! expect(Calculator.sum(-3, -2)).to eq(-5)! end! end!end!
![Page 31: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/31.jpg)
DIA A DIA
![Page 32: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/32.jpg)
DIA A DIAComeçar o projeto já com os testes
![Page 33: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/33.jpg)
DIA A DIATDD/BDD
![Page 34: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/34.jpg)
DIA A DIA100% de cobertura de testes
![Page 35: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/35.jpg)
DIA A DIACódigo coletivo
![Page 36: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/36.jpg)
DIA A DIATestes como documentação
![Page 37: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/37.jpg)
DIA A DIAProjeto não para se alguém do time for para a NASA
![Page 38: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/38.jpg)
DIA A DIABuild de dez minutos
![Page 39: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/39.jpg)
DIA A DIAIntegração continua
![Page 40: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/40.jpg)
DIA A DIADeploy continuo
![Page 41: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/41.jpg)
XP
![Page 42: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/42.jpg)
XPCoragem
![Page 43: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/43.jpg)
XPSimplicidade
![Page 44: Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014](https://reader033.vdocuments.pub/reader033/viewer/2022052907/55941a0f1a28abe92b8b458f/html5/thumbnails/44.jpg)
OBRIGADO!