SlideShare a Scribd company logo
Quality in PHP projects beyond Unittests
  International PHP Conference 2008
  October 30th 2008 | Thorsten Rinne
Introduction


❙ Thorsten Rinne
❙ 31 years old
❙ Senior Developer and Team Lead at Mayflower GmbH
   ❙ Reporting applications
   ❙ Rating applications
   ❙ PHP consulting for QA and migration problems
❙ PHP software development since 1999
❙ Founder and main developer of open source FAQ
  management software phpMyFAQ since 2001
❙ Zend Certified Engineer (PHP 5)

                                                     Quality in PHP projects
                                                     beyond Unittests

                                                     © MAYFLOWER GmbH 2008 2
Introduction


❙ Warm up
❙ Quality Criterias
❙ Quality Metrics
❙ Testing
❙ PHP Source Code Quality
❙ Questions and answers




                            Quality in PHP projects
                            beyond Unittests

                            © MAYFLOWER GmbH 2008 3
Who are you?


❙ What's your profession?
❙ Software company or agency?
❙ What's your team size?
❙ Who develops using Unittests?
❙ Who uses QA supporting tools?
   ❙ What's your test coverage?
   ❙ Even for legacy code? :-)




                                  Quality in PHP projects
                                  beyond Unittests

                                  © MAYFLOWER GmbH 2008 4
Quality Criterias



                    Quality in PHP projects
                    beyond Unittests

                    © MAYFLOWER GmbH 2008 5
Quality criterias:
Understandability

❙ Availability of documentation
❙ Good documentation quality
❙ Complexity of software
❙ Code commenting and formatting
❙ Understandable naming




                                   Quality in PHP projects
                                   beyond Unittests

                                   © MAYFLOWER GmbH 2008 6
Quality criterias:
Completeness

❙ Everything is already there
   ❙ Your application is fully implemented
   ❙ No mockups or temporary solutions left
   ❙ External interfaces are usable
   ❙ All needed data is available




                                              Quality in PHP projects
                                              beyond Unittests

                                              © MAYFLOWER GmbH 2008 7
Quality criterias:
Conciseness

❙ No unneeded, overlong documentation
   ❙ Especially auto-generated documentation
❙ No unused libraries
❙ No dead code
❙ No duplicate code
❙ No code inside loops that could be outside




                                               Quality in PHP projects
                                               beyond Unittests

                                               © MAYFLOWER GmbH 2008 8
Quality criterias:
Portability

❙ Easy to configure in new environments
❙ Few OS and webserver dependencies
❙ Few, documented version dependencies
   ❙ Language version
   ❙ Database version
   ❙ External libraries
❙ Able to survice environment updates




                                          Quality in PHP projects
                                          beyond Unittests

                                          © MAYFLOWER GmbH 2008 9
Quality criterias:
Consistency

❙ Predictability
   ❙ Directory paths and filenames
   ❙ Class and method names
   ❙ Variable and constant names
❙ Documentation style and language
❙ Coding style




                                     Quality in PHP projects
                                     beyond Unittests

                                     © MAYFLOWER GmbH 2008 10
Quality criterias:
Maintainability

❙ Easy to install and easy to upgrade
❙ Tests and debug logs to help to locate bugs
❙ Few dependencies hiding the bug
❙ No complex dependencies or effects on the platform
❙ Easy to understand and navigate source code




                                                       Quality in PHP projects
                                                       beyond Unittests

                                                       © MAYFLOWER GmbH 2008 11
Quality criterias:
Testability

❙ Known acceptence criteria
❙ Adequate separation of concerns
❙ Easy to use interfaces for tests
❙ No limiting dependencies




                                     Quality in PHP projects
                                     beyond Unittests

                                     © MAYFLOWER GmbH 2008 12
Quality criterias:
Reliability

❙ The criteria formerly known as „robustness“
❙ Fault tolerance
❙ Graceful degradation
❙ Exception handling exists
❙ Is method input checked?




                                                Quality in PHP projects
                                                beyond Unittests

                                                © MAYFLOWER GmbH 2008 13
Quality criterias:
Usability

❙ Learnability: Easyness of first time usage
❙ Efficiency: Overall speed of usage per task
❙ Memorabilty: Time to re-establish usage knowledge after
  absence
❙ Errors: Frequency of usage errors
❙ Satisfaction: Fun to use the software




                                                            Quality in PHP projects
                                                            beyond Unittests

                                                            © MAYFLOWER GmbH 2008 14
Quality Metrics



                  Quality in PHP projects
                  beyond Unittests

                  © MAYFLOWER GmbH 2008 15
