SlideShare une entreprise Scribd logo
1  sur  117
Télécharger pour lire hors ligne
Con$nuous	
  QA
 Michelangelo	
  van	
  Dam
          Macq	
  NV
Michelangelo	
  van	
  Dam


•   independent	
  contractor
•   president	
  PHPBenelux
•   conference	
  speaker
•   community	
  animal




              ZEND
              FRAMEWORK   PHP   .



                                      2
Overview


• introduc$on
• overview	
  of	
  tools
• con$nuous	
  integra$on
  -­‐ interpreta$on	
  of	
  reports
• roundup



                                       3
Introduc$on



              4
What	
  is	
  quality	
  assurance?

• safeguarding	
  source	
  code
• applica$on	
  behaves	
  as	
  expected
• bugs	
  discovered	
  before	
  becoming	
  an	
  issue
• tracking	
  progress	
  of	
  a	
  project
  -­‐ development	
  of	
  features
  -­‐ health	
  of	
  the	
  codebase


                                                            5
Why	
  invest	
  in	
  QA?


• improving	
  development	
  code
• improving	
  development	
  team
• saving	
  $me	
  in	
  aJer	
  sales	
  maintenance
• con$nuous	
  repor$ng
• ready	
  to	
  deploy	
  code	
  (“builds”)

                                                        6
Overview	
  of	
  tools



                          7
php	
  -­‐l	
  (lint)




hPp://www.php.net/manual/en/features.commandline.op$ons.php   8
PHP	
  Lint
                                                                     TIP:	
  pre-­‐commit	
  hook
• checks	
  the	
  syntax	
  of	
  code
• build	
  in	
  PHP	
  core
• is	
  used	
  per	
  file
   -­‐ pre-­‐commit	
  hook	
  for	
  version	
  control	
  system
   -­‐ batch	
  processing	
  of	
  files
• can	
  provide	
  reports
   -­‐ but	
  if	
  something	
  fails	
  -­‐>	
  the	
  build	
  fails

                                                                                                    9
Execu$on




           10
Parse	
  error




                 11
Fatal	
  error




                 12
PHPUnit




hPp://www.phpunit.de/manual/current/en/   13
PHPUnit

• tes$ng	
  framework	
  for	
  PHP	
  projects
• port	
  of	
  xUnit	
  unit	
  test	
  frameworks
  -­‐ compa$ble	
  with	
  JUnit,	
  NUnit,	
  etc...
• produces	
  generic	
  test	
  results
  -­‐ compa$ble	
  with	
  the	
  other	
  xUnit	
  frameworks
• produces	
  code	
  coverage	
  reports
  -­‐ to	
  indicate	
  what	
  part	
  of	
  code	
  is	
  tested

                                                                     14
Execu$on	
  of	
  phpunit




                            15
PHPDocumentor




   hPp://www.phpdoc.org   16
PHPDoc

• uses	
  in	
  code	
  docblocks




• parses	
  API	
  documenta$on

                                    17
PHPDoc	
  in	
  ac$on




                        18
API	
  documenta$on




                      19
PHP_CodeSniffer




 hPp://pear.php.net/package/PHP_CodeSniffer/   20
PHP_CodeSniffer


• checks	
  source	
  code	
  on	
  coding	
  standards
• reports	
  viola$ons	
  on	
  a	
  given	
  standard
• ensures	
  a	
  consistent	
  way	
  code	
  is	
  wriPen
   -­‐ as	
  though	
  one	
  developer	
  wrote	
  all	
  the	
  code



                                                                         21
Report	
  types
• full:	
  all	
  details	
  of	
  viola$ons
• summary:	
  total	
  of	
  errors	
  and	
  warnings
• source:	
  targeted	
  sources	
  with	
  viola$ons
• xml:	
  a	
  full	
  report	
  in	
  XML	
  format
• checkstyle:	
  XML	
  report	
  on	
  style	
  viola$ons
• csv:	
  a	
  full	
  report	
  in	
  CSV	
  format
• emacs:	
  a	
  full	
  report	
  in	
  EMACS	
  format
• blame:	
  a	
  list	
  of	
  responsible	
  viola$ng	
  devs
                                                                 22
Example	
  Full	
  report
FILE: /path/to/file.php
-------------------------------------------------------------------------------
FOUND 2 ERROR(S) AND 4 WARNING(S) AFFECTING 4 LINE(S)
-------------------------------------------------------------------------------
 111 | ERROR   | Arguments with default values must be at the end of the
     |         | argument list
 111 | WARNING | Line exceeds 80 characters; contains 88 characters
 118 | WARNING | Line exceeds 80 characters; contains 89 characters
 121 | WARNING | Line exceeds 80 characters; contains 84 characters
 130 | WARNING | Line exceeds 80 characters; contains 94 characters
 176 | ERROR   | Spaces must be used to indent lines; tabs are not allowed
-------------------------------------------------------------------------------




                                                                                  23
Example	
  Summary	
  report
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS WARNINGS
--------------------------------------------------------------------------------
/path/to/file.php                                               1       4
--------------------------------------------------------------------------------
A TOTAL OF 1 ERROR(S) AND 4 WARNING(S) WERE FOUND IN 1 FILE(S)
--------------------------------------------------------------------------------




                                                                                   24
Example	
  Source	
  report
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------
STANDARD CATEGORY             SNIFF                                        COUNT
--------------------------------------------------------------------------------
Generic   Files               Line length too long                         4
PEAR      Functions           Valid default value not at end               1
--------------------------------------------------------------------------------
A TOTAL OF 5 SNIFF VIOLATION(S) WERE FOUND IN 2 SOURCE(S)
--------------------------------------------------------------------------------



      Although specified Zend as coding standard, there’s a relation to
      underlying standards like PEAR and the General coding standards




                                                                                   25
Example	
  XML	
  report
