Python Anaylsis Report not pushing Report on SonarQube

Template for a good bug report, formatted with Markdown:

  • versions :- * Developer Edition 9.0
  • error observed (wrap logs/code around triple quote ``` for proper formatting) Not Displaying result on sonar qube
  • steps to reproduce
  • potential workaround

Steps We areusing:-
Sonar property file:-

sonar.projectKey=FlaskApp
sonar.projectName=FlaskApp
sonar.projectVersion=1.0

sonar.sources=bluebay_flask_app

sonar.sourceEncoding=UTF-8

## Cobol Specific Properties

# comma-separated paths to directories with copybooks
sonar.cobol.copy.directories=copybooks
# comma-separated list of suffixes
sonar.cobol.file.suffixes=cbl,cpy
sonar.cobol.copy.suffixes=cpy



## Flex Specific Properties

# retrieve code coverage data from the Cobertura report
sonar.flex.cobertura.reportPath=coverage-report/coverage-cobertua-flex.xml



# PL/I Specific Properties
sonar.pli.marginLeft=2
sonar.pli.marginRight=0

Added steps:-

  1. Prepare Analysis:-
    image

  2. Run unit Tests Using belwo command:-
    Invoke-Command -ScriptBlock { & $pythonExe -m pytest --junitxml=pytest-report.xml --cov-report xml --cov . -v .}

  3. Run Code ANalysis
    4.Publish Quality results

I can see Coverage.xml and testresult.xml

image

Any idea anything else needs adding

Currently on SOnarQube is :-

Thanks
Sunil Bindra

Hi Sunil,

Your coverage report isn’t going to be picked up automatically; you need to pass it in to analysis via an analysis property. The docs should help.

 
Ann