Environment and development tools: Difference between revisions

Line 162: Line 162:
Then to analyze files generated by XDebug profiling, you must call the page by adding parameter XDEBUG_PROFILE=1 to generate the file and then install KCacheGrind (Linux) or WinCacheGrind (Windows) to analyze them.
Then to analyze files generated by XDebug profiling, you must call the page by adding parameter XDEBUG_PROFILE=1 to generate the file and then install KCacheGrind (Linux) or WinCacheGrind (Windows) to analyze them.


== To develop or use PHPUnit test ==
== To develop or use Quality controls (PHPUnit, PHPCodeSniffer, PHPCpd, PHPDepends) ==
=== From Eclipse ===
=== From Eclipse ===
You can also optionnally install The PHP Tools integration (PTI) using the Eclipse plugin installer menu with this following URL:
You can also optionnally install The PHP Tools integration (PTI) using the Eclipse plugin installer menu with this following URL:
Line 168: Line 168:
http://www.phpsrc.org/eclipse/pti/
http://www.phpsrc.org/eclipse/pti/


If you do so, menu to launch PHPUnit tests are available in your Eclipse menu. Modify your Eclipse setup (Windows-Preferences-PHPTools-PHPUnit) like on screen shot (click to zoom):
If you do so, menu to launch tools tests are available in your Eclipse menu.  
 
Modify your Eclipse setup (Windows-Preferences-PHPTools-PHPCodeSniffer) to add a new directory standard found into''' dev/codesniffer'''.
 
Modify your Eclipse setup (Windows-Preferences-PHPTools-PHPUnit) like on screen shot (click to zoom):


[[File:Eclipse setup PHPUnit.png|100px]]
[[File:Eclipse setup PHPUnit.png|100px]]


If not, you must install and run PHPUnit manually from command line.
If not, you must install and run PHPUnit and other quality tools manually from command line.


=== From Command Line ===
=== From Command Line ===
Line 188: Line 192:
==== Execute PHPUnit tests ====
==== Execute PHPUnit tests ====
* Go into directory '''/test''' of sources. Read file '''README''' to know the process to execute a unit test campaign.
* Go into directory '''/test''' of sources. Read file '''README''' to know the process to execute a unit test campaign.
==== Install other quality tools ====
* Take a look at tools documentation (PHPCodeSniffer, PHPPcd, PHPDepends).


== To develop or use Selenium tests ==
== To develop or use Selenium tests ==