Quality Metrics:
Defect Density Metrics

❙ Code-based metric
   ❙ Defects per KSSI (1000 shipped source instructions) for
     product quality
   ❙ Defects per KCSI (1000 changed source instructions)
     for development quality
❙ (Hard to measure)
   ❙ Statistic needed
   ❙ easier for products




                                                               Quality in PHP projects
                                                               beyond Unittests

                                                               © MAYFLOWER GmbH 2008 16
Quality Metrics:
Customer Problem Metrics

❙ PUM: Problems per user month
❙ Defects per month / number of installations
❙ Maintainance metric: Number of bugs closed / number of
  bugs arrived
❙ The customer does not care how big or how complicated
  the software is :-)




                                                           Quality in PHP projects
                                                           beyond Unittests

                                                           © MAYFLOWER GmbH 2008 17
Quality Metrics:
Customer Satisfaction Metrics

❙ You only get them by survey
❙ for
   ❙ Functionality
   ❙ Usability
   ❙ Reliability
   ❙ Performance
   ❙ Maintainability
   ❙ Service
❙ Levels: Very Satisfied, Satisfied, Neutral, Dissatisfied, Very
  Dissatisfied

                                                                   Quality in PHP projects
                                                                   beyond Unittests

                                                                   © MAYFLOWER GmbH 2008 18
Quality Metrics:
When are bugs detected?

❙ Number of pre-release bugs found while testing
❙ Number of post-release bugs
   ❙ found by customer
   ❙ found by testing




                                                   Quality in PHP projects
                                                   beyond Unittests

                                                   © MAYFLOWER GmbH 2008 19
Quality Metrics:
How are defects fixed?

❙ Average Time to fix a bug
❙ Average Time for bugfix release
   ❙ that‘s the time relevant for the customer
❙ Average engineering hours / fixed defect




                                                 Quality in PHP projects
                                                 beyond Unittests

                                                 © MAYFLOWER GmbH 2008 20
Quality Metrics:
Defect Impact

❙ was the defect visible to the user?
❙ has a monetary transaction been touched?
❙ has sensitive data been touched?
❙ are there security implications?
❙ has there been a marketing/image effect
❙ did data / user work get lost?




                                             Quality in PHP projects
                                             beyond Unittests

                                             © MAYFLOWER GmbH 2008 21
Quality Metrics:
Testing Efficiency

❙ Found bugs before release / found bugs post release
❙ Found bugs by qa team / found bugs by customer
❙ Number of bugs found by QA Team / time




                                                        Quality in PHP projects
                                                        beyond Unittests

                                                        © MAYFLOWER GmbH 2008 22
„We do PHPUnit!“ !== Testing



                               Quality in PHP projects
                               beyond Unittests

                               © MAYFLOWER GmbH 2008 23
Unit Testing


❙ For PHP: PHPUnit or SimpleTest
❙ Focussing on testing a single unit of work
   ❙ solves depencies using mock objects
   ❙ should not depend on database
❙ perfect and easy to automate
❙ Reason for all refactoring




                                               Quality in PHP projects
                                               beyond Unittests

                                               © MAYFLOWER GmbH 2008 24
Acceptence Testing


❙ originally user acceptance testing
    ❙ one of the final testing stages
❙ change to automated black box testing in agile
  environments
❙ used to test user stories
❙ often contractual requirement




                                                   Quality in PHP projects
                                                   beyond Unittests

                                                   © MAYFLOWER GmbH 2008 25
SOA / Service Testing


❙ in multi-tier environments every service can have several
  consumers
❙ black box test for the service api
❙ can easily be automated
❙ a lot of tools for SOAP




                                                              Quality in PHP projects
                                                              beyond Unittests

                                                              © MAYFLOWER GmbH 2008 26
Integration Testing


❙ tests the application with all parts
❙ needed for multi-tier applications
❙ tests the interaction paths
❙ intersection with load testing: user simulation




                                                    Quality in PHP projects
                                                    beyond Unittests

                                                    © MAYFLOWER GmbH 2008 27
Load Testing


❙ Simulates high load situations
   ❙ to detect the current platform abilities
   ❙ to detect resource bottlenecks (Database, CPU,
     Network)
   ❙ to detect concurreny bottlenecks (locking jams, caching
     effects)
❙ Scalability testing: scale up or scale out?




                                                               Quality in PHP projects
                                                               beyond Unittests

                                                               © MAYFLOWER GmbH 2008 28
Usability Testing


❙ How does the user work with the application?
❙ Efficiency: time to fulfill a basic task
❙ Accuracy: how many mistakes happened?
❙ Recall: does the user recall the usage after a period of
  time?
