Sonarqube php在接口和抽象类中的覆盖率
当phpunit html覆盖率报告显示不适用时,Sonarqute在抽象类和接口中显示0%的覆盖率Sonarqube php在接口和抽象类中的覆盖率,php,sonarqube,code-coverage,code-analysis,Php,Sonarqube,Code Coverage,Code Analysis,当phpunit html覆盖率报告显示不适用时,Sonarqute在抽象类和接口中显示0%的覆盖率 PHP7 phpunit 6 SonarQube 6.2(从apt官方存储库安装) SonarQube扫描仪2.8 SonarQube的PHP插件2.9.2.1744已安装 phpunit配置 <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStatic
- PHP7
- phpunit 6
- SonarQube 6.2(从apt官方存储库安装)
- SonarQube扫描仪2.8
- SonarQube的PHP插件2.9.2.1744已安装
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature Tests">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./testresults/codecoverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80"/>
<log type="coverage-clover" target="./testresults/test-clover.xml"/>
<log type="testdox-text" target="./testresults/log.txt"/>
<log type="junit" target="./testresults/test-unit.xml"/>
</logging>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
/测试/特性
/测试/单元
/应用
phpunit html报告的全局结果
phpunit html报告对抽象类覆盖的结果
声纳使用相同的test-clover.xml获得的全局结果
sonar使用相同的test-clover.xml进行抽象类覆盖的结果
是否有一些配置可以调整sonarqube并获得与phpunit analysis html报告相同的百分比?您的图片质量确实很差,您能改进一下吗?@ElenaVilchik很抱歉图像质量差。我已经改进了。PHP2.10发布了。它修复了票证jira.sonarsource.com/browse/SONARPHP-680,这可能对您有所帮助。此版本已修复。