これらの手順は、 Trade Federation
パッケージがローカルで利用可能であることを前提としています。そうでない場合は、ダウンロード手順に従って入手してください。
次に、次のコマンドを使用して、インストルメンテーションテストのAPKをインストールし、テストを実行して、実行中のテストを表示します。
./tradefed.sh run instrumentations --apk-path <path of your apk>
次のような出力を使用します。
07-17 10:55:32 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testOfArgb
07-17 10:55:33 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testIsRunning
07-17 10:55:34 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testGetCurrentPlayTime
07-17 10:55:35 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testStartDelay
07-17 10:55:35 I/InvocationToJUnitResultForwarder: Run ended in 2m 20s
オプションで、特定のデバイスに対して実行する--serial <device serial number>
を指定できます。デバイスのシリアル番号は、 adb devices
を使用して取得できます。
Tradefedの実行の詳細については、「 Tradefedによるテスト」セクションを参照してください。