मैं इकाई परीक्षण Zend Framework
अनुप्रयोगों के साथ रस्सियों को सीख रहा हूं। अब तक Zend Framework
के साथ काम करने के लिए मैंने PHPUnit
सेट अप किया है और कुछ सरल टेस्ट केस लिखना शुरू कर दिया है।PHPUnit कोड कवरेज
मेरी समस्या यह है कि मैं सोच रहा हूं कि क्यों Code Coverage
मेरे phpunit.xml
में लॉगिंग टैग में सेट होने के बावजूद काम नहीं करता है।
मुझे कोई त्रुटि नहीं मिली है लेकिन कोई कवरेज रिपोर्ट नहीं बनाई गई है।
हालांकि यह काम करता है जब मैं phpunit --coverage <dir>
चलाने मेरी PHPUnit के प्रवेश खंड के रूप में नीचे है:
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuite name="CI Test Suite">
<directory>./</directory>
</testsuite>
<testsuite name="Library Test Suite">
<directory>./library</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../application/</directory>
<exclude>
<directory suffix=".phtml">../application</directory>
<file>../application/Bootstrap.php</file>
<file>../application/controllers/ErrorController.php</file>
</exclude>
</whitelist>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8" yui="true"
highlight="true" lowUpperBound="50" highLowerBound="80" />
<log type="testdox" target="./log/testdox.html" />
</logging>
</filter>
</phpunit>
किसी को भी करने से पहले इस मुठभेड़? तब संभावित समस्या क्या है?
मेरे पास फ़िल्टर के अंदर घोंसला लॉगिंग नहीं है .... इससे थोड़ा अंतर हो सकता है –