Here
https://github.com/jacoco/jacoco/blob/e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java#L147
for given ExecutionData Analyzer performs analysis of a single class, but 
you can supply folders, jars, etc to it - please just explore the used 
components and read their javadocs:
https://github.com/jacoco/jacoco/blob/e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java#L201-L212

Note that the way to execute classes to obtain execution data is entirely 
up to you, e.g. you don't need to use ClassLoader as in CoreTutorial.java 
(it is just an example), but e.g. can use data that is produced by JaCoCo 
agent - see 
https://github.com/jacoco/jacoco/blob/master/org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java

On Tuesday, December 5, 2017 at 4:42:05 AM UTC+1, Echo wrote:
>
> Hi Evgeny
> You are right! When i run CoreTutorial.java, i can get simple coverage 
> date. And the available data is what i need. But i only get the TestTarget 
> coverage data, and I need a set of classes coverage data(like the above 
> picture: HelloTest and Hello ). This is the TestTarget 
> https://github.com/jacoco/jacoco/blob/master/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java#L37-L55
> Regards
> Echo
>
> 在 2017年12月4日星期一 UTC+8下午8:33:19,Evgeny Mandrikov写道:
>>
>> Mentioned CoreTutorial.java doesn't generate HTML report, but simply 
>> shows available data, and works not only for a single class, but for a set 
>> of classes, what is essentially "project". So aren't this already shown in 
>> it - 
>> https://github.com/jacoco/jacoco/blob/e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java#L160-L163
>>  
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fjacoco%2Fjacoco%2Fblob%2Fe1502d10bfe8eda0a921cc8f34db3fb8f7236c4a%2Forg.jacoco.examples%2Fsrc%2Forg%2Fjacoco%2Fexamples%2FCoreTutorial.java%23L160-L163&sa=D&sntz=1&usg=AFQjCNEYSjoV_d4ZOwpVFS2d__3ybfkutg>
>>  
>> ?
>> All executed lines have status different from EMPTY and NOT_COVERED - 
>> https://github.com/jacoco/jacoco/blob/e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java#L41-L59
>>
>> On Monday, December 4, 2017 at 12:40:03 PM UTC+1, Echo wrote:
>>>
>>> Hi all
>>> I can use CoreTutorial.java 
>>> <http://www.eclemma.org/jacoco/trunk/doc/examples/java/CoreTutorial.java> 
>>> to 
>>> get simple coverage information of a *single* class. Now i want to get 
>>> the executed code line of a *project*. What should i do? 
>>> - I just need the executed code line rather than the HTML report, so i 
>>> can easily record the code line which was executed. I'll show it below. 
>>>
>>>
>>> <https://lh3.googleusercontent.com/-ZeSSJRZUHyo/WiUzc7Fw3LI/AAAAAAAAAC8/sXEKLMxZe1krxCBthrCax7nbQv9esO-SgCLcBGAs/s1600/14L%257DIH9%257D%255D%2540_QYM%257BUBMRUR%257DU.png>
>>>
>>> Regards
>>> echo
>>>
>>

-- 
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/494c6c46-f46c-4d3d-86d9-04347513676a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to