Hi Felix,
if you configure the agent in tcpserver output mode you also need a dump
command to retrieve the data from the server (I can't see this in your
script). In Ant or Maven it would be the dump goal. With Gradle I'm not
familiar though. Maybe you check with the Gradle project how the dump
command works there.
Regards,
-marc
On 18.05.16 00:37, Felix Gao wrote:
I have a multiple module setup, my integration test is located at
project/module/main/func-test. When I run the integration test, all
test is ran successfully, but the jacoco's exec file does not contain
any coverage data.
The remote server is running with the following java options
|java
-javaagent:/usr/local/lib/jacocoagent-0.7.6.201602180812.jar=append=false,dumponexit=false,output=tcpserver,address=*,port=6300,includes=com..idea.*|
The build.gradle file looks like the following
|dependencies {
compile project(':api')
testCompilegroup:'com.jayway.restassured', name:'rest-assured',
version:'2.4.0'
testCompilegroup:'com.jayway.restassured', name:'json-schema-validator',
version:'2.4.0'
testCompilegroup:'com.google.code.gson', name:'gson', version:'2.3.1'
testCompilegroup:'com.squareup.retrofit', name:'retrofit', version:'1.9.0'
testCompilegroup:'com.squareup.okhttp3', name:'okhttp', version:'3.0.1'
testCompilegroup:'com.jakewharton.retrofit',
name:'retrofit1-okhttp3-client', version:'1.0.2'
testCompilegroup:'org.testng', name:'testng', version:'6.9.6'
}
sourceSets {
// all other source sets
funcTest {
java {
srcDir'func-test/java'
}
resources {
srcDir'func-test/resources'
}
}
}
dependencies {
// functional tests
// Everything from compile and testCompile targets
funcTestCompileconfigurations.compile
funcTestCompileconfigurations.testCompile
}
task funcTest( type: Test, dependsOn: cleanTest ) {
useTestNG {
suites"func-test/testng.xml"
}
jvmArgs'-XX:+HeapDumpOnOutOfMemoryError'
testClassesDir =sourceSets.funcTest.output.classesDir
println testClassesDir
classpath =sourceSets.funcTest.runtimeCReloadlasspath|| jacoco {
address =192.168.99.100
enabled =true
append =false
includes = ['com.idea.*']
destinationFile =file("${project.buildDir}/jacoco/jacocoIntegTest.exec")
classDumpFile =file("${project.buildDir}/jacoco/classpathdumps")
}
}|
When the integration task starts the jacocoIntegTest.exec file is zero
byte, when the test is done it is about 3kb, so I am assuming the
network is not a problem.
Thanks,
Felix
--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/efca4e30-2038-4440-9614-dcb3d0b208bb%40googlegroups.com
<https://groups.google.com/d/msgid/jacoco/efca4e30-2038-4440-9614-dcb3d0b208bb%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/573C08B5.5030102%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.