Giter VIP home page Giter VIP logo

Comments (11)

gotwarlost avatar gotwarlost commented on June 18, 2024

Yes, this is the right spot. Let me take a look.

For now would you be able to use a post-processing step using the lcov-cobertura tool to get by for a few days?

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

@Iristyle I added the cobertura output but don't have a good way to test it. I've made sure that the output is well-formed XML and matches the output of the file generated by the lcov to cobertura python tool.

Try it out and see if it works for you.

$ istanbul report cobertura

should create a cobertura-coverage.xml file.

Available in version v0.1.21

from istanbul.

Iristyle avatar Iristyle commented on June 18, 2024

Wow, that was fast! Thanks a bunch.

I will try to get to checking this out later tonight.

from istanbul.

bahmutov avatar bahmutov commented on June 18, 2024

Nice! I was looking to convert lcov to covertura when I saw the commit. Unfortunately Jenkins crashed on simple report. Here is the cobertura report xml I am trying to process using Cobertura plugin.

<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="14"  lines-covered="11"  line-rate="0.7857"  branches-valid="2"  branches-covered="1"  branch-rate="0.5"  timestamp="1352925473714" complexity="0" version="0.1">
<sources />
<packages>
    <package name="test1"  line-rate="0.7857"  branch-rate="0.5" >
    <classes>
        <class name="code.js"  filename="C:\Program Files (x86)\Jenkins\jobs\istanbulTest1\workspace\js\coverage\test1\code.js"  line-rate="0.7857"  branch-rate="0.5" >
        <methods>
            <method name="foo"  hits="1"  />
            <method name="bar"  hits="0"  />
        </methods>
        <lines>
            <line number="1"  hits="1"  branch="false" />
            <line number="2"  hits="1"  branch="false" />
            <line number="3"  hits="1"  branch="false" />
            <line number="6"  hits="1"  branch="false" />
            <line number="7"  hits="0"  branch="false" />
            <line number="8"  hits="0"  branch="false" />
            <line number="11"  hits="1"  branch="false" />
            <line number="12"  hits="1"  branch="false" />
            <line number="14"  hits="1"  branch="false" />
            <line number="16"  hits="1"  branch="true"  condition-coverage="50% (1/2)" />
            <line number="17"  hits="1"  branch="false" />
            <line number="19"  hits="0"  branch="false" />
            <line number="22"  hits="1"  branch="false" />
            <line number="23"  hits="10"  branch="false" />
        </lines>
        </class>
    </classes>
    </package>
</packages>
</coverage>

and here is the Jenkins exception:
Publishing Cobertura coverage report...
15:37:53 Publishing Cobertura coverage results...
15:37:53 ERROR: Publisher hudson.plugins.cobertura.CoberturaPublisher aborted due to exception
15:37:53 java.lang.NullPointerException
15:37:53 at java.util.regex.Matcher.getTextLength(Unknown Source)
15:37:53 at java.util.regex.Matcher.reset(Unknown Source)
15:37:53 at java.util.regex.Matcher.(Unknown Source)
15:37:53 at java.util.regex.Pattern.matcher(Unknown Source)
15:37:53 at hudson.plugins.cobertura.CoberturaXmlHandler.buildMethodName(CoberturaCoverageParser.java:241)

Hope it can help stabilize istanbul.

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

@bahmutov could you run an equivalent test of taking the lcov output, converting it into cobertura format using the python tool?

If that works, you could attach the XML generated by that tool and I can see what need to be fixed. Thanks.

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

Looks like the signature required attribute (from the latest DTD) is missing causing the NPE. I doubt the python tool will do any better. However, since it produces XML conforming to an older DTD, it may work if the coverage parser has conditional processing based on DTD version.

from istanbul.

bahmutov avatar bahmutov commented on June 18, 2024

Hmm, I guess coberture plugin is broken for this.

On Nov 14, 2012, at 3:55 PM, Krishnan Anantheswaran [email protected] wrote:

Looks like the signature required attribute (from the latest DTD) is missing causing the NPE. I doubt the python tool will do any better. However, since it produces XML conforming to an older DTD, it may work if the coverage parser has conditional processing based on DTD version.


Reply to this email directly or view it on GitHub.

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

@bahmutov Yep, that's it - the missing signature attribute. Fixed the report to add a dummy signature attribute to every method tag, set up a dummy Jenkins project to consume it and it works (fails without the fix). I'm pretty confident version 0.1.22 will work for you. Let me know either way.

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

Also noticed that the method coverage doesn't work as expected for the cobertura report, since it needs detailed info about the lines and branches within the method and istanbul does not track anything at this level. Line and branch information should be consistent with other reporting formats though.

from istanbul.

bahmutov avatar bahmutov commented on June 18, 2024

Excellent thank, I am impressed with istanbul, it is a great tool

On Nov 14, 2012, at 4:22 PM, Krishnan Anantheswaran [email protected] wrote:

@bahmutov Yep, that's it - the missing signature attribute. Fixed the report to add a dummy signature attribute to every method tag, set up a dummy Jenkins project to consume it and it works (fails without the fix). I'm pretty confident version 0.1.22 will work for you. Let me know either way.


Reply to this email directly or view it on GitHub.

from istanbul.

gotwarlost avatar gotwarlost commented on June 18, 2024

@bahmutov thanks!

from istanbul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.