<?xml version="1.0" encoding="UTF-8"?>
<phpcs version="1.3.0">
 <file name="/path/to/file.php" errors="1" warnings="4">
  <error line="111" column="83"
    source="PEAR.Functions.ValidDefaultValue.NotAtEnd" s
    everity="5">Arguments with default values must be at   the end of the argument
list</error>
  <warning line="111" column="89"
    source="Generic.Files.LineLength.TooLong"
    severity="5">Line exceeds 80 characters; contains 88   characters</warning>
  <warning line="118" column="90"
    source="Generic.Files.LineLength.TooLong"
    severity="5">Line exceeds 80 characters; contains 89   characters</warning>
  <warning line="121" column="85"
    source="Generic.Files.LineLength.TooLong"
    severity="5">Line exceeds 80 characters; contains 84   characters</warning>
  <warning line="130" column="95"
    source="Generic.Files.LineLength.TooLong"
    severity="5">Line exceeds 80 characters; contains 94   characters</warning>
 </file>
</phpcs>




                                                                                     26
Example	
  CheckStyle	
  report
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.3.0">
 <file name="/path/to/file.php">
  <error line="111" column="83" severity="error"
    message="Arguments with default values must be at the end of the argument list"
    source="PEAR.Functions.ValidDefaultValue.NotAtEnd"/>
  <error line="111" column="89" severity="warning"
    message="Line exceeds 80 characters; contains 88 characters"
    source="Generic.Files.LineLength.TooLong"/>
  <error line="118" column="90" severity="warning"
    message="Line exceeds 80 characters; contains 89 characters"
    source="Generic.Files.LineLength.TooLong"/>
  <error line="121" column="85" severity="warning"
    message="Line exceeds 80 characters; contains 84 characters"
    source="Generic.Files.LineLength.TooLong"/>
  <error line="130" column="95" severity="warning"
    message="Line exceeds 80 characters; contains 94 characters"
    source="Generic.Files.LineLength.TooLong"/>
 </file>
</checkstyle>




                                                                                      27
Example	
  CSV	
  report
File,Line,Column,Type,Message,Source,Severity
"/path/to/file.php",111,83,error,"Arguments with default values must be at the end
of the argument list",PEAR.Functions.ValidDefaultValue.NotAtEnd,5
"/path/to/file.php",111,89,warning,"Line exceeds 80 characters; contains 88
characters",Generic.Files.LineLength.TooLong,5
"/path/to/file.php",118,90,warning,"Line exceeds 80 characters; contains 89
characters",Generic.Files.LineLength.TooLong,5
"/path/to/file.php",121,85,warning,"Line exceeds 80 characters; contains 84
characters",Generic.Files.LineLength.TooLong,5
"/path/to/file.php",130,95,warning,"Line exceeds 80 characters; contains 94
characters",Generic.Files.LineLength.TooLong,5




                                                                                     28
Example	
  Blame	
  report
PHP CODE SNIFFER SVN BLAME SUMMARY
--------------------------------------------------------------------------------
AUTHOR                                              (Author %) (Overall %) COUNT
--------------------------------------------------------------------------------
michelangelo                                            (2.26)       (100)     5
--------------------------------------------------------------------------------
A TOTAL OF 5 SNIFF VIOLATION(S) WERE COMMITTED BY 1 AUTHOR(S)
--------------------------------------------------------------------------------




                                                                                   29
Execu$on	
  of	
  phpcs




                          30
PHPCPD




hPps://github.com/sebas$anbergmann/phpcpd   31
Copy/Paste	
  Detec$on
                                              TIP:	
  pre-­‐commit	
  hook



• detects	
  duplicate	
  or	
  similar	
  lines	
  of	
  code
   -­‐ copied	
  code
   -­‐ code	
  that’s	
  similar




                                                                             32
phpcpd	
  in	
  ac$on




                        33
Pdepend




 hPp://pdepend.org   34
Pdepend	
  in	
  ac$on




                         35
pdepend	
  pyramid




                     36
• CYCLO:	
  Cycloma$c	
  Complexity
• LOC:	
  Lines	
  of	
  Code
• NOM:	
  Number	
  of	
  Methods
• NOC:	
  Number	
  of	
  Classes
• NOP:	
  Number	
  of	
  Packages
• AHH:	
  Average	
  Hierarchy	
  Height
• ANDC:	
  Average	
  Number	
  of	
  Derived	
  Classes

• FANOUT:	
  Number	
  of	
  Called	
  Classes
• CALLS:	
  Number	
  of	
  Opera$on	
  Calls
                                                           37
Cycloma$c	
  Complexity

• metric	
  calcula$on
• execu$on	
  paths
• independent	
  control	
  structures
  -­‐ if,	
  else,	
  for,	
  foreach,	
  switch	
  case,	
  while,	
  do,	
  …
• within	
  a	
  single	
  method	
  or	
  func$on
• more	
  info
  -­‐ hPp://en.wikipedia.org/wiki/Cycloma$c_complexity

                                                                                  38
Average	
  Hierarchy	
  Height



The	
  average	
  of	
  the	
  maximum	
  length	
  from	
  a	
  
        root	
  class	
  to	
  its	
  deepest	
  subclass




                                                                    39
pdepend	
  pyramid




                     40
pdepend-­‐graph




graph	
  about	
  stability:	
  a	
  mix	
  between	
  abstract	
  and	
  concrete	
  classes

                                                                                                41
42
43
PHPMD	
  (Mess	
  detec$on)




          hPp://phpmd.org     44
PHPMD


• iden$fy	
  poten$al	
  problems	
  in	
  source	
  code
  -­‐   possible	
  bugs
  -­‐   subop$mal	
  code
  -­‐   overcomplicated	
  expressions
  -­‐   unused	
  parameters,	
  methods,	
  proper$es




                                                            45
PHPMD	
  in	
  ac$on




                       46
PHPMD	
  repor$ng




                    47
PHP	
  Code	
  Browser




 hPps://github.com/mayflowergmbh/PHP_CodeBrowser   48
phpcb


• code	
  browser	
  for	
  php	
  sources
   -­‐ syntax	
  highligh$ng
   -­‐ colored	
  error	
  sec$ons