❙ Emotional response: does the user feel lucky, confident or
  stressed about the task?




                                                               Quality in PHP projects
                                                               beyond Unittests

                                                               © MAYFLOWER GmbH 2008 29
Regression Testing


❙ originally: if you find a bug, fix it and write a test
❙ PHP itself does it
❙ now often written by the test team to assure the expected
  default behavior
❙ modern: automated test generation




                                                              Quality in PHP projects
                                                              beyond Unittests

                                                              © MAYFLOWER GmbH 2008 30
Security Testing


❙ Blackbox: Penetration Test done by external auditor just
  before release
❙ Graybox: using tools like fuzzers and scanners before
  release or while development
❙ Whitebox: internal or external source code audit, static
  code analysis while development




                                                             Quality in PHP projects
                                                             beyond Unittests

                                                             © MAYFLOWER GmbH 2008 31
A lot more ...


❙ Compability testing for maintainability
❙ Volume testing for bigger amounts of data
❙ Stress testing for degrade and failover processes
❙ Installation testing for maintenance
❙ Recovery testing to check recovery behavior




                                                      Quality in PHP projects
                                                      beyond Unittests

                                                      © MAYFLOWER GmbH 2008 32
PHP Source Code Quality



                          Quality in PHP projects
                          beyond Unittests

                          © MAYFLOWER GmbH 2008 33
Documentation


❙ We have different forms of documentation:
   ❙ Inline documentation
   ❙ API documentation
   ❙ Developer documentation
   ❙ Security documentation
   ❙ Administration documentation
   ❙ End-user documentation




                                              Quality in PHP projects
                                              beyond Unittests

                                              © MAYFLOWER GmbH 2008 34
Coding Style / Formatting


❙ Coding style is defined in the developer documentation
❙ All developers have to write their code formatted in the
  given coding style
❙ Can be checked by CodeSniffer tools
❙ Coding style should be based on your main used libraries
   ❙ If you build your application on top of the Zend
     Framework, use the ZF coding style
❙ With IDEs like Eclipse you can format old code
  autpmatically




                                                             Quality in PHP projects
                                                             beyond Unittests

                                                             © MAYFLOWER GmbH 2008 35
Naming Conventions


❙ Naming conventions are very important
   ❙ NonamespacesbeforePHP5.3
   ❙ Easier for __autoload()
❙ Examples
❙ Class names:
   ❙ class HTML_Template_ITX2
   ❙ Directory: include/PEAR2/HTML/Template/ITX2.php
❙ Function names in camel caps:
   ❙ public function blockExists($blockname)




                                                       Quality in PHP projects
                                                       beyond Unittests

                                                       © MAYFLOWER GmbH 2008 36
Code Complexity


❙ Complexity costs time and money if you don‘t need it
❙ KISS principle: Keep it simple and stupid
❙ Complexity checks by CodeSniffer metrics
❙ Important for good code coverage and unittests
❙ Examples
   ❙ Too high number of linearly independent paths through
     a program's source code
   ❙ Too long class and method names
   ❙ Too many properties
   ❙ Too many parameters
   ❙ Too many methods inside a class
                                                             Quality in PHP projects
                                                             beyond Unittests

                                                             © MAYFLOWER GmbH 2008 37
Anti Patterns


❙ An antipattern is a design pattern that appears obvious but
  is ineffective or far from optimal in practice
❙ Examples
   ❙ Unnecessary abstraction
   ❙ God objects
   ❙ Spaghetti code
   ❙ Too short or too long variable names




                                                                Quality in PHP projects
                                                                beyond Unittests

                                                                © MAYFLOWER GmbH 2008 38
Anti Pattern Examples


❙ if(<EXPR>) {<empty>}
❙ if(<EXPR>) {<EXPR>} else {<empty>}
❙ try(<EXPR>) {<empty>}
❙ try(<EXPR>) {<EXPR>} catch(Exception $e)
  {<empty>}
❙ define('SOME_NAME', $var)
❙ include[_once]|require[_once]|readfile|
  virtual|file_get_contents|fopen|file|
  mysql_query($_GET|$_POST|$_REQUEST)




                                             Quality in PHP projects
                                             beyond Unittests

                                             © MAYFLOWER GmbH 2008 39
Questions?



             Quality in PHP projects
             beyond Unittests

             © MAYFLOWER GmbH 2008 40
Thank you very much!

  Thorsten Rinne
  Mayflower GmbH
  Mannhardtstr. 6
  80538 München
  +49 (89) 24 20 54 - 31
  thorsten.rinne@mayflower.de

