Quality Assurance in practice
TATAR Balazs Janos
European Commission, DIGIT
Drupalcamp Vienna 2015
Agenda
• - What is QA and how can it help you and your progress
• - Next Europa WCMS, workflow, challenges and results
• - QA tools
• - Drupal 8 and evolution
Quality Assurance
• "A way of preventing mistakes or defects in
manufactured products and avoiding problems
when delivering solutions or services to
customers."
• Wikipedia
• "The process by which subcontracted projects
(features and sub-themes) are being validated to
comply to the FPFIS platform."
• European Commission, DIGIT, FPFIS Team
Quality Assurance
• Small steps to improve the quality of your project:
• standards,
• code documentation,
• project management softwares,
• clear workflows (not only agile).
Next Europa WCMS
• - European Commission
• - Drupal 7 – multisite
• - Around 80 subsites (different complexity)
• - Core team and Maintenance Team
Next Europa – Maintenance Team
• - WYSIWYD
• - Standardised QA process
• - Support to the subsites
• - Support to the platform
• - Smaller improvements for the subsites
Next Europa – FPFIS Board
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
Code Quality
PHP Mess detector
PHP Copy/Paste detector
PHPdox
PHP Code_sniffer and Code Beautifier and Fixer
PHPMetrics
Testing
PHPUnit (Simpletest)
Behat (Gherkin)
QA tools
• - You
Focus, separate the issues to smaller units
Human part
Pair/peer programming
Learn and teach
QA tools
• - You
Focus, separate the issues to smaller units
Human part
Pair/peer programming
Learn and teach
Drupal 8
• Clean up issues based on phpcs&cbf
• Coder module is not a module anymore
• DrupalCI (Modernizing Testbot Initiative)
Thank you!
• TATAR Balazs Janos
• European Commission, DIGIT
• Brussels, Belgium
• tatarbj@gmail.com
• @tatarbj
Links #1
QA tools
http://phpmd.org/
https://github.com/sebastianbergmann/phpcpd
http://phpdox.de/
https://github.com/squizlabs/PHP_CodeSniffer
http://www.phpmetrics.org/
Testing
https://phpunit.de/
http://docs.behat.org/en/v2.5/
Links #2
• Drupal echidna initiative
• https://www.drupal.org/project/issues/search?iss
ue_tags=coding%20standards
• https://www.drupal.org/node/2571965
• Other links
• https://www.drupal.org/node/144172
• https://www.drupal.org/project/coder
• https://www.drupal.org/coding-standards

Quality assurance in practice

  • 1.
    Quality Assurance inpractice TATAR Balazs Janos European Commission, DIGIT Drupalcamp Vienna 2015
  • 2.
    Agenda • - Whatis QA and how can it help you and your progress • - Next Europa WCMS, workflow, challenges and results • - QA tools • - Drupal 8 and evolution
  • 4.
    Quality Assurance • "Away of preventing mistakes or defects in manufactured products and avoiding problems when delivering solutions or services to customers." • Wikipedia • "The process by which subcontracted projects (features and sub-themes) are being validated to comply to the FPFIS platform." • European Commission, DIGIT, FPFIS Team
  • 11.
    Quality Assurance • Smallsteps to improve the quality of your project: • standards, • code documentation, • project management softwares, • clear workflows (not only agile).
  • 12.
    Next Europa WCMS •- European Commission • - Drupal 7 – multisite • - Around 80 subsites (different complexity) • - Core team and Maintenance Team
  • 13.
    Next Europa –Maintenance Team • - WYSIWYD • - Standardised QA process • - Support to the subsites • - Support to the platform • - Smaller improvements for the subsites
  • 14.
    Next Europa –FPFIS Board
  • 15.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 16.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 18.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 20.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 22.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 25.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 27.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 28.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 30.
    QA tools Code Quality PHPMess detector PHP Copy/Paste detector PHPdox PHP Code_sniffer and Code Beautifier and Fixer PHPMetrics Testing PHPUnit (Simpletest) Behat (Gherkin)
  • 32.
    QA tools • -You Focus, separate the issues to smaller units Human part Pair/peer programming Learn and teach
  • 34.
    QA tools • -You Focus, separate the issues to smaller units Human part Pair/peer programming Learn and teach
  • 35.
    Drupal 8 • Cleanup issues based on phpcs&cbf • Coder module is not a module anymore • DrupalCI (Modernizing Testbot Initiative)
  • 37.
    Thank you! • TATARBalazs Janos • European Commission, DIGIT • Brussels, Belgium • tatarbj@gmail.com • @tatarbj
  • 38.
  • 39.
    Links #2 • Drupalechidna initiative • https://www.drupal.org/project/issues/search?iss ue_tags=coding%20standards • https://www.drupal.org/node/2571965 • Other links • https://www.drupal.org/node/144172 • https://www.drupal.org/project/coder • https://www.drupal.org/coding-standards

