I see something after correcting the src folders argument, but is this how
it looks like? though the sources are properly dumped the
packages/classes/branches/lines are empty. It seems the tool does not
finding the packages under the sources. My project is not complete maven
structured project. So how i can overcome this problem.


<?xml version="1.0" ?>
<coverage branch-rate="0.181364665237" complexity="81366.0"
line-rate="0.277190735404" timestamp="1493102622">
<sources>
...
...
...
</sources>
<packages />
</coverage>

On Wed, May 3, 2017 at 12:05 PM, Balugu Ravindhar <
[email protected]> wrote:

> Hi Sean,
> I have tried giving the second argument src folder and redirected output
> cobertura.xml. I see only 2 lines which is does not seem like converted
> cobertura xml.
> actually in my case i have many src folders, the one i given as argument
> below command is one of them. Is that an issue? how i can supply multiple
> src folders.
> python cover2cover.py ../Jacoco/target/site/jacoco/report.xml
> ../secmgt/sm/src > ../cobertura/cobertura.xml
>
> $ cat cobertura.xml
> <?xml version="1.0" ?>
> <coverage branch-rate="0.181364665237" complexity="81366.0"
> line-rate="0.277190735404" timestamp="1493102622"><
> sources><source>../secmgt/sm/sm-shared/src/net/juniper/
> jnap</source><source>../secmgt/sm/sm-shared/src/net/
> juniper/sm</source><source>../secmgt/sm/sm-shared/src/net/
> juniper/space</source></sources><packages /></coverage>
>
> Appreciate your help!!
>
> Thanks,
> Ravindhar
>
>
> On Sunday, 30 April 2017 17:16:47 UTC+5:30, Sean Flanigan wrote:
>>
>> Yes, it needs Jacoco's XML report. I think the second argument is
>> supposed to be the root of your Java source directory, which typically
>> contains "org" or "com". (For a Maven project, it would be
>> {project-dir}/src/main/java.) Then you have to redirect the output to
>> cobertura.xml instead of the console.
>>
>>
>> On 30 April 2017 at 16:31, Balugu Ravindhar <[email protected]>
>> wrote:
>>
>>> Yes I have tried this the Python Tool cover2cover.py however, i am not
>>> been able to successful to convert Jacoco to cobertura.
>>> I did following, please help me what should be correct way.
>>>
>>> We are actually trying measure the code coverage for Regression Tests,
>>> so the tests are run pre-production setups.
>>> 1) The application is Jboss based, so we have configured Jboss with java
>>> agent jar to dump the .exec file on completion of tests.
>>> 2) We run the Tests and stop the Jboss server, it dumps the .exec file.
>>> 3) Then we copy the jacoco.exec file to a Developer setup where we have
>>> src code.
>>> 4) I have used the ant script to generate the report out of the
>>> collected jacoco.exec file. It generated couple of files.
>>> report.xml,report.csv , index,html,jacoco-session.html and respective class
>>> folder html files under target/site/jacoco/,
>>>
>>> ant report
>>>
>>>
>>> Now the question is which file i should use for converting Jacoco to
>>> cobertura? is it report.xml ?
>>>
>>> I tried this way but i don't see any cobertura.xml generated.
>>>
>>> python cover2cover.py ../Jacoco/target/site/jacoco/report.xml
>>> /root/secmgt/
>>>
>>> the console printed the below:
>>>
>>> <?xml version="1.0" ?>
>>> <coverage branch-rate="0.181364665237" complexity="81366.0"
>>> line-rate="0.277190735404" timestamp="1493102622"><source
>>> s><source>/root/secmgt/</source></sources><packages /></coverage>
>>>
>>>
>>>
>>> to convert to cobertura, i have tried
>>>
>>> On Thursday, 27 April 2017 17:53:57 UTC+5:30, Sean Flanigan wrote:
>>>>
>>>> It's not a pure Java solution, unfortunately, but we've been using the
>>>> Python script https://github.com/rix0rrr/cover2cover successfully.
>>>>
>>>> On 27 April 2017 at 22:20, Balugu Ravindhar <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> We have cobertura coverage and now we started with Jacoco. However we
>>>>> have to use both for some time so, i am looking for way to convert Jacoco
>>>>> coverage to Cobertura or vice-versa to have overall coverage report.
>>>>> Any pointers?
>>>>>
>>>>> Thanks
>>>>> Ravindhar
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "JaCoCo and EclEmma Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jacoco/e6605cbe-4fc5-447b-
>>>>> 8152-c5caf56e1d49%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jacoco/e6605cbe-4fc5-447b-8152-c5caf56e1d49%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "JaCoCo and EclEmma Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jacoco/918a883f-ab25-4367-b5a3-496028a468f9%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jacoco/918a883f-ab25-4367-b5a3-496028a468f9%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jacoco/MIf7EtffVS4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jacoco/8110b4f9-dc7a-43ba-901b-2d58fd607f5c%40googlegroups.com
> <https://groups.google.com/d/msgid/jacoco/8110b4f9-dc7a-43ba-901b-2d58fd607f5c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Ravindhar

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CANQ3E1Us2CPzSU6PETGzviAQeJHeBMjUTrXCkZFE_S4JCEwQMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to