SonarQube integration with Selenium to calculate run time Code Coverage

My current SonarQube version is :
I am using Community Edition
Programming language being used : Python, JavaScript, html, css.
API’s has been developed using python Programming language.

I am trying to figure out how can I integrate Selenium (Automated testing framework) whose test cases are coded in python with SonarQube to generate a run time code coverage report in SonarQube.

When I am running test cases using selenium tool at that time the SonarQube should be able to generate code coverage report i.e. percentage of code covered while running the automated test cases, during that instance.

I have implemented the SonarQube, report has been generated but the code coverage report is shown as 0. I tried to calculate code coverage for python using to generate an .xml file which can be integrated with SonarQube, major setback faced is how should I calculate coverage of API. The analysis done currently is static, I want to achieve runtime code coverage analysis.

Hey there.

SonarQube only reads coverage reports – it does not produce them. You will need to make sure your coverage report is in a format that can be one of SonarQube’s Test Coverage & Execution analysis parameters and feed the report in during analysis.

Hii Colin,
Thank you for your reply.

Can you suggest few code coverage tools which can generate a code coverage report and whose report can be feed to SonarQube.

Languages Used: Python, JavaScript, CSS, HTML

You might find this guide useful: