diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-09-22 22:39:41 +0200 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-09-22 22:39:41 +0200 |
commit | 7c65b2f40ea9242260eac5a746863f5925423861 (patch) | |
tree | 6c516057baa4356fde43f8d79517571bc8f0bfa2 /build.xml | |
parent | 60c6bfa6f7caeb122cb8fa820506bdd1c54a842e (diff) |
Phing: added target for phpunit+selenium
Functional tests were using an old selenium RC version. Ported them to
use phpunit + selenium; next: opensauce
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 33 |
1 files changed, 32 insertions, 1 deletions
@@ -30,6 +30,7 @@ <property name="build.doc.dir" value="${build.base.dir}/docs"/> <property name="build.web.dir" value="${build.base.dir}/web"/> <property name="build.test.dir" value="${build.base.dir}/test-reports"/> + <property name="build.functionaltest.dir" value="${build.base.dir}/functional-test-reports"/> <property name="build.snapshot.dir" value="${build.base.dir}/snapshot"/> <!-- @@ -135,7 +136,8 @@ where <target name> can be one of the following: For all PRADO developers: - - test : run unit tests (results are under /build/test-reports); + - test : run unit tests (results are under /build/test-reports) + - coverage : run unit tests collecting coverage informations - lint : run lint on framework - lint-demos : run lint on demos @@ -264,6 +266,35 @@ <target name="test" description="Running unit tests"> <delete dir="${build.test.dir}"/> <mkdir dir="${build.test.dir}"/> + <phpunit codecoverage="false" haltonfailure="false" haltonerror="false" printsummary="false" bootstrap="./tests/test_tools/phpunit_bootstrap.php"> + <batchtest> + <fileset dir="tests/unit"> + <include name="**/*Test.php"/> + </fileset> + </batchtest> + <formatter type="xml" todir="${build.test.dir}" outfile="unit-tests.xml"/> + </phpunit> + <phpunitreporttask infile="${build.test.dir}/unit-tests.xml" format="frames" todir="${build.test.dir}"/> + </target> + + <target name="functionaltest" description="Running functional tests"> + <delete dir="${build.functionaltest.dir}"/> + <mkdir dir="${build.functionaltest.dir}"/> + <phpunit codecoverage="false" haltonfailure="false" haltonerror="false" printsummary="false" bootstrap="./tests/test_tools/phpunit_bootstrap.php"> + <batchtest> + <fileset dir="tests/FunctionalTests"> + <include name="**/*TestCase.php"/> + </fileset> + </batchtest> + <formatter type="xml" todir="${build.functionaltest.dir}" outfile="functional-tests.xml"/> + </phpunit> + <phpunitreporttask infile="${build.functionaltest.dir}/functional-tests.xml" format="frames" todir="${build.functionaltest.dir}"/> + </target> + + <target name="coverage" description="Running unit tests with coverage checks"> + <delete dir="${build.test.dir}"/> + <mkdir dir="${build.test.dir}"/> + <coverage-setup database="${build.test.dir}/coverage.db"> <fileset refid="framework-php" /> </coverage-setup> |