How to do android emma coverage test in your own ant scipts
2012-04-27 12:18
525 查看
引用:http://www.cnitblog.com/reene/archive/2011/06/30/74504.html1. emma taskdef <!-- Emma configuration -->
<property name="emma.dir" value="${android.sdk.root}/tools/lib" />
<path id="emma.lib.dir">
<pathelement location="${emma.dir}/emma.jar" />
<pathelement location="${emma.dir}/emma_ant.jar" />
</path>
<taskdef resource="emma_ant.properties" classpathref="emma.lib.dir" />
<!-- End of emma configuration -->
2. <!-- - - - - - - - - - - - - - - - - -
target: emma-instrument
- - - - - - - - - - - - - - - - - -->
<target name="emma.instrument" if="enable.emma.on.test">
<property name="emma.enabled" value="true" />
<echo>Instrumenting classes from ${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar
</echo>
<!-- It only instruments class files, not any external libs -->
<emma enabled="${emma.enabled}">
<instr mode="overwrite"
instrpath="${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar"
outdir="${project.base.dir}/${android.project.dir}/bin">
</instr>
<!-- TODO: exclusion filters on R*.class and allowing custom exclusion from
user defined file -->
</emma>
<echo>Copy emma. to project libs</echo>
<copy todir="${project.base.dir}/${android.project.dir}/libs" overwrite="true">
<fileset dir="${emma.dir}" includes="emma_device.jar"/>
</copy>
</target>
333
<property name="emma.dir" value="${android.sdk.root}/tools/lib" />
<path id="emma.lib.dir">
<pathelement location="${emma.dir}/emma.jar" />
<pathelement location="${emma.dir}/emma_ant.jar" />
</path>
<taskdef resource="emma_ant.properties" classpathref="emma.lib.dir" />
<!-- End of emma configuration -->
2. <!-- - - - - - - - - - - - - - - - - -
target: emma-instrument
- - - - - - - - - - - - - - - - - -->
<target name="emma.instrument" if="enable.emma.on.test">
<property name="emma.enabled" value="true" />
<echo>Instrumenting classes from ${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar
</echo>
<!-- It only instruments class files, not any external libs -->
<emma enabled="${emma.enabled}">
<instr mode="overwrite"
instrpath="${project.base.dir}/${android.project.dir}/bin,${project.base.dir}/${android.project.dir}/libs/sup-client.jar"
outdir="${project.base.dir}/${android.project.dir}/bin">
</instr>
<!-- TODO: exclusion filters on R*.class and allowing custom exclusion from
user defined file -->
</emma>
<echo>Copy emma. to project libs</echo>
<copy todir="${project.base.dir}/${android.project.dir}/libs" overwrite="true">
<fileset dir="${emma.dir}" includes="emma_device.jar"/>
</copy>
</target>
333
相关文章推荐
- How to do android emma coverage test in your own ant scipts
- How to create your own custom 404 error page and handle redirect in SharePoint
- How To Write Your Own Ebook(r) In 7 Days!
- Emma+Junit+Ant test android coverage
- 【Android】Do not requestWindow.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your th
- How to run Android apps in tablet mode on your phone
- How to create your own api with ACL in Magento
- Socket Programming : How to Integrate Socket.io java Client in your Android App without Maven
- learn PCL 02 How to use pcl in your own project.
- How to do code coverage test for windows service
- How to distribute your own Android library through jCenter and Maven Central from Android Studio
- How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- How did Google manage to do this? Slide ActionBar in Android application
- How to Simulate Different Network Speeds in Your JMeter Load Test
- 转:How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- HOWTO: How to Provide Your Own DllMain in an MFC Regular DLL
- How to Set Up Your Own Home Seedbox (in Windows)
- HOWTO: How to Provide Your Own DllMain in an MFC Regular DLL
- Parcelable - How to do that in Android
- How to create your own ListBox in C#