2017-02-06 56 views
0

在我们的流程自动化中,我们执行phpunit以针对代码库运行测试。由于要求的细节,输出日志文件是通过一个参数指定(而不是在phpunit.xml) - PHPUnit的运行如下:phpunit从命令行设置logIncompleteSkipped的值

phpunit -c ${buildDir}/phpunit.xml --group ${testGroup} --log-junit ${reportsDir}/out-phpunit.xml 

这种运作良好,但它不包括跳过的测试进入报告。如果phpunit.xml指定输出报告,我会包括

<logging> 
    <log type="junit" target="output-logfile.xml" logIncompleteSkipped="true"/> 
</logging> 

不幸的是,这是不可能的,由于外部进程控制和动态分配的位置。

我想包括这PHPUnit的XML:

<logging> 
    <log type="junit" logIncompleteSkipped="true"/> 
</logging> 

然而,这并没有有所作为。那么,如何从命令行告诉phpunit 记录跳过的测试?

回答