$30 off During Our Annual Pro Sale. View Details »

Software quality, cheese and games

Software quality, cheese and games

Oliver Klee

August 05, 2022
Tweet

More Decks by Oliver Klee

Other Decks in Programming

Transcript

  1. Q U A L I T Y, C H E

    E S E A N D G A M E S T 3 D D 2 2 | 2 0 2 2 - 0 8 | O L I V E R K L E E | @ O L I K L E E | M A S T O D O N : O L I K L E E @ C H A O S . S O C I A L
  2. T H E T Y P O 3 Q U

    A L I T Y A S S U R A N C E I N I T I AT I V E #qa-best-practices
  3. A B O U T M E Oliver „Oli“ Klee

    #bonn #extension-dev #workshop-teacher #unit-testing-guy #phpstan-guy #typo3-ombudsperson #typo3-quality-assurance-initiative #gamification-working-group #game-cooking #powermetal
  4. T H E R E A R E N O

    S T U P I D Q U E S T I O N S .
  5. W H AT I S S O F T WA

    R E Q U A L I T Y ? as few bugs as possible we’re not playing Jenga the code is easy to change upgrades und refactorings pose little risk
  6. W H Y I N C R E A S

    E S O F T WA R E Q U A L I T Y ? because it’s a promise to out customers because we want to be able to be proud of our work because we’re too old for bad code
  7. W H E N Q U A L I T

    Y M I G H T B E N O T I M P O R TA N T throw-away prototypes very short-lived projects demonstration/example code
  8. T H E S W I S S C H

    E E S E M O D E L https://upload.wikimedia.org/wikipedia/commons/3/36/SwissCheese_Respiratory_Virus_Interventions-ver3.0.png
  9. T Y P E S O F C H E

    E S E F O R S O F T WA R E Q U A L I T Y static analysis (syntax, style, types …) dynamic tests (unit, functional, …) code reviews (by humans)
  10. C H O O S I N G T O

    O L S F O R S O F T WA R E Q U A L I T Y M o re i s b ette r. D o n ot d u p licate. P H P S ta n v s. 
 Ps a l m C h e ck w h at yo u h a v e. S te a l f ro m T Y P O 3.
  11. C L A S S E S O F T

    O O L S F O R S O F T WA R E Q U A L I T Y 🚀 
 f i re a n d fo rg et exa m p le : P H P 
 C S F i xe r 🐿 
 s lo w ly f i x e v e r y t h i n g exa m p le : 
 P H P S ta n 🏋 
 co n sta nt ly d o it exa m p le : 
 co d e re v i e w s 🛠 
 s e l f - m a d e
  12. T Y P O 3 C O R E :

    C O D E R E V I E W S 🏋 re v i e w 
 by re a d i n g 🏋 v e r if y 
 by m a n u a l te st i n g
  13. T Y P O 3 C O R E :

    B U I L D M AT R I X A N D S Y S T E M CI runner GitLab CI PHP versions 7.4/8.1–8.2 test run order fixed, randomized Composer dependencies lowest, highest, locked DMBS MySQL, MariaDB, Postgres, SQLite
  14. T Y P O 3 C O R E :

    D Y N A M I C T E S T S Test Type Tool Language 🏋 unit tests PHPUnit PHP 🏋 functional tests PHPUnit PHP 🏋 acceptance tests 
 (end-to-end tests) Codeception PHP
  15. T Y P O 3 C O R E :

    S TAT I C C O D E T O O L S Tool Type Tool Language 🚀 code autoformatter, 
 style checker PHP CS Fixer PHP 🚀 IDE settings .editorcon fi g all 🚀 TYPO3 coding standards Composer package
  16. T Y P O 3 C O R E :

    S TAT I C C O D E T O O L S Tool Type Tool Language 🚀 syntax checker Lint: php -l PHP 🚀 style checker Stylelint SCSS 🚀 style checker ESLint TypeScript 🐿 type checker PHPStan PHP
  17. T Y P O 3 C O R E :

    🛠 H O M E G R O W N T O O L S Check Type Language/Tool 🚀 PHPDoc annotation PHP 🚀 PSR-4 namespaces PHP 🚀 duplicate exception codes PHP
  18. T Y P O 3 C O R E :

    🛠 H O M E G R O W N T O O L S Check Type Language/Tool 🚀 UTF-8 byte order marks (BOM) all text files 🚀 maximum file path length all files 🚀 git file permissions git 🚀 git submodules git
  19. T Y P O 3 C O R E :

    🛠 H O M E G R O W N T O O L S Check Type Language/Tool 🚀 ReST file structure ReST 🚀 extension scanner entries vs. changelog ReST 🚀 build & compare artifacts SCSS/CSS 🚀 build & compare artifacts TypeScript/JavaScript
  20. T Y P O 3 C O R E :

    🛠 H O M E G R O W N T O O L S Check Type Language/Tool 🚀 composer.json of monorepo 
 vs. system extensions Composer 🚀 file indentation against .editorcon fi g HTML
  21. T Y P O 3 T E A E X

    A M P L E E X T E N S I O N : T O O L S Tool Type Tool Language/Ecosystem 🚀 CI runner GitHub Actions – 🚀 dependency updater Dependabot Composer, npm 🚀 TER release Tailor TER 🚀 Code coverage Coveralls PHPUnit
  22. T Y P O 3 T E A E X

    A M P L E E X T E N S I O N : T O O L S Tool Type Tool Language/Ecosystem 🚀 syntax & style JSON Lint JSON 🚀 syntax & style TypoScript Lint TypoScript 🚀 syntax & style YAML Lint YAML 🚀 syntax & style PHP_CodeSniffer PHP
  23. T Y P O 3 T E A E X

    A M P L E E X T E N S I O N : T O O L S Tool Type Tool Language/Ecosystem 🚀 syntax & style Prettier JavaScript 🚀 syntax & structure XLIFF Lint XLIFF 🚀 duplicate code PHPCPD PHP 🚀 consistency Normalize Composer
  24. H O N O R A B L E M

    E N T I O N S Tool Type Tool Language/Ecosystem 🐿 type schecker Phan PHP 🐿 type checker Psalm PHP 🐿 taint analysis (security) Psalm PHP 🐿 strict type checker 😉 strict rules PHPStan
  25. H O N O R A B L E M

    E N T I O N S Tool Type Tool Language/Ecosystem 🐿 code metrics PHPMD PHP 🐿 mutation testing Infection PHPUnit 🐿 Fuzzing PHP Fuzzer PHPUnit 🐿 type checker PHP Inspections PhpStorm
  26. H O N O R A B L E M

    E N T I O N S Tool Type Tool Language/Ecosystem 🚀 PHP compatibility compatibility rules PHP_CodeSniffer 🐿 auto-refactorings Rector PHP 🐿 TYPO3 upgrades TYPO3Scan TYPO3
  27. H O N O R A B L E M

    E N T I O N S Tool Type Tool Language/Ecosystem 🏋 acceptance tests Cypress JavaScript 🏋 unit tests Cypress JavaScript 🏋 unit tests Jest JavaScript 🏋 BDD Behat PHP
  28. H O N O R A B L E M

    E N T I O N S Tool Type Tool Language/Ecosystem 🚀 security Composer audit Composer 2.4 🚀 security npm audit npm 🐿 accessibility axe Chrome 🏋 performance Lighthouse Chrome
  29. L E V E L S A N D C

    L E A R G O A L S
  30. L E V E L S A N D C

    L E A R G O A L S rule levels for PHPStan and Psalm baseline file (with a blocklist) enable rules one after the other write tests only when you change the code cover one class per week with tests
  31. P L AY I N G S O M E

    C H A L L E N G E S Which rule level can we reach? How high can we get the code coverage? How few mutations will escape our tests? How much can we code in a test-driven way? Which things can we automate?
  32. B U I L D I N G Y O

    U R PA R T Y make use of superpowers in your team work around weaknesses in your team let the computer check the small things celebrate your achievements
  33. J O I N U S ! Talk to us

    at the coding night. 
 Or join the Slack channel: #qa-best-practices