Tried Jacoco with TestNG but jacoco.exec file not generated.

208 views
Skip to first unread message

deepa...@gmail.com

unread,
Feb 13, 2015, 7:51:44 AM2/13/15
to jac...@googlegroups.com
Tried Jacoco with TestNG but jacoco.exec file not generated.
Below is code snippet of ant file:

<jacoco:coverage enabled="true" destfile="${outputDir}">

<testng outputDir="${outputDir}" usedefaultlisteners="false" dumpCommand="true" listeners="com.saba.apitest.testharness.SabaCIListener" suiteRunnerClass="com.saba.apitest.SabaTestNG">
<classpath>
<pathelement location="${buildSabaWebHome}/lib/saba-inst.jar" />
<pathelement path="${UNITTEST_CLASSPATH}" />
<path refid="sabaunittest.class.path" />
</classpath>
<jvmarg value="-Xms32m" />
<jvmarg value="-Xmx512m" />
<jvmarg value="-XX:PermSize=32m" />
<jvmarg value="-XX:MaxPermSize=256m" />
<jvmarg value="-Xdebug" />
<jvmarg value="-XX:-UseSplitVerifier"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8588,server=y,suspend=${allowDebug}" />
<reporter classname="org.testng.reporters.XMLReporter" />
<reporter classname="com.saba.apitest.testharness.SuiteHTMLReporter" />
<reporter classname="com.saba.apitest.testharness.TestHTMLReporter" />
<xmlfileset dir="${buildSourceDir}/sabatest/apitest/input" includes="**/${inputFile}" />
<sysproperty key="runStdTestNG" value="true" />
<sysproperty key="testInputFolder" value="${buildSourceDir}/sabatest/apitest/src/unittest" />
<sysproperty key="testOutPutFolder" value="${outputDir}" />
<sysproperty key="reportsDir" value="${outputDir}" />
<sysproperty key="sourceDir" value="${buildSourceDir}" />
<sysproperty key="guitestprops" value="${guitestprops}" />
<sysproperty key="testresourcesDir" value="C:\grid\qetest\test-resources" />
<sysproperty key="saba.install.path" value="${buildSabaWebHome}" />
<sysproperty key="DEBUG" value="false" />
<sysproperty key="com.saba.util.Debug.SabaDebug" value="true" />
<sysproperty key="com.saba.util.Debug.PrintSysOut" value="false" />
<sysproperty key="com.saba.notify.async.useLocalSyncMode" value="false" />
<sysproperty key="oracle.jdbc.V8Compatible" value="true" />
<sysproperty key="defaultRestUrl" value="http://localhost/Saba/api/" />
<!-- <sysproperty key="emma.rt.control" value="false" />
<sysproperty key="emma.coverage.out.file" value="${emmaCoverageDir}/emfiles/stdtest.ec" /> -->
<sysproperty key="defaultEntityPath" value="${buildSourceDir}/sabatest/apitest/bin/DefaultDataEntity.xml" />
<sysproperty key="defaultComponentPath" value="${buildSourceDir}/sabatest/apitest/bin/DefaultDataComponent.xml" />
<sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.Log4JLogger" />
<sysproperty key="log4j.configuration" value="${buildSourceDir}/product/build/unittest-log4j.xml" />
<sysproperty key="logback.configurationFile" value="${buildSabaWebHome}/config/sabaLogConfig.xml" />
<sysproperty key="javax.xml.soap.SOAPFactory" value="org.apache.axis.soap.SOAPFactoryImpl" />
<sysproperty key="javax.xml.soap.MessageFactory" value="org.apache.axis.soap.MessageFactoryImpl" />
<sysproperty key="javax.xml.soap.SOAPConnectionFactory" value="org.apache.axis.soap.SOAPConnectionFactoryImpl" />
<sysproperty key="useMemCacheServer" value="${useMemCacheServer}" />
<sysproperty key="memCacheConfig" value="${memCacheConfig}" />
<sysproperty key="memcachekeyprefix" value="${memcachekeyprefix}" />
</testng>

</jacoco:coverage>
<record name="${outputDir}/stdtest.log" ACTION="stop" />
</target>

Marc Hoffmann

unread,
Feb 17, 2015, 12:08:54 PM2/17/15
to jac...@googlegroups.com
Hi,

the value "${outputDir}" for the destfile attribute looks suspicious:
Does it point to a directory? If a directory with that name already
exists a file with the same name cannot be created. Please try to
specify a file which can actually be created, e.g.

destfile="${outputDir}/jacoco.exec"

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages