Python console app that reads xml file generated by EclEmma (.coveragexml) and creates html report
- python3
- xml.etree.ElementTree
- getopt
- os
- sys
- re
- shutil
- glob
Usage:
python emma2html.py -i <inputfile> -s <coverage settings>
Example:
python emma2html -i vstest.coveragexml -s 90:90:90:90
Coverage settings is made up of threshold settings in percentage class:method:block:line
For example -s 100:90:0:95
means 100& class coverage, 90% method coverage, 0% block coverage and 95% line coverage.
emma2html creates a directory below current directory. The created directory is named CoverageReport and contains the coverage report in html format.
If using docker linus and windows docker images can be built.
Build
docker build -t simmarn/emma2html:alpine -f docker-alpine/Dockerfile .
Run
docker run -it --rm --name emma2html -v "$PWD":/usr/emma2html -u $(id -u ${USER}):$(id -g ${USER}) simmarn/emma2html:alpine -i vstest.coveragexml -s 80:80:0:80
Build
docker build -t simmarn/emma2html:win -f docker-windows/Dockerfile .
Run using powershell
docker run -it --rm --name emma2html -v ${PWD}:c:\emma2html simmarn/emma2html:win -i vstest.coveragexml -s 80:80:0:80