More Related Content

What's hot

Enhancing Software Quality
Enhancing Software QualityEnhancing Software Quality
Enhancing Software Quality
Anand Prabhala
 
A more successful model for multi-shore testing
A more successful model for multi-shore testingA more successful model for multi-shore testing
A more successful model for multi-shore testing
Perficient, Inc.
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
Eran Kinsbrunner
 
TMA Software Testing Competency
TMA Software Testing CompetencyTMA Software Testing Competency
TMA Software Testing Competency
TMA Solutions
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and Tools
KMS Technology
 
Karate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by TestrigKarate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by Testrig
PritiFGaikwad
 
Enabling Business Users for SAP Testing
Enabling Business Users for SAP TestingEnabling Business Users for SAP Testing
Enabling Business Users for SAP Testing
Original Software
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
Vivek V
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
Ethan Jewett
 
Selenium DeTox for Achieving the Right Testing Pyramid
Selenium DeTox for Achieving the Right Testing PyramidSelenium DeTox for Achieving the Right Testing Pyramid
Selenium DeTox for Achieving the Right Testing Pyramid
Naresh Jain
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@umaUma Sapireddy
 
SAP Testing
SAP TestingSAP Testing
SAP Testing
Josh Case
 
Continuous Testing for CTOs (Webinar Slides)
Continuous Testing for CTOs (Webinar Slides)Continuous Testing for CTOs (Webinar Slides)
Continuous Testing for CTOs (Webinar Slides)
Rainforest QA
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next Level
Bob Binder
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
Alex Pop
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
QASymphony
 
OMSOFTWARE NEW Service
OMSOFTWARE NEW ServiceOMSOFTWARE NEW Service
OMSOFTWARE NEW Service
OM SOFTWARE PVT LTD
 
Introducing Continuous Delivery in the Enterprise
Introducing Continuous Delivery in the EnterpriseIntroducing Continuous Delivery in the Enterprise
Introducing Continuous Delivery in the Enterprise
XebiaLabs
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
H2Kinfosys
 

What's hot (20)

Enhancing Software Quality
Enhancing Software QualityEnhancing Software Quality
Enhancing Software Quality
 
A more successful model for multi-shore testing
A more successful model for multi-shore testingA more successful model for multi-shore testing
A more successful model for multi-shore testing
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
TMA Software Testing Competency
TMA Software Testing CompetencyTMA Software Testing Competency
TMA Software Testing Competency
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and Tools
 
Karate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by TestrigKarate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by Testrig
 
Enabling Business Users for SAP Testing
Enabling Business Users for SAP TestingEnabling Business Users for SAP Testing
Enabling Business Users for SAP Testing
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
Best Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.comBest Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.com
 
Selenium DeTox for Achieving the Right Testing Pyramid
Selenium DeTox for Achieving the Right Testing PyramidSelenium DeTox for Achieving the Right Testing Pyramid
Selenium DeTox for Achieving the Right Testing Pyramid
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@uma
 
SAP Testing
SAP TestingSAP Testing
SAP Testing
 
Continuous Testing for CTOs (Webinar Slides)
Continuous Testing for CTOs (Webinar Slides)Continuous Testing for CTOs (Webinar Slides)
Continuous Testing for CTOs (Webinar Slides)
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next Level
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
OMSOFTWARE NEW Service
OMSOFTWARE NEW ServiceOMSOFTWARE NEW Service
OMSOFTWARE NEW Service
 
Introducing Continuous Delivery in the Enterprise
Introducing Continuous Delivery in the EnterpriseIntroducing Continuous Delivery in the Enterprise
Introducing Continuous Delivery in the Enterprise
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
 

Viewers also liked

Millionaire Nutrition
Millionaire NutritionMillionaire Nutrition
Millionaire Nutrition
mrrobbo
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
David Giard
 
Calling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA PresentationCalling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA PresentationNick van Terheyden
 
Racalmuto: Centro Commerciale Naturale Borgo Chiaramontano
Racalmuto: Centro Commerciale Naturale Borgo ChiaramontanoRacalmuto: Centro Commerciale Naturale Borgo Chiaramontano
Racalmuto: Centro Commerciale Naturale Borgo Chiaramontano
Eugenio Agnello
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization DeliveredDavid Giard
 
Tbfs uc commercial presentation
Tbfs uc commercial presentationTbfs uc commercial presentation
Tbfs uc commercial presentationraj638
 
Standing out from the crowd: You, Your Brand, and Your WordPress Theme
Standing out from the crowd: You, Your Brand, and Your WordPress ThemeStanding out from the crowd: You, Your Brand, and Your WordPress Theme
Standing out from the crowd: You, Your Brand, and Your WordPress Theme
hollyhagen
 
