sonarrunn未解析sonarrunn文件

2024-04-20 06:59:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我在一个Python项目中遇到了一个奇怪的问题。 这是我的配置: 声纳:5.1.2 声纳转轮:2.4 Python插件:1.5

我有一个非常简单的Python项目“PyTest”:

  • 测试
  • 报告
  • 在pgm.py公司在
  • 在旁白在

我使用nose(v1.3.7)生成coverage和xunit文件,命令如下:

nostetests --with-coverage --cover-xml --cover-inclusive --with-xunit --xunit-file=reports/xunit.xml --cover-xml-file=reports/cover.xml

我用“pytestkey”给声纳准备了,这是我的声纳-项目.属性在

^{pr2}$

当我运行时,除了xunit.xml文件从未解析文件。。。在

日志:

INFO - Sensor PythonXUnitSensor
DEBUG - Using pattern 'reports/xunit.xml' to find reports
INFO - Sensor PythonXUnitSensor (done) | time 19ms
INFO - Sensor PythonCoverageSensor
DEBUG - Using pattern 'reports/cover.xml' to find reports
INFO - Parsing report '/home/bsantus/workspace/PyTest/reports/cover.xml'
DEBUG - Saving coverage measures for file 'pgm.py'
DEBUG - Saving coverage measures for file 'VO.py'
DEBUG - Parsing integration test coverage reports
DEBUG - Using pattern 'coverage-reports/it-coverage-*.xml' to find reports
DEBUG - Parsing overall test coverage reports
DEBUG - Using pattern 'coverage-reports/overall-coverage-*.xml' to find reports
INFO - Sensor PythonCoverageSensor (done) | time 65ms

你知道为什么xunit.xml文件文件未使用?在

谢谢大家


Tags: 文件todebuginfocoveragecoverxmlsensor
1条回答
网友
1楼 · 发布于 2024-04-20 06:59:52

您的报告会被解析,但是Python插件1.5版本的默认行为是只记录项目级指标。 你应该试着在你的声纳上加上下面的线-项目.属性公司名称:

sonar.python.xunit.skipDetails=false

相关问题 更多 >