Sorry, but partial excerpts can not be called compilable and definitely not 
an easily runnable example. Please provide complete example.

On Friday, June 23, 2017 at 11:49:02 AM UTC+2, [email protected] wrote:
>
> On Friday, June 23, 2017 at 4:41:03 PM UTC+8, [email protected] wrote:
> > Hi,
> >   For example, I have three classes, ClassA, ClassB, ClassC. And these 
> classes in the same package. ClassB and ClassC is used by ClassA though 
> spring injection. 
> >   First config the jacoco in tomcat: 
> >   [export 
> CATALINA_OPTS="-javaagent:/javacoverage/jacoco/lib/jacocoagent.jar=includes=com.**.*,output=tcpserver,port=8081,address=10.2.60.247"].
> >   Second, run the test case and get the jacoco.exec.
> >   Third, get the Report with jacoco.exec and sourceCode.
> >   Then, I found a strange result. It only have coverage data for the 
> ClassA, however the coverage data for ClassB and ClassC are 0%.
> >   Until now, I could't find out waht's going on. Would you like to help 
> me solve this problem? 
> > 
> > Thanks
>
> For more detail information:
> Spring Config:
>
> <bean id="ClassA" 
> class="com.**.basebiz.userregister.core.UserRegisterByTokenBiz">
>    <property name="ClassB" ref="ClassB"></property>
>    <property name="ClassC" ref="ClassC"></property>
> </bean> 
>
> In [ClassA] class:
> UserRegisterByTokenResponseType response = ClassB.checkRequest(request);
> String bindUid = ClassC.getBindUidByMobile(mobilephone,countryCode);
>
> POM config:
> <plugin>
>   <groupId>org.jacoco</groupId> 
>   <artifactId>jacoco-maven-plugin</artifactId> 
>   <version>0.7.7.201606060606</version> 
> - <configuration>
>   
> <dataFile>${session.executionRootDirectory}/code-coverage/jacoco.exec</dataFile>
>  
>
>   </configuration>
> - <executions>
> - <execution>
>   <id>jacoco-report</id> 
>   <phase>verify</phase> 
> - <goals>
>   <goal>report</goal> 
>   </goals>
>   </execution>
>   </executions>
>   </plugin>
>
>

-- 
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/2b8ae3e5-600c-450b-a9d5-987e8989925f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to