Journalism in the post 9-11 decade
Journalism in the post 9-11 decadeJournalism in the post 9-11 decade
Journalism in the post 9-11 decadeDigiProf
 
Pm Innovations Llc Presentation 2009.15
Pm Innovations Llc Presentation 2009.15Pm Innovations Llc Presentation 2009.15
Pm Innovations Llc Presentation 2009.15
mtoddsingh
 
Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...
Emilio L. Cano
 
Cloud discussion
Cloud discussionCloud discussion
Cloud discussion
David Giard
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)David Giard
 
Le Fonti energetiche alternative nell'Edilizia Abitativa
Le Fonti energetiche alternative nell'Edilizia AbitativaLe Fonti energetiche alternative nell'Edilizia Abitativa
Le Fonti energetiche alternative nell'Edilizia AbitativaEugenio Agnello
 
Autobiography Anthony[1]
Autobiography Anthony[1]Autobiography Anthony[1]
Autobiography Anthony[1]
aj_matatag
 
GrouperEye
GrouperEyeGrouperEye
GrouperEye
williamstj
 
Gang announcements 2011 01
Gang announcements 2011 01Gang announcements 2011 01
Gang announcements 2011 01
David Giard
 
Orientazioa2003
Orientazioa2003Orientazioa2003
Orientazioa2003pagoaga
 

Viewers also liked (20)

Declarative analysis of noisy information networks
Declarative analysis of noisy information networksDeclarative analysis of noisy information networks
Declarative analysis of noisy information networks
 
Millionaire Nutrition
Millionaire NutritionMillionaire Nutrition
Millionaire Nutrition
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Calling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA PresentationCalling Dr Watson To Radiology - RSNA Presentation
Calling Dr Watson To Radiology - RSNA Presentation
 
Racalmuto: Centro Commerciale Naturale Borgo Chiaramontano
Racalmuto: Centro Commerciale Naturale Borgo ChiaramontanoRacalmuto: Centro Commerciale Naturale Borgo Chiaramontano
Racalmuto: Centro Commerciale Naturale Borgo Chiaramontano
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization Delivered
 
Tbfs uc commercial presentation
Tbfs uc commercial presentationTbfs uc commercial presentation
Tbfs uc commercial presentation
 
Ordenagailu Zatiak
Ordenagailu ZatiakOrdenagailu Zatiak
Ordenagailu Zatiak
 
Standing out from the crowd: You, Your Brand, and Your WordPress Theme
Standing out from the crowd: You, Your Brand, and Your WordPress ThemeStanding out from the crowd: You, Your Brand, and Your WordPress Theme
Standing out from the crowd: You, Your Brand, and Your WordPress Theme
 
Journalism in the post 9-11 decade
Journalism in the post 9-11 decadeJournalism in the post 9-11 decade
Journalism in the post 9-11 decade
 
Pm Innovations Llc Presentation 2009.15
Pm Innovations Llc Presentation 2009.15Pm Innovations Llc Presentation 2009.15
Pm Innovations Llc Presentation 2009.15
 
aboutme
aboutmeaboutme
aboutme
 
Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...Stochastic optimization and risk management for an efficient planning of buil...
Stochastic optimization and risk management for an efficient planning of buil...
 
Cloud discussion
Cloud discussionCloud discussion
Cloud discussion
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
 
Le Fonti energetiche alternative nell'Edilizia Abitativa
Le Fonti energetiche alternative nell'Edilizia AbitativaLe Fonti energetiche alternative nell'Edilizia Abitativa
Le Fonti energetiche alternative nell'Edilizia Abitativa
 
Autobiography Anthony[1]
Autobiography Anthony[1]Autobiography Anthony[1]
Autobiography Anthony[1]
 
GrouperEye
GrouperEyeGrouperEye
GrouperEye
 
Gang announcements 2011 01
Gang announcements 2011 01Gang announcements 2011 01
Gang announcements 2011 01
 
Orientazioa2003
Orientazioa2003Orientazioa2003
Orientazioa2003
 

Similar to Quality in PHP projects beyond Unittests.pdf

Migration Concepts For Enterprise PHP Applications
Migration Concepts For Enterprise PHP ApplicationsMigration Concepts For Enterprise PHP Applications
Migration Concepts For Enterprise PHP ApplicationsMayflower GmbH
 
QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)
Vladimir Primakov (Volodymyr Prymakov)
 
Gaming Testing
Gaming TestingGaming Testing
Gaming Testing
ProtoTech Solutions
 
