ant - zend framework 2 + phpunit + multiple modules + continuous integration -


thanks in advance comments. have started switch zend framework 1 zf2 , after running through quick start , several other tutorials noticed there short coming 'default' way use phpunit. either or lost , confused.

the folder structure default project

project | - config | | - autoload | | | - global.php | | | - local.php.dist | | - application.config.php | - data | - module | | - application | | | - config | | | - src | | | - test | | | | - applicationtest | | | | - bootstrap.php | | | | - phpunit.xml | | | | - testconfig.php.dist  | | | - view | | | - module.php | | - album | | | - config | | | - src | | | - test | | | | - albumtest | | | | - bootstrap.php | | | | - phpunit.xml | | | | - testconfig.php.dist  | | | - view | | | - module.php | - public | - vendor 

my question how use jenkins ant test of phpunit test suites. understand reason behind testing each module individually how can automate 1 report.xml back. , better if didn't need specify each module in phpunit config. or build.xml.

again thank comments.

i forgot answer own question when figured out apologize community forgot... everyones benefit here how got work.

build.xml

<target name="phpunit" description="run unit tests phpunit">     <apply executable="../vendor/bin/phpunit" parallel="false">         <fileset dir="${env.workspace}/module" >             <include name="**/test/phpunit.xml"/>         </fileset>         <arg value="--configuration" />         <srcfile/>     </apply> </target> 

and phpunit.xml each module

<phpunit bootstrap="bootstrap.php">     <testsuites>         <testsuite name="application">             <directory>./</directory>         </testsuite>     </testsuites>  <!-- filters matter code coverage reporting -->     <filter>         <blacklist>             <directory>../../../vendor/</directory>             <directory>./</directory>             <file>../module.php</file>         </blacklist>     </filter>     <logging>         <log type="coverage-html" target="../../../build/coverage" title="application module" charset="utf-8" yui="true" highlight="true" lowupperbound="35" highlowerbound="70"/>         <log type="coverage-clover" target="../../../build/logs/clover-application.xml"/>         <log type="junit" target="../../../build/logs/junit-application.xml" logincompleteskipped="false"/>     </logging> </phpunit> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -