Phpunit模糊错误日志记录


Phpunit obscure error logging

我正在使用Phpunit 3.7,当我通过命令行运行测试时,我遇到了以下错误日志:

Running TestSuite tests
PHPUnit 3.7.25 by Sebastian Bergmann.
Configuration read from phpunit.xml
..................E<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Unsupported operand types</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

没有日志跟踪或任何可以帮助我确定错误实际位置的东西......我如何让phpunit记录这些信息?

谢谢

您可以在调试模式下运行 PHPUnit 测试:

phpunit --debug

这将在测试结果前面写下每个已执行的测试类和方法的名称,并为您提供一种方法来找出哪个测试失败并发出该 SOAP XML 失败。