Editor's Notes

  • #4 Speak about me in 2-3 sentences (name, workplace, responsabilities) I'm not a native English speaker, but what i'd like to share with the audition is based on my experiences and comes from my heart. In the commission a lot of people come from different countries with many many backgrounds – we all are Europeans, that's why we need to understand and help each other.
  • #5 Wikipedia says it generally. Need to focus on drupal and our solutions in EC. Directorate General for Informatics Flexible Platform for Internet Services
  • #7 Project managers hate us because they cannot count with the quality of their developers – and we will be in crosshairs (célkereszt). In the short term they really heat us, because we BLOCK them and can block the deadlines.
  • #8 Developers hate us, because they don’t like to focus on the quality, just deliver what PMs asked. When we report the problems what they did, they have to fix those. Short term they really hate us.
  • #9 The client also hates us because of the delays.
  • #11 Long term goals: do not worry, they will realise they actually love you and your reports.
  • #12 Focus on the pros, but not forget to mention the cons! Start with small steps, it will increase the quality of the software what you make without huge time investment. Standards: coding standards – easily adoptable: good and well settled IDE (phpstorm, netbeans …) Code documentations: mention your ticket in code, header phpdoc documentations, where the complexity of the code is getting big put some explanation, or at most refactor it. Project management softwares: Atlassian softwares (jira, confluence) use it or forget the success (in a one man business as well!) Clear workflows: no need to use agile if it's not fit to your project. BUT there should be clear definied steps. Ours: todo list, build&fix, QA, functional test, released/closed.
  • #14 What you see is what you deliver: our workflow has to be transparent and objective. We check custom features, custom themes, contrib modules to use in a subsite (but not the quality of the contrib!)
  • #16 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #17 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #18 Php mess detector - scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code.
  • #19 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #20 Php copy/paste detector
  • #21 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #23 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #24 phpcs
  • #25 phpcbf
  • #26 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #27 Phpmetrics
  • #28 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #29 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #30 PHPUnit
  • #31 Phpunit/simpletest – unit testing Behat – behaviour driven testing Php mess detector – scan for possible bugs, suboptimal code, overcomplicated expression and my favourite one: dead code. Php copy/paste detector – duplicated code Phpdox – documentation generator phpcs&cbf Phpmetrics – complexity, volume, oo, maintainability, halstead complexity measures.
  • #32 Behat
  • #33 Focus: try to be focus when you need to write code and when you need to check code! Human part: no one is perfect, everyone can take mistakes, be professional and understanding Pair programming: two developers work on the same workstation. One is the driver, the other is observer, pointer, navigator. They switch roles frequently. Learn and teach: a team can be big with juniors and seniors, experts. It is possible when an expert learns something from a junior, be open mind and let your collagues show you their practices.
  • #34 Focus: try to be focus when you need to write code and when you need to check code! Human part: no one is perfect, everyone can take mistakes, be professional and understanding Pair programming: two developers work on the same workstation. One is the driver, the other is observer, pointer, navigator. They switch roles frequently. Learn and teach: a team can be big with juniors and seniors, experts. It is possible when an expert learns something from a junior, be open mind and let your collagues show you their practices.
  • #35 Focus: try to be focus when you need to write code and when you need to check code! Human part: no one is perfect, everyone can take mistakes, be professional and understanding Pair programming: two developers work on the same workstation. One is the driver, the other is observer, pointer, navigator. They switch roles frequently. Learn and teach: a team can be big with juniors and seniors, experts. It is possible when an expert learns something from a junior, be open mind and let your collagues show you their practices.
  • #36 Cleanup issues on d.org issue tracker, Pieter Frenssen and i started to discuss about it during our daily work and made progress on the drupal community. Please join us! Coder module (Klausi) is not a simple module anymore, interface for checking the coding standards and make reports about your project, help to clean it up. DrupalCI sub-project is responsible for the test runners being used on the infrastructure. This project's repository contain's the project's docker container definitions, and a Symfony Console application which executes the actual testing process itself.