ServiceTestCase を拡張して実行するテスト ケースを取得できません。実行されていないだけでエラーはありません。
AndroidTestCase を拡張する他のテスト ケースは実行されます。
プロジェクトは次のように設定されます。
サービスを含む Android ライブラリがあります。そのマニフェスト ファイルは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.something.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application>
<service android:name=".ExampleService"
android:exported="false"
android:process=":example_service">
</service>
</application>
</manifest>
Android ライブラリ プロジェクトには、フォルダー test (Android ツールを使用して作成) にテスト プロジェクトが含まれています。
これには、次のような AndroidManfiest.xml が含まれています。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.something.android.tests"
android:versionCode="1"
android:versionName="1.0">
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.something.android.tests"
android:label="Tests for com.something.android"/>
</manifest>
テスト プロジェクトには、以下を含む build.properties もあります。
テスト済み.project.dir=..android.library.reference.1=..
ant clean run-tests を実行してテストを実行します。
ServiceTestCase テストを実行するにはどうすればよいですか?
前もって感謝します。