I have been evaluating Jacoco (EclEmma) as code coverage generation tool
for last couple of days, and was about to get the coverage dump file after
executing integration tests. However coverage report generation is bit
cumbersome using coverage dump files. Jacoco was initially designed for
unit test coverage and when it comes to server side test coverage
generation it has limitations with reporting. With our existing coverage
generation tool (Emma) we had gained more user friendliness by managing
coverage generation though test framework.

1. Jacoco needs source and class files to generate coverage report (in our
case don't have source files of components at test runtime).
2. Pointing jar files for coverage generation not working.
3. Can't use instrumented class files back for report generation (should be
fresh class files without any modifications)
4. No command line tool for coverage report generation.
5. Class filtering from coverage generation is not straightforward.
6. If we are going ahead with their maven/ant plugins, update of all test
module pom files are required.
7. Might need to introduce maven profiles to disable coverage generation.

I'm going though Jacoco API to find a better way for coverage report
generation. Will update the thread with findings. Other alternative is to
fix Emma (existing coverage tool) to run with JDK 1.8.

Thanks,
Krishantha.


On Tue, Mar 10, 2015 at 9:20 AM, Kishanthan Thangarajah <kishant...@wso2.com
> wrote:

> Hi Dharshana,
>
> On Mon, Mar 9, 2015 at 6:48 PM, Dharshana Warusavitharana <
> dharsha...@wso2.com> wrote:
>
>> Hi Kishanthan,
>>
>>
>> Please update the entry <coverage>true</coverage>
>> in automation.xml.
>>
>> This will avoid instrumentation and disable coverage. So you don't have
>> to disable whole integration test module.
>>
>
> No, I did not suggest to disable the integration module, but to disable
> instrumentation and coverage.
>
> But given that this will disable coverage reports, I think we should not
> go for that approach. We will continue to use the old integration framework
> on kernel 4.4.0 and push CARBON-15194 for 4.5.0.
>
>
>
>> By updating this entry you can execute all integration tests normally and
>> generate Surefire reports.
>>
>> But coverage will not be generated. You can follow thin until stable
>> solution comes.
>>
>> Thank you,
>> Dharshana.
>>
>>
>>
>> On Mon, Mar 9, 2015 at 8:45 AM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> Hi SameeraJ, Krishantha,
>>>
>>> I think this issue will again arise for kernel 4.4.0 release with
>>> https://wso2.org/jira/browse/CARBON-15194.
>>>
>>> Either we can disable coverage report generation on kernel integration
>>> or we will have to push CARBON-15194 for 4.5.0.
>>>
>>>
>>>
>>> On Thu, Feb 26, 2015 at 6:56 PM, Sameera Jayasoma <same...@wso2.com>
>>> wrote:
>>>
>>>> Hi Folks,
>>>>
>>>> AS integration tests are failing in Java 8 due to $Subject. Following
>>>> is the error.
>>>>
>>>> *java.lang.ClassFormatError: Illegal local variable table length 5 in
>>>> method org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory.<init>()V*
>>>>
>>>> Looks like Java 8 cannot understand the bytecode produced by
>>>> instrumentations. We are using an older version of EMMA. I guess the
>>>> generated bytecode does not compatible with Java 8.
>>>>
>>>> Automation Team, can we find a solution to this problem?
>>>>
>>>> Thanks,
>>>> Sameera.
>>>>
>>>>
>>>> [2015-02-26 15:05:04,157] ERROR
>>>> {org.wso2.carbon.user.core.internal.Activator} -  Cannot start User Manager
>>>> Core bundle
>>>>
>>>> *java.lang.ClassFormatError: Illegal local variable table length 5 in
>>>> method org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory.<init>()V*at
>>>> java.lang.Class.forName0(Native Method)
>>>> at java.lang.Class.forName(Class.java:340)
>>>> at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$2.run(CarbonContextDataHolder.java:1181)
>>>> at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$2.run(CarbonContextDataHolder.java:1177)
>>>> at java.security.AccessController.doPrivileged(Native Method)
>>>> at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder.classForName(CarbonContextDataHolder.java:1177)
>>>> at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder.access$700(CarbonContextDataHolder.java:94)
>>>> at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:456)
>>>> at
>>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
>>>> at
>>>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
>>>> at
>>>> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:341)
>>>> at javax.naming.InitialContext.lookup(InitialContext.java:417)
>>>> at javax.naming.InitialContext.doLookup(InitialContext.java:290)
>>>>
>>>>
>>>> --
>>>> Sameera Jayasoma,
>>>> Software Architect,
>>>>
>>>> WSO2, Inc. (http://wso2.com)
>>>> email: same...@wso2.com
>>>> blog: http://blog.sameera.org
>>>> twitter: https://twitter.com/sameerajayasoma
>>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>>> Mobile: 0094776364456
>>>>
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Senior Software Engineer,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com
>>> <http://kishanthan.wordpress.com>*
>>> Twitter - *http://twitter.com/kishanthan
>>> <http://twitter.com/kishanthan>*
>>>
>>
>>
>>
>> --
>>
>> Dharshana Warusavitharana
>> Senior Software Engineer , Test Automation
>> WSO2 Inc. http://wso2.com
>> email : dharsha...@wso2.com <dharsha...@wso2.com>
>> Tel  : +94 11 214 5345
>> Fax :+94 11 2145300
>> cell : +94770342233
>> blog : http://dharshanaw.blogspot.com
>>
>> lean . enterprise . middleware
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Senior Software Engineer,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 
Krishantha Samaraweera
Senior Technical Lead - Test Automation
Mobile: +94 77 7759918
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to