First Steps to DevOps
First Steps to DevOpsFirst Steps to DevOps
First Steps to DevOps
Inductive Automation
 
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
TEST Huddle
 
John Fodeh Adventures in Test Automation - EuroSTAR 2013
John Fodeh Adventures in Test Automation - EuroSTAR 2013John Fodeh Adventures in Test Automation - EuroSTAR 2013
John Fodeh Adventures in Test Automation - EuroSTAR 2013
TEST Huddle
 
TETRA
TETRATETRA
TETRA
Intetics
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
DiUS
 
[India Merge World Tour] Coverity
[India Merge World Tour] Coverity[India Merge World Tour] Coverity
[India Merge World Tour] Coverity
Perforce
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
RapidValue
 
Establishing Release Quality Levels and Release Acceptance Tests
Establishing Release Quality Levels and Release Acceptance TestsEstablishing Release Quality Levels and Release Acceptance Tests
Establishing Release Quality Levels and Release Acceptance Tests
Conteneo Inc.
 
Il paradigma DevOps e Continuous Delivery Automation
Il paradigma DevOps e Continuous Delivery Automation Il paradigma DevOps e Continuous Delivery Automation
Il paradigma DevOps e Continuous Delivery Automation
HP Enterprise Italia
 
QualityGate for IT Managers
QualityGate for IT ManagersQualityGate for IT Managers
QualityGate for IT Managers
Dr. Tibor Bakota
 
Sucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta Kale
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
Automated Testing - How to Guarantee Correct FME Output Every Time
Automated Testing - How to Guarantee Correct FME Output Every TimeAutomated Testing - How to Guarantee Correct FME Output Every Time
Automated Testing - How to Guarantee Correct FME Output Every Time
Safe Software
 
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
TEST Huddle
 
QTP Automation Testing Tutorial 1
QTP Automation Testing Tutorial 1QTP Automation Testing Tutorial 1
QTP Automation Testing Tutorial 1
Akash Tyagi
 

Similar to Quality in PHP projects beyond Unittests.pdf (20)

Migration Concepts For Enterprise PHP Applications
Migration Concepts For Enterprise PHP ApplicationsMigration Concepts For Enterprise PHP Applications
Migration Concepts For Enterprise PHP Applications
 
QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)
 
Gaming Testing
Gaming TestingGaming Testing
Gaming Testing
 
First Steps to DevOps
First Steps to DevOpsFirst Steps to DevOps
First Steps to DevOps
 
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
 
John Fodeh Adventures in Test Automation - EuroSTAR 2013
John Fodeh Adventures in Test Automation - EuroSTAR 2013John Fodeh Adventures in Test Automation - EuroSTAR 2013
John Fodeh Adventures in Test Automation - EuroSTAR 2013
 
TETRA
TETRATETRA
TETRA
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
 
[India Merge World Tour] Coverity
[India Merge World Tour] Coverity[India Merge World Tour] Coverity
[India Merge World Tour] Coverity
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
 
Establishing Release Quality Levels and Release Acceptance Tests
Establishing Release Quality Levels and Release Acceptance TestsEstablishing Release Quality Levels and Release Acceptance Tests
Establishing Release Quality Levels and Release Acceptance Tests
 
Il paradigma DevOps e Continuous Delivery Automation
Il paradigma DevOps e Continuous Delivery Automation Il paradigma DevOps e Continuous Delivery Automation
Il paradigma DevOps e Continuous Delivery Automation
 
Resume
ResumeResume
Resume
 
QualityGate for IT Managers
QualityGate for IT ManagersQualityGate for IT Managers
QualityGate for IT Managers
 
Sucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QA
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
Automated Testing - How to Guarantee Correct FME Output Every Time
Automated Testing - How to Guarantee Correct FME Output Every TimeAutomated Testing - How to Guarantee Correct FME Output Every Time
Automated Testing - How to Guarantee Correct FME Output Every Time
 
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
 
QTP Automation Testing Tutorial 1
QTP Automation Testing Tutorial 1QTP Automation Testing Tutorial 1
QTP Automation Testing Tutorial 1
 
Vandana B
Vandana BVandana B
Vandana B
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

