thanks for the explaination.

Debuging does not give me much details, however i had updated the task 
script by adding some println as below:

additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
println additionalSourceDirs.size()
println additionalSourceDirs.empty

sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
println sourceDirectories.size()
println sourceDirectories.empty

classDirectories = files(subprojects.sourceSets.main.output)
println classDirectories.empty
println classDirectories.files

def execfile= executionData file("$buildDir/jacoco/bddTest.exec")
println execfile
println  "$buildDir/jacoco/bddTest.exec"



below is the output:

0
true
0
true
true
[]
null
C:\Users\U645789\cucumberJacocoPoc\build/jacoco/bddTest.exec

below is how my project looks like

[image: proj.JPG]



Looks like the files and the folder locations are not specific properly. 
please advice.


below is the details from console after running the task with -- debug.


:compileJava UP-TO-DATE
:processResources NO-SOURCE
:classes UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:generateJacocoUTReport UP-TO-DATE

BUILD SUCCESSFUL in 1s
5 actionable tasks: 5 up-to-date
11:52:41 AM: Task execution finished 'generateJacocoUTReport'.

thanks


On Monday, 17 December 2018 10:47:53 UTC-5, Evgeny Mandrikov wrote:
>
> class files are not stored inside exec-file,
>
> location of class files used by IDE
> can be different
> from location of class files used by Gradle build,
> and is actually different as shown on below screenshot,
>
> And once again:
> since you have trouble with generation of report using Gradle task, then 
> you must debug Gradle task instead of focusing on IDE,
> and one of the ways to start doing this - is to execute Gradle with more 
> verbose log ("gradle --info" or "gradle --debug") and watch what will be 
> printed during execution of your task.
>
> [image: screenshot.png]
>
>
>
> On Monday, December 17, 2018 at 3:42:39 PM UTC+1, Balesh koijam wrote:
>>
>> Thanks Mandrikov  for the reply,
>>
>> as mentioned above, the exec file that was generated was used to generate 
>> the coverage report using the Intellji feature, where i could see the 
>> reports looking good. with this , i am assuming that classes should be 
>> there to analyze. please correct me if my understanding is wrong.
>>
>>
>>
>> On Friday, 14 December 2018 07:55:16 UTC-5, Evgeny Mandrikov wrote:
>>>
>>> Why not execute Gradle with debug information and watch what it will 
>>> print?
>>>
>>> Most likely message will be
>>>
>>> Writing bundle 'ProjectName' with 0 classes
>>>
>>> Because such report is likely due to absence of classes to analyze, i.e. 
>>> in
>>>
>>> classDirectories = subprojects.sourceSets.main.output
>>>
>>>

-- 
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/e5e04836-cf5c-48d6-ab56-98c5ff5f286a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to