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

Besser spät als nie - Testsuite in bestehende React Application nachziehen

Besser spät als nie - Testsuite in bestehende React Application nachziehen

Slides to my talk at ct'webdev 2021.

Mirjam Aulbach

December 07, 2021
Tweet

More Decks by Mirjam Aulbach

Other Decks in Programming

Transcript

  1. Besser spät als nie! Testsuite in bestehende React Application nachziehen

    @mirjam_diala • | @programmiri • programmiri.rocks
  2. Me when someone says they don't like testing media source:

    https://giphy.com/gifs/reaction-dogs-texting-RGK9jWz0t89Hy
  3. Fahrplan ✔ Hello World! " Ausgangslage # Erste Schritte $

    Wann testen? % Wie testen? & Die 3 wichtigsten Learnings ' Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  4. Stand 23.03.2018 → 38.181 Zeilen Code → 291 JS Dateien

    → 238 React Komponenten @mirjam_diala • | @programmiri • programmiri.rocks
  5. "To me, legacy code is simply code without tests." Michael

    C. Feathers, Working Effectively with Legacy Code media source: https://getyarn.io/yarn-clip/7555a768-216e-40a0-9f9d-bb417a138186
  6. Warum Testsuite nachziehen? → Zukunftssicher sein → Erweiterbarkeit erhalten →

    Refactoring vereinfachen → Bugs langfristig reduzieren → Bugs vor dem User finden media source: https://gfycat.com/piercinghospitabledwarfrabbit
  7. Fahrplan ✔ Hello World! ✔ Ausgangslage " Erste Schritte #

    Wann testen? $ Wie testen? % Die 3 wichtigsten Learnings & Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  8. Wie sag ich's... → !"#$% → &'() → *+,⏰ @mirjam_diala

    • | @programmiri • programmiri.rocks
  9. Hilfreiche Werkzeuge Helfen vor dem ersten Test, versprochen. → Code

    Formatter und Linting → Komponenten Bibliothek → Schnellere UI Tests → Error Tracking @mirjam_diala • | @programmiri • programmiri.rocks
  10. Workflow Regeln → Tests vor Commit → Tests vor Build

    → Tests in Code Review → Improvement Tickets für Refactorings @mirjam_diala • | @programmiri • programmiri.rocks
  11. Fahrplan ✔ Hello World! ✔ Ausgangslage ✔ Erste Schritte "

    Wann testen? # Wie testen? $ Die 3 wichtigsten Learnings % Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  12. Fahrplan ✔ Hello World! ✔ Ausgangslage ✔ Erste Schritte ✔

    Wann testen? " Wie testen? # Die 3 wichtigsten Learnings $ Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  13. Reihenfolge ! ⭕ Tests ! @mirjam_diala • " | #

    @programmiri • $ programmiri.rocks
  14. Reihenfolge ! ✅ Tests # ⭕ Refactor -> rinse and

    repeat! ! @mirjam_diala • " | # @programmiri • $ programmiri.rocks
  15. Reihenfolge ! ✅ Tests # ✅ Refactor ! ⭕ Tests

    # ⭕ Code $ ⭕ Refactor media source: https://giphy.com/gifs/mad-lights-2d-3oKIP833PIFb553OP6
  16. Fahrplan ✔ Hello World! ✔ Ausgangslage ✔ Erste Schritte ✔

    Wann testen? ✔ Wie testen? " Die 3 wichtigsten Learnings # Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  17. Mit diesen 3 Tipps kannst du nix mehr falsch machen

    quasi @mirjam_diala • | @programmiri • programmiri.rocks
  18. Tipp zum Separieren: . . VanillaJS is love, VanillaJS is

    life!1 1 Ja ja, gilt auch für TypeScript! media source: https://giphy.com/gifs/ice-oddlysatisfying-cone- uflBFkDR2T9m
  19. Tipp zum Separieren: . . Dumb is the new sexy!2

    2 Nur bei Code Komponenten. media source: https://giphy.com/gifs/talk-warming-rpt-Q1aRmd8e90WIw
  20. Learning #3 Perfektion ist keine Ausrede “Imperfect action is better

    than perfect inaction.” – Harry Truman media source: https://giphy.com/gifs/hoppip-art-film-bOflabuL47FKg
  21. Fahrplan ✔ Hello World! ✔ Ausgangslage ✔ Erste Schritte ~~

    ✔ ~~Wann testen? ✔ Wie testen? ✔ Die 3 wichtigsten Learnings " Rückblick & Fazit @mirjam_diala • | @programmiri • programmiri.rocks
  22. And that's it! Danke ! → Twitter: @mirjam_diala → Twitter:

    @Conf_Buddy → Github/Gitlab: programmiri → Web: programmiri.rocks media source: https://www.youtube.com/watch?v=EH3X4469Aag