Quality in PHP projects beyond Unittests.pdf

  • 1. Quality in PHP projects beyond Unittests International PHP Conference 2008 October 30th 2008 | Thorsten Rinne
  • 2. Introduction ❙ Thorsten Rinne ❙ 31 years old ❙ Senior Developer and Team Lead at Mayflower GmbH ❙ Reporting applications ❙ Rating applications ❙ PHP consulting for QA and migration problems ❙ PHP software development since 1999 ❙ Founder and main developer of open source FAQ management software phpMyFAQ since 2001 ❙ Zend Certified Engineer (PHP 5) Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 2
  • 3. Introduction ❙ Warm up ❙ Quality Criterias ❙ Quality Metrics ❙ Testing ❙ PHP Source Code Quality ❙ Questions and answers Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 3
  • 4. Who are you? ❙ What's your profession? ❙ Software company or agency? ❙ What's your team size? ❙ Who develops using Unittests? ❙ Who uses QA supporting tools? ❙ What's your test coverage? ❙ Even for legacy code? :-) Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 4
  • 5. Quality Criterias Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 5
  • 6. Quality criterias: Understandability ❙ Availability of documentation ❙ Good documentation quality ❙ Complexity of software ❙ Code commenting and formatting ❙ Understandable naming Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 6
  • 7. Quality criterias: Completeness ❙ Everything is already there ❙ Your application is fully implemented ❙ No mockups or temporary solutions left ❙ External interfaces are usable ❙ All needed data is available Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 7
  • 8. Quality criterias: Conciseness ❙ No unneeded, overlong documentation ❙ Especially auto-generated documentation ❙ No unused libraries ❙ No dead code ❙ No duplicate code ❙ No code inside loops that could be outside Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 8
  • 9. Quality criterias: Portability ❙ Easy to configure in new environments ❙ Few OS and webserver dependencies ❙ Few, documented version dependencies ❙ Language version ❙ Database version ❙ External libraries ❙ Able to survice environment updates Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 9
  • 10. Quality criterias: Consistency ❙ Predictability ❙ Directory paths and filenames ❙ Class and method names ❙ Variable and constant names ❙ Documentation style and language ❙ Coding style Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 10
  • 11. Quality criterias: Maintainability ❙ Easy to install and easy to upgrade ❙ Tests and debug logs to help to locate bugs ❙ Few dependencies hiding the bug ❙ No complex dependencies or effects on the platform ❙ Easy to understand and navigate source code Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 11
  • 12. Quality criterias: Testability ❙ Known acceptence criteria ❙ Adequate separation of concerns ❙ Easy to use interfaces for tests ❙ No limiting dependencies Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 12
  • 13. Quality criterias: Reliability ❙ The criteria formerly known as „robustness“ ❙ Fault tolerance ❙ Graceful degradation ❙ Exception handling exists ❙ Is method input checked? Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 13
  • 14. Quality criterias: Usability ❙ Learnability: Easyness of first time usage ❙ Efficiency: Overall speed of usage per task ❙ Memorabilty: Time to re-establish usage knowledge after absence ❙ Errors: Frequency of usage errors ❙ Satisfaction: Fun to use the software Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 14
  • 15. Quality Metrics Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 15
  • 16. Quality Metrics: Defect Density Metrics ❙ Code-based metric ❙ Defects per KSSI (1000 shipped source instructions) for product quality ❙ Defects per KCSI (1000 changed source instructions) for development quality ❙ (Hard to measure) ❙ Statistic needed ❙ easier for products Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 16
  • 17. Quality Metrics: Customer Problem Metrics ❙ PUM: Problems per user month ❙ Defects per month / number of installations ❙ Maintainance metric: Number of bugs closed / number of bugs arrived ❙ The customer does not care how big or how complicated the software is :-) Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 17
  • 18. Quality Metrics: Customer Satisfaction Metrics ❙ You only get them by survey ❙ for ❙ Functionality ❙ Usability ❙ Reliability ❙ Performance ❙ Maintainability ❙ Service ❙ Levels: Very Satisfied, Satisfied, Neutral, Dissatisfied, Very Dissatisfied Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 18
  • 19. Quality Metrics: When are bugs detected? ❙ Number of pre-release bugs found while testing ❙ Number of post-release bugs ❙ found by customer ❙ found by testing Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 19
  • 20. Quality Metrics: How are defects fixed? ❙ Average Time to fix a bug ❙ Average Time for bugfix release ❙ that‘s the time relevant for the customer ❙ Average engineering hours / fixed defect Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 20
  • 21. Quality Metrics: Defect Impact ❙ was the defect visible to the user? ❙ has a monetary transaction been touched? ❙ has sensitive data been touched? ❙ are there security implications? ❙ has there been a marketing/image effect ❙ did data / user work get lost? Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 21
  • 22. Quality Metrics: Testing Efficiency ❙ Found bugs before release / found bugs post release ❙ Found bugs by qa team / found bugs by customer ❙ Number of bugs found by QA Team / time Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 22
  • 23. „We do PHPUnit!“ !== Testing Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 23
  • 24. Unit Testing ❙ For PHP: PHPUnit or SimpleTest ❙ Focussing on testing a single unit of work ❙ solves depencies using mock objects ❙ should not depend on database ❙ perfect and easy to automate ❙ Reason for all refactoring Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 24
  • 25. Acceptence Testing ❙ originally user acceptance testing ❙ one of the final testing stages ❙ change to automated black box testing in agile environments ❙ used to test user stories ❙ often contractual requirement Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 25
  • 26. SOA / Service Testing ❙ in multi-tier environments every service can have several consumers ❙ black box test for the service api ❙ can easily be automated ❙ a lot of tools for SOAP Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 26
  • 27. Integration Testing ❙ tests the application with all parts ❙ needed for multi-tier applications ❙ tests the interaction paths ❙ intersection with load testing: user simulation Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 27
  • 28. Load Testing ❙ Simulates high load situations ❙ to detect the current platform abilities ❙ to detect resource bottlenecks (Database, CPU, Network) ❙ to detect concurreny bottlenecks (locking jams, caching effects) ❙ Scalability testing: scale up or scale out? Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 28
  • 29. Usability Testing ❙ How does the user work with the application? ❙ Efficiency: time to fulfill a basic task ❙ Accuracy: how many mistakes happened? ❙ Recall: does the user recall the usage after a period of time? ❙ Emotional response: does the user feel lucky, confident or stressed about the task? Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 29
  • 30. Regression Testing ❙ originally: if you find a bug, fix it and write a test ❙ PHP itself does it ❙ now often written by the test team to assure the expected default behavior ❙ modern: automated test generation Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 30
  • 31. Security Testing ❙ Blackbox: Penetration Test done by external auditor just before release ❙ Graybox: using tools like fuzzers and scanners before release or while development ❙ Whitebox: internal or external source code audit, static code analysis while development Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 31
  • 32. A lot more ... ❙ Compability testing for maintainability ❙ Volume testing for bigger amounts of data ❙ Stress testing for degrade and failover processes ❙ Installation testing for maintenance ❙ Recovery testing to check recovery behavior Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 32
  • 33. PHP Source Code Quality Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 33
  • 34. Documentation ❙ We have different forms of documentation: ❙ Inline documentation ❙ API documentation ❙ Developer documentation ❙ Security documentation ❙ Administration documentation ❙ End-user documentation Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 34
  • 35. Coding Style / Formatting ❙ Coding style is defined in the developer documentation ❙ All developers have to write their code formatted in the given coding style ❙ Can be checked by CodeSniffer tools ❙ Coding style should be based on your main used libraries ❙ If you build your application on top of the Zend Framework, use the ZF coding style ❙ With IDEs like Eclipse you can format old code autpmatically Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 35
  • 36. Naming Conventions ❙ Naming conventions are very important ❙ NonamespacesbeforePHP5.3 ❙ Easier for __autoload() ❙ Examples ❙ Class names: ❙ class HTML_Template_ITX2 ❙ Directory: include/PEAR2/HTML/Template/ITX2.php ❙ Function names in camel caps: ❙ public function blockExists($blockname) Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 36
  • 37. Code Complexity ❙ Complexity costs time and money if you don‘t need it ❙ KISS principle: Keep it simple and stupid ❙ Complexity checks by CodeSniffer metrics ❙ Important for good code coverage and unittests ❙ Examples ❙ Too high number of linearly independent paths through a program's source code ❙ Too long class and method names ❙ Too many properties ❙ Too many parameters ❙ Too many methods inside a class Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 37
  • 38. Anti Patterns ❙ An antipattern is a design pattern that appears obvious but is ineffective or far from optimal in practice ❙ Examples ❙ Unnecessary abstraction ❙ God objects ❙ Spaghetti code ❙ Too short or too long variable names Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 38
  • 39. Anti Pattern Examples ❙ if(<EXPR>) {<empty>} ❙ if(<EXPR>) {<EXPR>} else {<empty>} ❙ try(<EXPR>) {<empty>} ❙ try(<EXPR>) {<EXPR>} catch(Exception $e) {<empty>} ❙ define('SOME_NAME', $var) ❙ include[_once]|require[_once]|readfile| virtual|file_get_contents|fopen|file| mysql_query($_GET|$_POST|$_REQUEST) Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 39
  • 40. Questions? Quality in PHP projects beyond Unittests © MAYFLOWER GmbH 2008 40
  • 41. Thank you very much! Thorsten Rinne Mayflower GmbH Mannhardtstr. 6 80538 München +49 (89) 24 20 54 - 31 thorsten.rinne@mayflower.de