AndroidJUnitTest

public class AndroidJUnitTest
extends InstrumentationTest implements IRuntimeHintProvider , ITestFileFilterReceiver , ITestFilterReceiver , ITestAnnotationFilterReceiver , IShardableTest

java.lang.オブジェクト
com.android.tradefed.testtype.InstrumentationTest
com.android.tradefed.testtype.AndroidJUnitTest


android.support.test.runner.AndroidJUnitRunner を使用して、指定されたデバイス上でインストルメンテーション テスト パッケージを実行するテスト。

まとめ

田畑

public static final String EXCLUDE_COLLECTOR_FILTER_KEY

public static final String INCLUDE_COLLECTOR_FILTER_KEY

コレクター側ヘルパー ライブラリのオプション。

public static final String NEW_RUN_LISTENER_ORDER_KEY

デバイス側で新しいRunListener順序を有効にするために使用されるインストルメンテーション テスト ランナーの引数。

public static final String USE_TEST_STORAGE_SERVICE

パブリックコンストラクター

AndroidJUnitTest ()

パブリックメソッド

void addAllExcludeAnnotation ( excludeAnnotations) addAllExcludeAnnotation ( excludeAnnotations)

テストにマークが付いている場合に除外する注釈のERROR(/Set)を追加します。

void addAllExcludeFilters ( filters) addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

void addAllIncludeAnnotation ( annotations) addAllIncludeAnnotation ( annotations)

テストにマークが付いている場合に含める注釈のERROR(/Set)を追加します。

void addAllIncludeFilters ( filters) addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

void addExcludeAnnotation (String excludeAnnotation)

テストにマークが付いている場合に除外する注釈を追加します。

void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

void addIncludeAnnotation (String annotation)

テストにマークが付いている場合に含める注釈を追加します。

void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

void clearExcludeAnnotations ()

現在追跡されているすべての除外注釈を削除します。

void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

void clearIncludeAnnotations ()

現在追跡されているすべてのインクルードアノテーションを削除します。

void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

getExcludeAnnotations ()

除外する注釈の現在のERROR(/Set)を返します。

getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

File getExcludeTestFile ()

除外されたテストを含むファイルを返します。

getIncludeAnnotations ()

含める注釈の現在のERROR(/Set)を返します。

getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

File getIncludeTestFile ()

含まれているテストを含むファイルを返します。

long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。

boolean isClassOrMethod (String filter)

文字列がクラスまたはメソッドの名前である場合に返します。

boolean isParameterizedTest (String filter)

文字列がパラメータ化されたテストである場合に返します。

boolean isRegex (String filter)

文字列がフィルターの正規表現である場合に返します。

