Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[devsopsdaysssa-2023] Os testes atrasaram meu p...

[devsopsdaysssa-2023] Os testes atrasaram meu projeto

Nessa palestra discutiremos um estudo de caso de como os testes (ou a falta deles) atrasaram um projeto em que trabalhei. Discutiremos o contexto do problema, tipos de testes, a hipótese que tínhamos na época, qual foi o resultado das ações que tomamos, a solução final para o problema e, por fim, as lições aprendidas dessa experiência.

Hugo Marques

December 17, 2023
Tweet

More Decks by Hugo Marques

Other Decks in Programming

Transcript

  1. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 2023 Os testes atrasaram meu projeto //by Hugo Marques 😱
  2. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 />
  3. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 /> A importância de bons testes automatizados.
  4. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Contexto 02 Conceitos 03 Hipótese 04 Resultados 05 Solução 06 Aprendizado
  5. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Sobre mim </> Devopsdays Salvador 2023 } :D [
  6. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Contexto 01 </> 2023 } ;) [
  7. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Diversos times 02 Requisitos ambíguos 03 Timeline agressiva 04 Arquitetura não-trivial front-end back-end infra
  8. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  9. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Problema: projeto atrasado
  10. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  11. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Conceitos de testes 02 </> 2023 } ;) [
  12. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Testes de unidade} Conceitos
  13. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  14. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Testes de integração} Conceitos
  15. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  16. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Testes end-to-end}
  17. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  18. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Hipótese 03 </> 2023 } ;) [
  19. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  20. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Por que achamos que daria certo?} />
  21. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Time experiente
  22. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Time experiente 02 90%+ testes de unidade
  23. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Time experiente 02 90%+ testes de unidade 03 ROI dos testes de integração
  24. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Deu tudo certo? #partiu
  25. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Resultados 04 </> 2023 } ;) [
  26. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Deu tudo certo? #SQN
  27. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Onde foi que erramos?} />
  28. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  29. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  30. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  31. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  32. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  33. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  34. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Corrige erro O ciclo do caos
  35. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Corrige erro Deploy em dev Stage O ciclo do caos
  36. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Corrige erro Deploy em dev Stage Teste manual O ciclo do caos
  37. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Corrige erro Deploy em dev Stage Encontra novo erro Teste manual O ciclo do caos
  38. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  39. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Solução 05 </> 2023 } ;) [
  40. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 {Como resolvemos isso?} />
  41. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Modelar os casos de teste no código
  42. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Modelar os casos de teste no código 02 Utilizar testes de integração
  43. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Modelar os casos de teste no código 02 Utilizar testes de integração 03 Utilizar testes end-to-end
  44. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  45. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  46. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Infrastructure as Code
  47. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Infrastructure as Code 02 AWS CDK
  48. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Infrastructure as Code 02 AWS CDK 03 Testes escrito com JUnit5 + Awaitibility
  49. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  50. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  51. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  52. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  53. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
  54. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Aprendizado 06 </> 2023 } ;) [
  55. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Testes automatizados sempre
  56. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Testes automatizados sempre 02 Paradoxo do pesticida
  57. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Testes automatizados sempre 02 Paradoxo do pesticida 03 Testes se pagam no longo prazo
  58. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 01 Testes automatizados sempre 02 Paradoxo do pesticida 03 Testes se pagam no longo prazo 04 Invistam em IaC
  59. 1 0 1 1 0 1 1 0 1 1

    0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 Obrigado! </> 2023 Créditos: Slidesgo · Flaticon · Freepik · Midjourney } :D [ @hugaomarques hugodesmarques helloworldcomics dev.to/hugaomarques