python - How to get tests coverage using Django, Jenkins and Sonar? -


i'm trying test unit coverage sonar. so, have followed these steps :

  1. generating report python manage.py jenkins --coverage-html-report=report_coverage
  2. setting properties in /sonar/sonar-3.5.1/conf/sonar.properties:

sonar.dynamicanalysis=reusereports sonar.cobertura.reportpath=/var/lib/jenkins/workspace/origami/dev/src/origami/reports/coverage.xml

when launch tests, reports generated in right place. however, no unit tests detected sonar. missing step or wrong?

i think problem there seem no link between sonar , jenkins. easier make plugins.

after installing plugins you'd have add build step in jenkins administration.

in order see coverage report in sonar should use "jenkins sonar plugin". force create maven project (and pom.xml) , you're using django (which maven does), may not want.

i think want seeing code coverage somewhere , maybe should integrate in jenkins instead of sonar. can use 2 plugins, "jenkins cobertura plugin" , "html publisher plugin".

jenkins cobertura plugin allow see graphically code coverage coverage.xml. can see percentage covered in package, file, classe, line, , conditionnal. you'll have add link coverage.xml jenkins in project administration. more detail here.

html publisher plugin] useful see detailled code coverage publishing coverage report in html.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -