【发布时间】:2016-04-08 02:35:24
【问题描述】:
在我的项目中,在服务器上,PHP 单元格式化程序任务不工作(不生成报告文件),但在本地开发盒上,它正在工作。
我的 build.xml 文件如下:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Webshop" default="selenium">
<property name="project.lib.dir" value="${project.basedir}/vendor" />
<property name="selenium.logs.dir" value="${project.basedir}/build/logs" />
<property name="selenium.logs.file" value="junit-selenium.xml" />
<property name="selenium.tests.dir" value="${project.basedir}/tests" />
<target name="prepare" depends="clean">
<mkdir dir="${selenium.logs.dir}"/>
</target>
<target name="clean">
<delete dir="${selenium.logs.dir}"/>
</target>
<target name="selenium" description="Run all selenium tests of Webshop" depends="prepare">
<!-- Please change pharlocation. Vendor/bin/phpunit shouldn't be used with phing. -->
<phpunit bootstrap="${project.lib.dir}/autoload.php" pharlocation="${project.lib.dir}/bin/phpunit">
<formatter type="xml" todir="${selenium.logs.dir}" outfile="${selenium.logs.file}" />
<batchtest>
<fileset dir="${selenium.tests.dir}">
<!-- If some test folder needs to be excluded from test, mention it below -->
<!--exclude name="" /-->
</fileset>
</batchtest>
</phpunit>
</target>
</project>
它应该生成文件'junit-selenium.xml',但没有生成文件,我得到以下输出(控制台上的测试结果)。
vendor/bin/phing
Buildfile: /home/admin/ee/webshop-selenium/build.xml
Webshop > clean:
[delete] Deleting directory /home/admin/ee/webshop-selenium/build/logs
Webshop > prepare:
[mkdir] Created dir: /home/admin/ee/webshop-selenium/build/logs
Webshop > selenium:
.
Time: 9.99 seconds, Memory: 17.25Mb
OK (1 test, 29 assertions)
有人可以建议我在哪里做错了吗?
【问题讨论】:
标签: php selenium jenkins phpunit phing