void run ( TestInformation testInfo, ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

void setExcludeTestFile (File testFile)

除外するテストファイルを設定します。

void setIncludeTestFile (File testFile)

インクルードのテストファイルを設定します。

split (int shardCount)

実行しようとしている shardCount も提供する、 split()の代替バージョン。

保護されたメソッド

void setRunnerArgs (IRemoteAndroidTestRunner runner)

田畑

EXCLUDE_COLLECTOR_FILTER_KEY

public static final String EXCLUDE_COLLECTOR_FILTER_KEY

INCLUDE_COLLECTOR_FILTER_KEY

public static final String INCLUDE_COLLECTOR_FILTER_KEY

コレクター側ヘルパー ライブラリのオプション。

NEW_RUN_LISTENER_ORDER_KEY

public static final String NEW_RUN_LISTENER_ORDER_KEY

デバイス側で新しいRunListener順序を有効にするために使用されるインストルメンテーション テスト ランナーの引数。

USE_TEST_STORAGE_SERVICE

public static final String USE_TEST_STORAGE_SERVICE

パブリックコンストラクター

AndroidJUnitTest

public AndroidJUnitTest ()

パブリックメソッド

addAllExcludeAnnotation

public void addAllExcludeAnnotation ( excludeAnnotations)

テストにマークが付いている場合に除外する注釈のERROR(/Set)を追加します。

パラメーター
excludeAnnotations

addAllExcludeFilters

public void addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

パラメーター
filters

addAllIncludeAnnotation

public void addAllIncludeAnnotation ( annotations)

テストにマークが付いている場合に含める注釈のERROR(/Set)を追加します。

パラメーター
annotations

addAllIncludeFilters

public void addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

パラメーター
filters

addExcludeAnnotation

public void addExcludeAnnotation (String excludeAnnotation)

テストにマークが付いている場合に除外する注釈を追加します。

パラメーター
excludeAnnotation String

addExcludeFilter

public void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

パラメーター
filter String

addIncludeAnnotation

public void addIncludeAnnotation (String annotation)

テストにマークが付いている場合に含める注釈を追加します。

パラメーター
annotation String

addIncludeFilter

public void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

パラメーター
filter String

クリア注釈の除外

public void clearExcludeAnnotations ()

現在追跡されているすべての除外注釈を削除します。

クリア除外フィルタ

public void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

アノテーションを含めるクリア

public void clearIncludeAnnotations ()

現在追跡されているすべてのインクルードアノテーションを削除します。

ClearIncludeFilters

public void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

getExcludeAnnotations

public  getExcludeAnnotations ()

除外する注釈の現在のERROR(/Set)を返します。

戻り値

getExcludeFilters

public  getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

戻り値

getExcludeTestFile

public File getExcludeTestFile ()

除外されたテストを含むファイルを返します。

戻り値
File

getIncludeAnnotations

public  getIncludeAnnotations ()

含める注釈の現在のERROR(/Set)を返します。

戻り値

getIncludeFilters

public  getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

戻り値

getIncludeTestFile

public File getIncludeTestFile ()

含まれているテストを含むファイルを返します。

戻り値
File

ランタイムヒントの取得

public long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。この時間は、シャード実行の負荷分散に使用されます。

戻り値
long

isClassOrMethod

public boolean isClassOrMethod (String filter)

文字列がクラスまたはメソッドの名前である場合に返します。

パラメーター
filter String

戻り値
boolean

isParameterizedTest

public boolean isParameterizedTest (String filter)

文字列がパラメータ化されたテストである場合に返します。

パラメーター
filter String

戻り値
boolean

is正規表現

public boolean isRegex (String filter)

文字列がフィルターの正規表現である場合に返します。

パラメーター
filter String

戻り値
boolean

走る

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

パラメーター
testInfo TestInformation : テストを実行するために役立つ情報を含むTestInformationオブジェクト。

listener ITestInvocationListener : テスト結果のITestInvocationListener

投げる
DeviceNotAvailableException

setExcludeTestFile

public void setExcludeTestFile (File testFile)

除外するテストファイルを設定します。 testFile が存在するか、ファイルであるかどうかは保証されません。

パラメーター
testFile File

setIncludeTestFile

public void setIncludeTestFile (File testFile)

インクルードのテストファイルを設定します。 testFile が存在するか、ファイルであるかどうかは保証されません。

パラメーター
testFile File

スプリット

public  split (int shardCount)

実行しようとしている shardCount も提供する、 split()の代替バージョン。これは、独断で決定できない場合があるテスト ランナーにとって便利です。

パラメーター
shardCount int : 試行されたシャード数。

戻り値
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull

保護されたメソッド

setRunnerArgs

protected void setRunnerArgs (IRemoteAndroidTestRunner runner)

パラメーター
runner IRemoteAndroidTestRunner

AndroidJUnitTest

public class AndroidJUnitTest
extends InstrumentationTest implements IRuntimeHintProvider , ITestFileFilterReceiver , ITestFilterReceiver , ITestAnnotationFilterReceiver , IShardableTest

java.lang.オブジェクト
com.android.tradefed.testtype.InstrumentationTest
com.android.tradefed.testtype.AndroidJUnitTest


android.support.test.runner.AndroidJUnitRunner を使用して、指定されたデバイス上でインストルメンテーション テスト パッケージを実行するテスト。

まとめ

田畑

public static final String EXCLUDE_COLLECTOR_FILTER_KEY

public static final String INCLUDE_COLLECTOR_FILTER_KEY

コレクター側ヘルパー ライブラリのオプション。

public static final String NEW_RUN_LISTENER_ORDER_KEY

デバイス側で新しいRunListener順序を有効にするために使用されるインストルメンテーション テスト ランナーの引数。

public static final String USE_TEST_STORAGE_SERVICE

パブリックコンストラクター

AndroidJUnitTest ()

パブリックメソッド

void addAllExcludeAnnotation ( excludeAnnotations) addAllExcludeAnnotation ( excludeAnnotations)

テストにマークが付いている場合に除外する注釈のERROR(/Set)を追加します。

void addAllExcludeFilters ( filters) addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

void addAllIncludeAnnotation ( annotations) addAllIncludeAnnotation ( annotations)

テストにマークが付いている場合に含める注釈のERROR(/Set)を追加します。

void addAllIncludeFilters ( filters) addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

void addExcludeAnnotation (String excludeAnnotation)

テストにマークが付いている場合に除外する注釈を追加します。

void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

void addIncludeAnnotation (String annotation)

テストにマークが付いている場合に含める注釈を追加します。

void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

void clearExcludeAnnotations ()

現在追跡されているすべての除外注釈を削除します。

void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

void clearIncludeAnnotations ()

現在追跡されているすべてのインクルードアノテーションを削除します。

void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

getExcludeAnnotations ()

除外する注釈の現在のERROR(/Set)を返します。

getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

File getExcludeTestFile ()

除外されたテストを含むファイルを返します。

getIncludeAnnotations ()

含める注釈の現在のERROR(/Set)を返します。

getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

File getIncludeTestFile ()

含まれているテストを含むファイルを返します。

long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。

boolean isClassOrMethod (String filter)

文字列がクラスまたはメソッドの名前である場合に返します。

boolean isParameterizedTest (String filter)

文字列がパラメータ化されたテストである場合に返します。

boolean isRegex (String filter)

文字列がフィルターの正規表現である場合に返します。

void run ( TestInformation testInfo, ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

void setExcludeTestFile (File testFile)

除外するテストファイルを設定します。

void setIncludeTestFile (File testFile)

インクルードのテストファイルを設定します。

split (int shardCount)

実行しようとしている shardCount も提供する、 split()の代替バージョン。

保護されたメソッド

void setRunnerArgs (IRemoteAndroidTestRunner runner)

田畑

EXCLUDE_COLLECTOR_FILTER_KEY

public static final String EXCLUDE_COLLECTOR_FILTER_KEY

INCLUDE_COLLECTOR_FILTER_KEY

public static final String INCLUDE_COLLECTOR_FILTER_KEY

コレクター側ヘルパー ライブラリのオプション。

NEW_RUN_LISTENER_ORDER_KEY

public static final String NEW_RUN_LISTENER_ORDER_KEY

デバイス側で新しいRunListener順序を有効にするために使用されるインストルメンテーション テスト ランナーの引数。

USE_TEST_STORAGE_SERVICE

public static final String USE_TEST_STORAGE_SERVICE

パブリックコンストラクター

AndroidJUnitTest

public AndroidJUnitTest ()

パブリックメソッド

addAllExcludeAnnotation

public void addAllExcludeAnnotation ( excludeAnnotations)

テストにマークが付いている場合に除外する注釈のERROR(/Set)を追加します。

パラメーター
excludeAnnotations

addAllExcludeFilters

public void addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

パラメーター
filters

addAllIncludeAnnotation

public void addAllIncludeAnnotation ( annotations)

テストにマークが付いている場合に含める注釈のERROR(/Set)を追加します。

パラメーター
annotations

addAllIncludeFilters

public void addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

パラメーター
filters

addExcludeAnnotation

public void addExcludeAnnotation (String excludeAnnotation)

テストにマークが付いている場合に除外する注釈を追加します。

パラメーター
excludeAnnotation String

addExcludeFilter

public void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

パラメーター
filter String

addIncludeAnnotation

public void addIncludeAnnotation (String annotation)

テストにマークが付いている場合に含める注釈を追加します。

パラメーター
annotation String

addIncludeFilter

public void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

パラメーター
filter String

クリア注釈の除外

public void clearExcludeAnnotations ()

現在追跡されているすべての除外注釈を削除します。

クリア除外フィルター

public void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

アノテーションを含めるクリア

public void clearIncludeAnnotations ()

現在追跡されているすべてのインクルードアノテーションを削除します。

ClearIncludeFilters

public void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

getExcludeAnnotations

public  getExcludeAnnotations ()

除外する注釈の現在のERROR(/Set)を返します。

戻り値

getExcludeFilters

public  getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

戻り値

getExcludeTestFile

public File getExcludeTestFile ()

除外されたテストを含むファイルを返します。

戻り値
File

getIncludeAnnotations

public  getIncludeAnnotations ()

含める注釈の現在のERROR(/Set)を返します。

戻り値

getIncludeFilters

public  getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

戻り値

getIncludeTestFile

public File getIncludeTestFile ()

含まれているテストを含むファイルを返します。

戻り値
File

ランタイムヒントの取得

public long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。この時間は、シャード実行の負荷分散に使用されます。

戻り値
long

isClassOrMethod

public boolean isClassOrMethod (String filter)

文字列がクラスまたはメソッドの名前である場合に返します。

パラメーター
filter String

戻り値
boolean

isParameterizedTest

public boolean isParameterizedTest (String filter)

文字列がパラメータ化されたテストである場合に返します。

パラメーター
filter String

戻り値
boolean

is正規表現

public boolean isRegex (String filter)

文字列がフィルターの正規表現である場合に返します。

パラメーター
filter String

戻り値
boolean

走る

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

パラメーター
testInfo TestInformation : テストを実行するために役立つ情報を含むTestInformationオブジェクト。

listener ITestInvocationListener : テスト結果のITestInvocationListener

投げる
DeviceNotAvailableException

setExcludeTestFile

public void setExcludeTestFile (File testFile)

除外するテストファイルを設定します。 testFile が存在するか、ファイルであるかどうかは保証されません。

パラメーター
testFile File

setIncludeTestFile

public void setIncludeTestFile (File testFile)

インクルードのテストファイルを設定します。 testFile が存在するか、ファイルであるかどうかは保証されません。

パラメーター
testFile File

スプリット

public  split (int shardCount)

実行しようとしている shardCount も提供する、 split()の代替バージョン。これは、独断で決定できない場合があるテスト ランナーにとって便利です。

パラメーター
shardCount int : 試行されたシャード数。

戻り値
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull

保護されたメソッド

setRunnerArgs

protected void setRunnerArgs (IRemoteAndroidTestRunner runner)

パラメーター
runner IRemoteAndroidTestRunner