Files
android_development/tools/scripts/AndroidManifest.tests.template
Muthu Ramadoss 4dd550143e ENHANCEMENT: activitycreator generates 'tests' project for instrumentation.
activitycreator script is enhanced to generate 'tests' project along with the main project. The current behavior of generating Activity is extended by generating ActivityTest in 'tests/src' folder. The 'tests' folder follows the example provided asis in 'ApiDemos'. ApiDemos was used as reference project to mimic the project layout for building tests using Instrumentation.

From 'tests' project, type:
    "adb shell am instrument -w [your.package].tests/android.test.InstrumentationTestRunner"
to run all tests using Android InstrumentationTestRunner.

NOTE: 'tests' is a separate AndroidProject by all means. It has its own AndroidManifest.xml, build.xml, src, res etc.,

AMEND:
	Fixed style issues, javadoc
	Fixed build.template to generate tests/build.xml
	Removed build.tests.template since its obsolete now.
2008-11-14 13:22:05 +05:30

22 lines
1.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="PACKAGE.tests"
android:versionCode="1"
android:versionName="1.0">
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of PACKAGE. To run the tests use the command:
"adb shell am instrument -w PACKAGE.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="PACKAGE"
android:label="Tests for ACTIVITY_NAME"/>
</manifest>