• designed	
  for	
  usage	
  of	
  QA	
  tools
   -­‐ PHPUnit
   -­‐ PHP_CodeSniffer


                                                  49
phpcb	
  example




                   50
PHPLOC




hPps://github.com/sebas$anbergmann/phploc   51
Lines	
  of	
  Code


• calculates	
  the	
  size	
  of	
  a	
  project
   -­‐ gives	
  a	
  brief	
  detail	
  on	
  quality	
  of	
  source	
  code
   -­‐ comparable	
  to	
  sumaries	
  of
       ‣ phpcs
       ‣ phpmd
       ‣ pdepend




                                                                                52
phploc	
  in	
  ac$on




                        53
Overview	
  of	
  output
phploc 1.6.1 by Sebastian Bergmann.

Directories:                                      547
Files:                                           2503

Lines of Code (LOC):                           482423
  Cyclomatic Complexity / Lines of Code:         0.11
Comment Lines of Code (CLOC):                  224721
Non-Comment Lines of Code (NCLOC):             257702

Namespaces:                                         0
Interfaces:                                       124
Classes:                                         2352
  Abstract:                                       199 (8.46%)
  Concrete:                                      2153 (91.54%)
  Average Class Length (NCLOC):                   112
Methods:                                        16121
  Scope:
    Non-Static:                                 15016 (93.15%)
    Static:                                      1105 (6.85%)
  Visibility:
    Public:                                     12712 (78.85%)
    Non-Public:                                  3409 (21.15%)
  Average Method Length (NCLOC):                   16
  Cyclomatic Complexity / Number of Methods:     2.78

Anonymous Functions:                                2
Functions:                                          0

Constants:                                       3802
  Global constants:                                 8
  Class constants:                               3794

Tests:
  Classes:                                         22
  Methods:                                         43


                                                                 54
Phing




hPp://www.phing.info/docs/guide/stable   55
Phing’s	
  purpose

• build	
  tool	
  wriPen	
  in	
  PHP
   -­‐ comparable	
  to	
  Ant	
  or	
  make
• used	
  to	
  automate	
  build	
  process
   -­‐ build	
  =	
  all	
  steps	
  to	
  produce	
  reports
• provides	
  targets	
  and	
  variable	
  proper$es
   -­‐ for	
  targeted	
  execu$on	
  of	
  tools	
  (e.g.	
  only	
  unit	
  tes$ng)


                                                                                        56
57
Loca$on	
  of	
  build	
  reports
/path/to/project
  /application
  /library
  /public
  /tests
  /build
    /api                ->   location for API documentation
    /cache              ->   used by CI for caching
    /code-browser       ->   browsable source code
    /coverage           ->   unit test code coverage
    /logs               ->   location for all report logs
      /junit.xml
      /jdepend.xml
      /pmd.xml
      /pmd-cpd.xml
      /phploc.csv
      /checkstyle.xml
    /pdepend            -> dependency graphics and pyramid




                                                              58
Integra$on	
  of	
  tools



                            59
Ini$al	
  Phing	
  build	
  script
<?xml version=”1.0” encoding=”UTF-8”?>
<!--
  $Id: jenkins.xml 123 2011-06-08 07:00:00Z michelangelo $
-->
<project name=”My Project” default=”build”>

   <!--
     a property file (key/value) to store project specific data
     like paths, property values and passwords
   -->
   <property file=”jenkins.properties” />

   <!--
     list of targets, each with their own php tool
   -->

</project>




                                                                  60
define	
  our	
  filesets
