Skip to content

Parse cobertura result files and return a JSON structure like lcov-parse

License

Notifications You must be signed in to change notification settings

coverage-report/cobertura-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cobertura-json

Parse cobertura report files, and return a JSON representation in a lcov-parse compatible manner.

Installation

npm install @cvrg-report/cobertura-json --save

Usage

var cobertura = require( "@cvrg-report/cobertura-json" );

// Parse by file path
cobertura.parseFile("filepath.xml")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

// Parse by file contents
cobertura.parseContent("<?xml version=\"1.0\" ?><coverage>...</coverage>")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

Thanks

This repo was initially forked from vokal/cobertura-parse. Thanks a lot!

About

Parse cobertura result files and return a JSON structure like lcov-parse

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%