【发布时间】:2021-12-26 17:05:10
【问题描述】:
对不起,交叉发帖:
https://community.sonarsource.com/t/importing-mutation-tests-with-pitest/52285/3
我对 Sonarqube 和 QA 非常陌生,我正在确保承包商提供的代码(和单元测试)质量良好。
我正在运行 maven 来运行pitests:
mvn clean install org.pitest:pitest-maven:mutationCoverage -DtimeoutConstant=10000 -DoutputFormats=XML
我将报告导入 Sonarqube 社区版,但我收到一堆警告,我不知道它们是否意味着存在未导入的突变测试
WARN: Found unknown mutation operator: org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator
或
WARN: Found unknown mutation operator: WARN: Found unknown mutation operator: org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator
我以这种方式运行声纳扫描仪(我有匿名信息):
"C:\route_to_sonar\sonar-scanner-4.6.0.2311-windows\bin\sonar-scanner.bat" -D"sonar.projectKey=Gestor2CNegro" -D"sonar.sources=." -D"sonar.host.url=http://localhost:9000" -D"sonar.login=ffffffffffffffffffffffffffffffffff" -D"sonar.dependencyCheck.htmlReportPath=.\myproject\dependency-check-report.html" -D"sonar.dependencyCheck.xmlReportPath=.\myproject\dependency-check-report.xml" -D"sonar.coverage.jacoco.xmlReportPaths=.\myproject\jacoco.xml" -D"dc5.mutationAnalysis.pitest.sensor.reports.directory=.\myproject\target\pit-reports\202111151408" "-Dhttp.proxyHost=myproxy" "-Dhttp.proxyPort=8080"
我已启用调试模式,但我没有看到任何日志报告这些警告并给我任何线索。
【问题讨论】:
标签: java maven testing sonarqube mutation-testing