<fileset id=”php-files” dir=”${project.basedir}”>
    <include name=”**/*.php” />
    <exclude name=”library/Zend/**” />
    <exclude name=”library/ZendX/**” />
    <exclude name=”tests/**” />
</fileset>




                                                    61
clean	
  build	
  path
<target name=”clean” description=”Clean build path”>
    <delete dir=”${project.basedir}/build” />

    <mkdir   dir=”${project.basedir}/build” />
    <mkdir   dir=”${project.basedir}/build/api” />
    <mkdir   dir=”${project.basedir}/build/cache” />
    <mkdir   dir=”${project.basedir}/build/code-browser” />
    <mkdir   dir=”${project.basedir}/build/coverage” />
    <mkdir   dir=”${project.basedir}/build/logs” />
    <mkdir   dir=”${project.basedir}/build/pdepend” />
</target>




                                                              62
lint	
  checking
<target name=”phplint” description=”Syntax checking of code”>
    <phplint haltonfailure=”true”>
        <fileset refid=”php-files” />
    </phplint>
</target>




                                                                63
unit	
  tes$ng
<target name=”PHPUnit” description=”Running unit tests”>
    <exec
      passthru=”${passthru}”
      dir=”${project.basedir}/tests”
      command=”phpunit
        --log-junit=${project.basedir}/build/logs/junit.xml
        --coverage-clover=${project.basedir}/build/logs/clover.xml
        --coverage-html=${project.basedir}/build/coverage
        --stop-on-error
        --stop-on-failure”/>
</target>




                                                                     64
documenta$on
<target name="phpdoc" description="Generate API documentation">
    <phpdoc
        title="${project.name} API Documentation"
        target="${project.basedir}/build/api"
        output="HTML:frames:earthli"
        quiet="true">
        <fileset refid="php-files"/>
    </phpdoc>
</target>




                                                                  65
coding	
  standards
<target name="phpcs" description="Coding Standards Analysis">
  <exec
    passthru="${passthru}"
    command="phpcs
      --report=checkstyle
      --report-file=${project.basedir}/build/logs/checkstyle.xml
      --standard=Zend
      --ignore=library/Zend,library/ZendX,tests,docs,scripts
      --extensions=php
      ${project.basedir}"/>
</target>




                                                                   66
copy-­‐paste	
  detec$on
<target name="phpcpd" description="Copy/Paste detection">
  <phpcpd>
    <fileset refid="php-files"/>
    <formatter
      type="pmd"
      outfile="${project.basedir}/build/logs/pmd-cpd.xml"/>
  </phpcpd>
</target>




                                                              67
lines	
  of	
  code
<target name="phploc" description="Generate phploc.csv">
  <exec
    passthru="${passthru}"
    command="phploc
      --log-csv ${project.basedir}/build/logs/phploc.csv
    ${project.basedir}"/>
</target>




                                                           68
code	
  browser
<target name="phpcb" description="Source code browser"
  depends="phpunit, phpcs">
  <exec
    passthru="${passthru}"
    command="phpcb
      --ignore build,library/Zend,library/ZendX,tests,docs
      --log ${project.basedir}/build/logs
      --source ${project.basedir}
      --output ${project.basedir}/build/code-browser"/>
</target>




                                                             69
depend	
  metric	
  calcula$ons
<target name="pdepend" description="Calculate dependencies">
  <exec
    passthru="${passthru}"
    dir="${project.basedir}"
    command="pdepend
      --configuration=${project.basedir}/pdepend.xml
      --jdepend-chart=${project.basedir}/build/pdepend/
dependencies.svg
      --jdepend-xml=${project.basedir}/build/logs/jdepend.xml
      --overview-pyramid=${project.basedir}/build/pdepend/
overview-pyramid.svg
      --suffix=php
      --ignore=library/Zend,library/ZendX,tests
      ${project.basedir}"/>
</target>




                                                                70
mess	
  detec$on
<target name="phpmd" description="Mess Detection">
  <phpmd>
    <fileset refid="php-files"/>
    <formatter
      type="xml"
      outfile="${project.basedir}/build/logs/pmd.xml"/>
    </phpmd>
</target>




                                                          71
default	
  target:	
  build
<target name="build" description="Start analyzing our app">
  <phingCall target="clean" />
  <phingCall target="phplint" />
  <phingCall target="phpdoc" />
  <phingCall target="phpcs" />
  <phingCall target="phpunit" />
  <phingCall target="phpcpd" />
  <phingCall target="phpmd" />
  <phingCall target="pdepend" />
  <phingCall target="phploc" />
  <phingCall target="phpcb" />
</target>




                                                              72
phing	
  in	
  ac$on




                       73
build	
  all




               74
phing	
  usage


• developers	
  can	
  run	
  at	
  call
   -­‐ all	
  targets
   -­‐ specific	
  targets	
  (like	
  unit	
  tests,	
  style	
  checking,	
  …)
• unified	
  way	
  of	
  execu$ng	
  processes


                                                                                   75
perfect	
  for	
  CI	
  !!!



                              76
Con$nuous	
  Integra$on



                          77
Con$nuous	
  Integra$on?

• automated	
  process
• tools	
  for	
  code
  -­‐   test
  -­‐   document
  -­‐   validate
  -­‐   package
• triggered
  -­‐ by	
  code	
  change	
  in	
  version	
  control	
  system
  -­‐ on	
  fixed	
  intervals	
  (e.g.	
  every	
  weekday	
  at	
  1am)
                                                                           78
Jenkins-­‐CI




  hPp://jenkins-­‐ci.org/   79
A	
  project	
  in	
  CI




                           80
Overview	
  of	
  reports
• unit	
  tests
• code	
  coverage
• coding	
  standards	
  viola$ons
• mess	
  detec$on
• dependency	
  calcula$ons
• copy/paste	
  detec$on
• code	
  analysis
• API	
  documenta$on
                                     81
Unit	
  Tests



                82
83
84
85
Code	
  Coverage



                   86
87
88
89
CheckStyle



             90
91
92
93
94
Mess	
  detec$on



                   95
96
97
98
99
100
101
Dependency	
  Calcula$ons



                            102
103
104
105
API	
  Documenta$on



                      106
107
108
Viola$ons



            109
110
111
Round	
  up



              112
With	
  CI


• con$nuous	
  inspec$on	
  of	
  code
  -­‐ errors	
  are	
  detected	
  early
  -­‐ warnings	
  are	
  reported
  -­‐ areas	
  of	
  improvement	
  are	
  pointed	
  out




                                                            113
CI	
  &	
  PHP


• all	
  the	
  tools	
  
   -­‐   to	
  improve	
  development	
  skills
   -­‐   to	
  deliver	
  quality	
  code
   -­‐   to	
  detect	
  issues	
  early
   -­‐   to	
  document	
  and	
  analyze	
  code	
  base




                                                            114
Recommended	
  reading



• the	
  PHP	
  QA	
  book
  -­‐ Sebas$an	
  Bergmann
  -­‐ Stefan	
  Priebsch




                                115
Recommended	
  reading
                                 Free



• OOD	
  Quality	
  Metrics
  -­‐ Robert	
  Cecil	
  Mar$n




               hPp://www.objectmentor.com/publica$ons/oodmetrc.pdf   116
Sources	
  and	
  Code
• slides:
  hPp://www.slideshare.net/DragonBe
• sources:
  hPp://github.com/DragonBe/wingz

• contact:
  -­‐ mail:	
  michelangelo@in2it.be
  -­‐ twiPer:	
  @DragonBe
  -­‐ facebook:	
  DragonBe
                                       117

Contenu connexe

Tendances

ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf Conference
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsMark Baker
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 ComponentsShawn Stratton
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)Win Yu
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証ME iBotch
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckrICh morrow
 
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...King Foo
 
Make your application expressive
Make your application expressiveMake your application expressive
Make your application expressiveChristian Varela
 
Rest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemyRest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemyAlessandro Cucci
 
Browser Serving Your We Application Security - ZendCon 2017
Browser Serving Your We Application Security - ZendCon 2017Browser Serving Your We Application Security - ZendCon 2017
Browser Serving Your We Application Security - ZendCon 2017Philippe Gamache
 
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyoエラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyoShohei Okada
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentialsPramod Kadam
 
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Shinya Ohyanagi
 
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)ZFConf Conference
 

Tendances (20)

ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
 
Api Design
Api DesignApi Design
Api Design
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 Components
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Flask SQLAlchemy
Flask SQLAlchemy Flask SQLAlchemy
Flask SQLAlchemy
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証
 
CakePHP
CakePHPCakePHP
CakePHP
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course Deck
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
 
Make your application expressive
Make your application expressiveMake your application expressive
Make your application expressive
 
Rest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemyRest API using Flask & SqlAlchemy
Rest API using Flask & SqlAlchemy
 
PHP7 Presentation
PHP7 PresentationPHP7 Presentation
PHP7 Presentation
 
Browser Serving Your We Application Security - ZendCon 2017
Browser Serving Your We Application Security - ZendCon 2017Browser Serving Your We Application Security - ZendCon 2017
Browser Serving Your We Application Security - ZendCon 2017
 
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyoエラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentials
 
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
 
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)
ZFConf 2012: Dependency Management в PHP и Zend Framework 2 (Кирилл Чебунин)
 

Similaire à Continuous Quality Assurance

20 PHP Static Analysis and Documentation Generators #burningkeyboards
20 PHP Static Analysis and Documentation Generators #burningkeyboards20 PHP Static Analysis and Documentation Generators #burningkeyboards
20 PHP Static Analysis and Documentation Generators #burningkeyboardsDenis Ristic
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009PHPBelgium
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Combell NV
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hosterCombell NV
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
 
php & performance
 php & performance php & performance
php & performancesimon8410
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance毅 吕
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confooCombell NV
 
Static analysis saved my code tonight
Static analysis saved my code tonightStatic analysis saved my code tonight
Static analysis saved my code tonightDamien Seguy
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Toolsrjsmelo
 
Standards: Don't pee in the pool
Standards: Don't pee in the poolStandards: Don't pee in the pool
Standards: Don't pee in the poolDavid Yell
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP StackLorna Mitchell
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Wim Godden
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbaivibrantuser
 
CLI, the other SAPI
CLI, the other SAPICLI, the other SAPI
CLI, the other SAPICombell NV
 

Similaire à Continuous Quality Assurance (20)

20 PHP Static Analysis and Documentation Generators #burningkeyboards
20 PHP Static Analysis and Documentation Generators #burningkeyboards20 PHP Static Analysis and Documentation Generators #burningkeyboards
20 PHP Static Analysis and Documentation Generators #burningkeyboards
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hoster
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
php & performance
 php & performance php & performance
php & performance
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
 
Static analysis saved my code tonight
Static analysis saved my code tonightStatic analysis saved my code tonight
Static analysis saved my code tonight
 
Php
PhpPhp
Php
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
 
Nginx conf.compressed
Nginx conf.compressedNginx conf.compressed
Nginx conf.compressed
 
Standards: Don't pee in the pool
Standards: Don't pee in the poolStandards: Don't pee in the pool
Standards: Don't pee in the pool
 
Php manish
Php manishPhp manish
Php manish
 
Tool up your lamp stack
Tool up your lamp stackTool up your lamp stack
Tool up your lamp stack
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP Stack
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
 
CLI, the other SAPI
CLI, the other SAPICLI, the other SAPI
CLI, the other SAPI
 

Plus de Michelangelo van Dam

GDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultGDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultMichelangelo van Dam
 
Moving from app services to azure functions
Moving from app services to azure functionsMoving from app services to azure functions
Moving from app services to azure functionsMichelangelo van Dam
 
General Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyGeneral Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyMichelangelo van Dam
 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageMichelangelo van Dam
 
Open source for a successful business
Open source for a successful businessOpen source for a successful business
Open source for a successful businessMichelangelo van Dam
 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me laterMichelangelo van Dam
 
Deploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesDeploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesMichelangelo van Dam
 
Azure and OSS, a match made in heaven
Azure and OSS, a match made in heavenAzure and OSS, a match made in heaven
Azure and OSS, a match made in heavenMichelangelo van Dam
 
Zf2 how arrays will save your project
Zf2   how arrays will save your projectZf2   how arrays will save your project
Zf2 how arrays will save your projectMichelangelo van Dam
 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsMichelangelo van Dam
 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an apiMichelangelo van Dam
 

Plus de Michelangelo van Dam (20)

GDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultGDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and default
 
Moving from app services to azure functions
Moving from app services to azure functionsMoving from app services to azure functions
Moving from app services to azure functions
 
Privacy by design
Privacy by designPrivacy by design
Privacy by design
 
DevOps or DevSecOps
DevOps or DevSecOpsDevOps or DevSecOps
DevOps or DevSecOps
 
Privacy by design
Privacy by designPrivacy by design
Privacy by design
 
Continuous deployment 2.0
Continuous deployment 2.0Continuous deployment 2.0
Continuous deployment 2.0
 
Let your tests drive your code
Let your tests drive your codeLet your tests drive your code
Let your tests drive your code
 
General Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyGeneral Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's story
 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantage
 
The road to php 7.1
The road to php 7.1The road to php 7.1
The road to php 7.1
 
Open source for a successful business
Open source for a successful businessOpen source for a successful business
Open source for a successful business
 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me later
 
Deploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesDeploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutes
 
Azure and OSS, a match made in heaven
Azure and OSS, a match made in heavenAzure and OSS, a match made in heaven
Azure and OSS, a match made in heaven
 
Getting hands dirty with php7
Getting hands dirty with php7Getting hands dirty with php7
Getting hands dirty with php7
 
Zf2 how arrays will save your project
Zf2   how arrays will save your projectZf2   how arrays will save your project
Zf2 how arrays will save your project
 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
 
The Continuous PHP Pipeline
The Continuous PHP PipelineThe Continuous PHP Pipeline
The Continuous PHP Pipeline
 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the tests
 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an api
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 

Continuous Quality Assurance

  • 1. Con$nuous  QA Michelangelo  van  Dam Macq  NV
  • 2. Michelangelo  van  Dam • independent  contractor • president  PHPBenelux • conference  speaker • community  animal ZEND FRAMEWORK PHP . 2
  • 3. Overview • introduc$on • overview  of  tools • con$nuous  integra$on -­‐ interpreta$on  of  reports • roundup 3
  • 5. What  is  quality  assurance? • safeguarding  source  code • applica$on  behaves  as  expected • bugs  discovered  before  becoming  an  issue • tracking  progress  of  a  project -­‐ development  of  features -­‐ health  of  the  codebase 5
  • 6. Why  invest  in  QA? • improving  development  code • improving  development  team • saving  $me  in  aJer  sales  maintenance • con$nuous  repor$ng • ready  to  deploy  code  (“builds”) 6
  • 9. PHP  Lint TIP:  pre-­‐commit  hook • checks  the  syntax  of  code • build  in  PHP  core • is  used  per  file -­‐ pre-­‐commit  hook  for  version  control  system -­‐ batch  processing  of  files • can  provide  reports -­‐ but  if  something  fails  -­‐>  the  build  fails 9
  • 10. Execu$on 10
  • 14. PHPUnit • tes$ng  framework  for  PHP  projects • port  of  xUnit  unit  test  frameworks -­‐ compa$ble  with  JUnit,  NUnit,  etc... • produces  generic  test  results -­‐ compa$ble  with  the  other  xUnit  frameworks • produces  code  coverage  reports -­‐ to  indicate  what  part  of  code  is  tested 14
  • 16. PHPDocumentor hPp://www.phpdoc.org 16
  • 17. PHPDoc • uses  in  code  docblocks • parses  API  documenta$on 17
  • 21. PHP_CodeSniffer • checks  source  code  on  coding  standards • reports  viola$ons  on  a  given  standard • ensures  a  consistent  way  code  is  wriPen -­‐ as  though  one  developer  wrote  all  the  code 21
  • 22. Report  types • full:  all  details  of  viola$ons • summary:  total  of  errors  and  warnings • source:  targeted  sources  with  viola$ons • xml:  a  full  report  in  XML  format • checkstyle:  XML  report  on  style  viola$ons • csv:  a  full  report  in  CSV  format • emacs:  a  full  report  in  EMACS  format • blame:  a  list  of  responsible  viola$ng  devs 22
  • 23. Example  Full  report FILE: /path/to/file.php ------------------------------------------------------------------------------- FOUND 2 ERROR(S) AND 4 WARNING(S) AFFECTING 4 LINE(S) ------------------------------------------------------------------------------- 111 | ERROR | Arguments with default values must be at the end of the | | argument list 111 | WARNING | Line exceeds 80 characters; contains 88 characters 118 | WARNING | Line exceeds 80 characters; contains 89 characters 121 | WARNING | Line exceeds 80 characters; contains 84 characters 130 | WARNING | Line exceeds 80 characters; contains 94 characters 176 | ERROR | Spaces must be used to indent lines; tabs are not allowed ------------------------------------------------------------------------------- 23
  • 24. Example  Summary  report PHP CODE SNIFFER REPORT SUMMARY -------------------------------------------------------------------------------- FILE ERRORS WARNINGS -------------------------------------------------------------------------------- /path/to/file.php 1 4 -------------------------------------------------------------------------------- A TOTAL OF 1 ERROR(S) AND 4 WARNING(S) WERE FOUND IN 1 FILE(S) -------------------------------------------------------------------------------- 24
  • 25. Example  Source  report PHP CODE SNIFFER VIOLATION SOURCE SUMMARY -------------------------------------------------------------------------------- STANDARD CATEGORY SNIFF COUNT -------------------------------------------------------------------------------- Generic Files Line length too long 4 PEAR Functions Valid default value not at end 1 -------------------------------------------------------------------------------- A TOTAL OF 5 SNIFF VIOLATION(S) WERE FOUND IN 2 SOURCE(S) -------------------------------------------------------------------------------- Although specified Zend as coding standard, there’s a relation to underlying standards like PEAR and the General coding standards 25
  • 26. Example  XML  report <?xml version="1.0" encoding="UTF-8"?> <phpcs version="1.3.0"> <file name="/path/to/file.php" errors="1" warnings="4"> <error line="111" column="83" source="PEAR.Functions.ValidDefaultValue.NotAtEnd" s everity="5">Arguments with default values must be at the end of the argument list</error> <warning line="111" column="89" source="Generic.Files.LineLength.TooLong" severity="5">Line exceeds 80 characters; contains 88 characters</warning> <warning line="118" column="90" source="Generic.Files.LineLength.TooLong" severity="5">Line exceeds 80 characters; contains 89 characters</warning> <warning line="121" column="85" source="Generic.Files.LineLength.TooLong" severity="5">Line exceeds 80 characters; contains 84 characters</warning> <warning line="130" column="95" source="Generic.Files.LineLength.TooLong" severity="5">Line exceeds 80 characters; contains 94 characters</warning> </file> </phpcs> 26
  • 27. Example  CheckStyle  report <?xml version="1.0" encoding="UTF-8"?> <checkstyle version="1.3.0"> <file name="/path/to/file.php"> <error line="111" column="83" severity="error" message="Arguments with default values must be at the end of the argument list" source="PEAR.Functions.ValidDefaultValue.NotAtEnd"/> <error line="111" column="89" severity="warning" message="Line exceeds 80 characters; contains 88 characters" source="Generic.Files.LineLength.TooLong"/> <error line="118" column="90" severity="warning" message="Line exceeds 80 characters; contains 89 characters" source="Generic.Files.LineLength.TooLong"/> <error line="121" column="85" severity="warning" message="Line exceeds 80 characters; contains 84 characters" source="Generic.Files.LineLength.TooLong"/> <error line="130" column="95" severity="warning" message="Line exceeds 80 characters; contains 94 characters" source="Generic.Files.LineLength.TooLong"/> </file> </checkstyle> 27
  • 28. Example  CSV  report File,Line,Column,Type,Message,Source,Severity "/path/to/file.php",111,83,error,"Arguments with default values must be at the end of the argument list",PEAR.Functions.ValidDefaultValue.NotAtEnd,5 "/path/to/file.php",111,89,warning,"Line exceeds 80 characters; contains 88 characters",Generic.Files.LineLength.TooLong,5 "/path/to/file.php",118,90,warning,"Line exceeds 80 characters; contains 89 characters",Generic.Files.LineLength.TooLong,5 "/path/to/file.php",121,85,warning,"Line exceeds 80 characters; contains 84 characters",Generic.Files.LineLength.TooLong,5 "/path/to/file.php",130,95,warning,"Line exceeds 80 characters; contains 94 characters",Generic.Files.LineLength.TooLong,5 28
  • 29. Example  Blame  report PHP CODE SNIFFER SVN BLAME SUMMARY -------------------------------------------------------------------------------- AUTHOR (Author %) (Overall %) COUNT -------------------------------------------------------------------------------- michelangelo (2.26) (100) 5 -------------------------------------------------------------------------------- A TOTAL OF 5 SNIFF VIOLATION(S) WERE COMMITTED BY 1 AUTHOR(S) -------------------------------------------------------------------------------- 29
  • 32. Copy/Paste  Detec$on TIP:  pre-­‐commit  hook • detects  duplicate  or  similar  lines  of  code -­‐ copied  code -­‐ code  that’s  similar 32
  • 37. • CYCLO:  Cycloma$c  Complexity • LOC:  Lines  of  Code • NOM:  Number  of  Methods • NOC:  Number  of  Classes • NOP:  Number  of  Packages • AHH:  Average  Hierarchy  Height • ANDC:  Average  Number  of  Derived  Classes • FANOUT:  Number  of  Called  Classes • CALLS:  Number  of  Opera$on  Calls 37
  • 38. Cycloma$c  Complexity • metric  calcula$on • execu$on  paths • independent  control  structures -­‐ if,  else,  for,  foreach,  switch  case,  while,  do,  … • within  a  single  method  or  func$on • more  info -­‐ hPp://en.wikipedia.org/wiki/Cycloma$c_complexity 38
  • 39. Average  Hierarchy  Height The  average  of  the  maximum  length  from  a   root  class  to  its  deepest  subclass 39
  • 41. pdepend-­‐graph graph  about  stability:  a  mix  between  abstract  and  concrete  classes 41
  • 42. 42
  • 43. 43
  • 44. PHPMD  (Mess  detec$on) hPp://phpmd.org 44
  • 45. PHPMD • iden$fy  poten$al  problems  in  source  code -­‐ possible  bugs -­‐ subop$mal  code -­‐ overcomplicated  expressions -­‐ unused  parameters,  methods,  proper$es 45
  • 48. PHP  Code  Browser hPps://github.com/mayflowergmbh/PHP_CodeBrowser 48
  • 49. phpcb • code  browser  for  php  sources -­‐ syntax  highligh$ng -­‐ colored  error  sec$ons • designed  for  usage  of  QA  tools -­‐ PHPUnit -­‐ PHP_CodeSniffer 49
  • 52. Lines  of  Code • calculates  the  size  of  a  project -­‐ gives  a  brief  detail  on  quality  of  source  code -­‐ comparable  to  sumaries  of ‣ phpcs ‣ phpmd ‣ pdepend 52
  • 54. Overview  of  output phploc 1.6.1 by Sebastian Bergmann. Directories: 547 Files: 2503 Lines of Code (LOC): 482423 Cyclomatic Complexity / Lines of Code: 0.11 Comment Lines of Code (CLOC): 224721 Non-Comment Lines of Code (NCLOC): 257702 Namespaces: 0 Interfaces: 124 Classes: 2352 Abstract: 199 (8.46%) Concrete: 2153 (91.54%) Average Class Length (NCLOC): 112 Methods: 16121 Scope: Non-Static: 15016 (93.15%) Static: 1105 (6.85%) Visibility: Public: 12712 (78.85%) Non-Public: 3409 (21.15%) Average Method Length (NCLOC): 16 Cyclomatic Complexity / Number of Methods: 2.78 Anonymous Functions: 2 Functions: 0 Constants: 3802 Global constants: 8 Class constants: 3794 Tests: Classes: 22 Methods: 43 54
  • 56. Phing’s  purpose • build  tool  wriPen  in  PHP -­‐ comparable  to  Ant  or  make • used  to  automate  build  process -­‐ build  =  all  steps  to  produce  reports • provides  targets  and  variable  proper$es -­‐ for  targeted  execu$on  of  tools  (e.g.  only  unit  tes$ng) 56
  • 57. 57
  • 58. Loca$on  of  build  reports /path/to/project /application /library /public /tests /build /api -> location for API documentation /cache -> used by CI for caching /code-browser -> browsable source code /coverage -> unit test code coverage /logs -> location for all report logs /junit.xml /jdepend.xml /pmd.xml /pmd-cpd.xml /phploc.csv /checkstyle.xml /pdepend -> dependency graphics and pyramid 58
  • 60. Ini$al  Phing  build  script <?xml version=”1.0” encoding=”UTF-8”?> <!-- $Id: jenkins.xml 123 2011-06-08 07:00:00Z michelangelo $ --> <project name=”My Project” default=”build”> <!-- a property file (key/value) to store project specific data like paths, property values and passwords --> <property file=”jenkins.properties” /> <!-- list of targets, each with their own php tool --> </project> 60
  • 61. define  our  filesets <fileset id=”php-files” dir=”${project.basedir}”> <include name=”**/*.php” /> <exclude name=”library/Zend/**” /> <exclude name=”library/ZendX/**” /> <exclude name=”tests/**” /> </fileset> 61
  • 62. clean  build  path <target name=”clean” description=”Clean build path”> <delete dir=”${project.basedir}/build” /> <mkdir dir=”${project.basedir}/build” /> <mkdir dir=”${project.basedir}/build/api” /> <mkdir dir=”${project.basedir}/build/cache” /> <mkdir dir=”${project.basedir}/build/code-browser” /> <mkdir dir=”${project.basedir}/build/coverage” /> <mkdir dir=”${project.basedir}/build/logs” /> <mkdir dir=”${project.basedir}/build/pdepend” /> </target> 62
  • 63. lint  checking <target name=”phplint” description=”Syntax checking of code”> <phplint haltonfailure=”true”> <fileset refid=”php-files” /> </phplint> </target> 63
  • 64. unit  tes$ng <target name=”PHPUnit” description=”Running unit tests”> <exec passthru=”${passthru}” dir=”${project.basedir}/tests” command=”phpunit --log-junit=${project.basedir}/build/logs/junit.xml --coverage-clover=${project.basedir}/build/logs/clover.xml --coverage-html=${project.basedir}/build/coverage --stop-on-error --stop-on-failure”/> </target> 64
  • 65. documenta$on <target name="phpdoc" description="Generate API documentation"> <phpdoc title="${project.name} API Documentation" target="${project.basedir}/build/api" output="HTML:frames:earthli" quiet="true"> <fileset refid="php-files"/> </phpdoc> </target> 65
  • 66. coding  standards <target name="phpcs" description="Coding Standards Analysis"> <exec passthru="${passthru}" command="phpcs --report=checkstyle --report-file=${project.basedir}/build/logs/checkstyle.xml --standard=Zend --ignore=library/Zend,library/ZendX,tests,docs,scripts --extensions=php ${project.basedir}"/> </target> 66
  • 67. copy-­‐paste  detec$on <target name="phpcpd" description="Copy/Paste detection"> <phpcpd> <fileset refid="php-files"/> <formatter type="pmd" outfile="${project.basedir}/build/logs/pmd-cpd.xml"/> </phpcpd> </target> 67
  • 68. lines  of  code <target name="phploc" description="Generate phploc.csv"> <exec passthru="${passthru}" command="phploc --log-csv ${project.basedir}/build/logs/phploc.csv ${project.basedir}"/> </target> 68
  • 69. code  browser <target name="phpcb" description="Source code browser" depends="phpunit, phpcs"> <exec passthru="${passthru}" command="phpcb --ignore build,library/Zend,library/ZendX,tests,docs --log ${project.basedir}/build/logs --source ${project.basedir} --output ${project.basedir}/build/code-browser"/> </target> 69
  • 70. depend  metric  calcula$ons <target name="pdepend" description="Calculate dependencies"> <exec passthru="${passthru}" dir="${project.basedir}" command="pdepend --configuration=${project.basedir}/pdepend.xml --jdepend-chart=${project.basedir}/build/pdepend/ dependencies.svg --jdepend-xml=${project.basedir}/build/logs/jdepend.xml --overview-pyramid=${project.basedir}/build/pdepend/ overview-pyramid.svg --suffix=php --ignore=library/Zend,library/ZendX,tests ${project.basedir}"/> </target> 70
  • 71. mess  detec$on <target name="phpmd" description="Mess Detection"> <phpmd> <fileset refid="php-files"/> <formatter type="xml" outfile="${project.basedir}/build/logs/pmd.xml"/> </phpmd> </target> 71
  • 72. default  target:  build <target name="build" description="Start analyzing our app"> <phingCall target="clean" /> <phingCall target="phplint" /> <phingCall target="phpdoc" /> <phingCall target="phpcs" /> <phingCall target="phpunit" /> <phingCall target="phpcpd" /> <phingCall target="phpmd" /> <phingCall target="pdepend" /> <phingCall target="phploc" /> <phingCall target="phpcb" /> </target> 72
  • 75. phing  usage • developers  can  run  at  call -­‐ all  targets -­‐ specific  targets  (like  unit  tests,  style  checking,  …) • unified  way  of  execu$ng  processes 75
  • 76. perfect  for  CI  !!! 76
  • 78. Con$nuous  Integra$on? • automated  process • tools  for  code -­‐ test -­‐ document -­‐ validate -­‐ package • triggered -­‐ by  code  change  in  version  control  system -­‐ on  fixed  intervals  (e.g.  every  weekday  at  1am) 78
  • 80. A  project  in  CI 80
  • 81. Overview  of  reports • unit  tests • code  coverage • coding  standards  viola$ons • mess  detec$on • dependency  calcula$ons • copy/paste  detec$on • code  analysis • API  documenta$on 81
  • 83. 83
  • 84. 84
  • 85. 85
  • 87. 87
  • 88. 88
  • 89. 89
  • 91. 91
  • 92. 92
  • 93. 93
  • 94. 94
  • 96. 96
  • 97. 97
  • 98. 98
  • 99. 99
  • 100. 100
  • 101. 101
  • 103. 103
  • 104. 104
  • 105. 105
  • 107. 107
  • 108. 108
  • 109. Viola$ons 109
  • 110. 110
  • 111. 111
  • 112. Round  up 112
  • 113. With  CI • con$nuous  inspec$on  of  code -­‐ errors  are  detected  early -­‐ warnings  are  reported -­‐ areas  of  improvement  are  pointed  out 113
  • 114. CI  &  PHP • all  the  tools   -­‐ to  improve  development  skills -­‐ to  deliver  quality  code -­‐ to  detect  issues  early -­‐ to  document  and  analyze  code  base 114
  • 115. Recommended  reading • the  PHP  QA  book -­‐ Sebas$an  Bergmann -­‐ Stefan  Priebsch 115
  • 116. Recommended  reading Free • OOD  Quality  Metrics -­‐ Robert  Cecil  Mar$n hPp://www.objectmentor.com/publica$ons/oodmetrc.pdf 116
  • 117. Sources  and  Code • slides: hPp://www.slideshare.net/DragonBe • sources: hPp://github.com/DragonBe/wingz • contact: -­‐ mail:  michelangelo@in2it.be -­‐ twiPer:  @DragonBe -­‐ facebook:  DragonBe 117