Python Coverage how to generate Unittest report
Ok for those who end up here , I solved it with -
nose2 --html-report --with-coverage --coverage-report html --coverage ./ 
The issue I was having earlier with 'no coverage data' was fixed by specifying the the directory where the coverage should be reported, in the command above its with --coverage ./
In python I can get test coverage by coverage run -m unittest and the do coverage report -m / coverage html to get html report.
However, it does not show the actual unit test report. The unit test result is in the logs, but I would like to capture it in a xml or html, so I can integrate it with Jenkins and publish on each build. This way user does not have to dig into logs.
I tried to find solution to this but could not find any, please let me know, how we can get this using coverage tool.
I can get this using nose2 - nose2 --html-report --with-coverage --coverage-report html - this will generate two html report - one for unit test and other for coverage. But for some reason this fails when I run with actual project (no coverage data collected / reported)