Skip to content
Snippets Groups Projects
Select Git revision
  • develop
  • 6.0
  • 5.0
  • 4.0
  • scrutinizer-patch-4
  • 3.9 default
  • scrutinizer-patch-3
  • scrutinizer-patch-2
  • scrutinizer-patch-1
  • 3.7
  • 3.8
  • 3.6
  • 3.9_backported
  • 3.8_backported
  • 3.7_backported
  • 3.5
  • 3.6_backported
  • 3.5_backported
  • 3.4
  • 3.3_backported
  • 6.0.4
  • 6.0.3
  • 5.0.7
  • 6.0.2
  • 6.0.1
  • 5.0.6
  • 6.0.0
  • 5.0.5
  • 6.0.0-rc
  • 5.0.4
  • 6.0.0-beta
  • 5.0.3
  • 4.0.6
  • 5.0.2
  • 5.0.1
  • 4.0.5
  • 5.0.0
  • 4.0.4
  • 5.0.0-rc2
  • 5.0.0-rc1
40 results

test

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Regis Houssin authored
    b8d7542e
    History
    Name Last commit Last update
    ..
    phpunit
    selenium
    soapui
    .cvsignore
    README
    README (English)
    --------------------------------
    This directory contains unit tests and docs for
    Dolibarr quality analysis.
    
    
    
    PHPUNIT
    -------
    To use make phpunit analysis, you must:
    
    * Install PHPUnit
    If using Eclipse, you must also add an entry as external tool for phpunit programm with:
    -Name:      PHPUnit
    -Location:  Linux:   /usr/bin/php
                Windows: C:\Program Files (x86)\wamp\bin\php\php5.2.8\php.exe
    -Workspace: ${workspace_loc}
    -Arguments: Linux:   /usr/bin/phpunit ${resource_path}
                Windows: "C:\Program Files (x86)\PHPUnit-3.4.9\phpunit.php" ${resource_path}
    
    * Run Unit tests: 
    > cd test
    > phpunit MyFileTest.php
    If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".
    
    * Generate a report of Unit tests code coverage among tested classes only:
    > cd test
    > phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/MyClassTest.php
    Note that xdebug must be installed for this feature to work.
    
    * Generate a report of Unit tests code coverage among all Dolibarr classes:
    Increase your PHP memory (memory_limit in php.ini) to 512MB.
    Check that you use the "mysqli" driver in your conf.php file (otherwise
    edit the file phpunittest.xml).
    > cd test
    > phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php
    
    
    
    PHPDEPEND
    ---------
    * Install PDepend
    
    * Launch PDepend analysis:
    > cd test
    > pdepend --debug -d memory_limit=-1 --configuration=./phpunit/phpunittest.xml --phpunit-xml=./report/logs/pdepend.xml --summary-xml=./report/logs/summary.xml --jdepend-chart=./report/logs/jdepend.svg --overview-pyramid=./report/logs/pyramid.svg --ignore=custom,custom2,adodbtime,artichow,ckeditor,efc_xfss,fckeditor,fpdf,geoip,magpierss,nusoap,odtphp,phpexcel,php_writeexcel,smarty,smtps,tcpdf,vcard ../htdocs
    
    * To clean pdepend cache files
    > rm -fr ~/.pdepend/*