Re: How to get code coverage of Integration Test ?

2014-11-28 Thread Stephan Windmüller
On 28.01.2013, Julien Smadja wrote:

 And my problem is : *tapestry's components, pages, forms don't seem to be
 instrumented* because there is no coverage when watching in Sonar Report.
 
 I have a coverage percent for classes in packages like domain, but nothing
 in pages or components.

This post is rather old, but I stumpled upon this problem again and
thought about sharing a possible solution.

As explained in the FAQ[0] of Jacoco, there can be issues when classes
are changed in the application server, this changing the class id[1].
There are two possible solutions:

1. Specify a classdumpdir for the agent and use those classes for reporting.

2. Use offline instrumentation.

Both worked for me, but the first option produced duplicates of classes
which caused the reporting to fail.

Regards
 Stephan

[0] http://www.eclemma.org/jacoco/trunk/doc/faq.html
[1] http://www.eclemma.org/jacoco/trunk/doc/classids.html
[2] http://www.eclemma.org/jacoco/trunk/doc/offline.html

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How to get code coverage of Integration Test ?

2014-11-28 Thread Stephan Windmüller
On 29.01.2013, Lenny Primak wrote:

 Have you tried running in production mode?  That might work better. 

Just tested it, enabling production mode has no effect.

- Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How to get code coverage of Integration Test ?

2013-01-29 Thread Stephan Windmüller
On 28.01.2013 15:58, Julien Smadja wrote:

 I have a coverage percent for classes in packages like domain, but nothing
 in pages or components.
 
 Do you have a solution for this ? Is this a problem with javassist ?

IIRC we had the same problem using EMMA[0].

What did work was the code coverage integrated in IntelliJ IDEA[1]. We
started our application server from within the IDE and were able to
measure the code coverage of Tapestry pages.

HTH
 Stephan

[0] http://emma.sourceforge.net/
[1] http://www.jetbrains.com/idea/webhelp/code-coverage-2.html



smime.p7s
Description: S/MIME Kryptografische Unterschrift


Re: How to get code coverage of Integration Test ?

2013-01-29 Thread Julien Smadja
Thank you, I'll test your solution with Idea 12, and I'll tell you if it
works too.


2013/1/29 Stephan Windmüller stephan.windmuel...@tu-dortmund.de

 On 28.01.2013 15:58, Julien Smadja wrote:

  I have a coverage percent for classes in packages like domain, but
 nothing
  in pages or components.
 
  Do you have a solution for this ? Is this a problem with javassist ?

 IIRC we had the same problem using EMMA[0].

 What did work was the code coverage integrated in IntelliJ IDEA[1]. We
 started our application server from within the IDE and were able to
 measure the code coverage of Tapestry pages.

 HTH
  Stephan

 [0] http://emma.sourceforge.net/
 [1] http://www.jetbrains.com/idea/webhelp/code-coverage-2.html




-- 

*Julien Smadja*

 Email : jsma...@xebia.fr

Mobile : +33(0)6 59 11 72 31

http://www.xebia.fr

http://blog.xebia.fr

*Siège Social*

La Défense Colisée

10 / 12 Avenue de l'arche

Faubourg de l'Arche

92419 Courbevoie Cedex


Re: How to get code coverage of Integration Test ?

2013-01-29 Thread Julien Smadja
Yes, it works.

I had to use Tomcat server instead of mvn tomcat:run command in Intellij
Idea.

Unfortunately, I think I won't be able to automatize this task.

Thank you for your answer.


Re: How to get code coverage of Integration Test ?

2013-01-29 Thread Stephan Windmüller
On 29.01.2013 11:29, Julien Smadja wrote:

 Unfortunately, I think I won't be able to automatize this task.

You could try the integration server from Jetbrains, Teamcity, but I do
not know if it is able to perform the same instrumentation as IDEA.

http://www.jetbrains.com/teamcity/

- Stephan



smime.p7s
Description: S/MIME Kryptografische Unterschrift


Re: How to get code coverage of Integration Test ?

2013-01-29 Thread Lenny Primak
Have you tried running in production mode?  That might work better. 

On Jan 29, 2013, at 3:05 AM, Stephan Windmüller 
stephan.windmuel...@tu-dortmund.de wrote:

 On 28.01.2013 15:58, Julien Smadja wrote:
 
 I have a coverage percent for classes in packages like domain, but nothing
 in pages or components.
 
 Do you have a solution for this ? Is this a problem with javassist ?
 
 IIRC we had the same problem using EMMA[0].
 
 What did work was the code coverage integrated in IntelliJ IDEA[1]. We
 started our application server from within the IDE and were able to
 measure the code coverage of Tapestry pages.
 
 HTH
 Stephan
 
 [0] http://emma.sourceforge.net/
 [1] http://www.jetbrains.com/idea/webhelp/code-coverage-2.html
 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How to get code coverage of Integration Test ?

2013-01-28 Thread Steve Eynon
T5 instruments pages and components itself and uses it's own class
loader to reload them, so it's very unlikely Sonar is able to hook
that. (Not that I know anything of Sonar.)

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org