Comments (11)
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.
@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.
Wow, that was fast! Thanks a bunch.
I will try to get to checking this out later tonight.
from istanbul.
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.
@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.
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.
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.
@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.
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.
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.
@bahmutov thanks!
from istanbul.
Related Issues (20)
- Looking for Constantinople.js HOT 1
- is it possible to apply the effect from /* istanbul ignore next */ to all typescript private methods automagically?
- option to disable coverage on import lines
- Open Coverage File Automatically on Test Command? HOT 2
- Branches that don't exist get reported as missing
- how to use istanbul as a library
- Analyzing coverage of node server in Windows HOT 1
- exclude imported node modules from coverage reporting HOT 1
- Cannot get the backend coverage by running Cypress UI e2e test HOT 1
- Ignore implied "else"
- Coverage format documentation not explicitly stating 'end' meaning HOT 1
- Istanbul doesn't ignore nested if, when not executed
- Async package is vulnerable
- Coverage not being collected from file called "payload.ts"
- Fails when running `istanbul report` HOT 1
- Unit test branch for SignInPage showing the SignUpComponent
- Ignore docs could be clarified by adding a list of allowed keywords
- Code comments are being covered.
- Feature Request - Parcel plugin
- No function coverage for named exports in barrel file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from istanbul.