Uiオートメーターランナー

public class UiAutomatorRunner
extends Object implements IRemoteAndroidTestRunner

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


デバイス上で UI Automator テストを実行し、結果をレポートします。 UI Automator テストは、UI Automator フレームワークを利用した UI 自動化テストを実行するための専用のテスト ランナーです。デバイス上のテスト ランナーは、インスツルメンテーション テストの出力形式をエミュレートするため、ddmlib および TF の既存の解析コードを再利用できます。基本的に、これはこのコマンドのラッパーです: adb shell uiauTomator runtest (jar ファイル) -e class (テスト クラス) ...

まとめ

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

UiAutomatorRunner (IDevice remoteDevice, String[] jarPaths, String runnerPath)

UI オートメーション テストを実行するための UiAutomatorRunner を作成する

パブリックメソッド

void addBooleanArg (String name, boolean value)

void addInstrumentationArg (String name, String value)

void cancel ()

IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType ()
String getPackageName ()

最後に追加された Java クラスのパッケージ名を返します。

String getRunnerName ()

デフォルトの UiAutomatorTestRunner クラス名を返します

void removeInstrumentationArg (String name)

void run (ITestRunListener... listeners)

void run ( listeners) run ( listeners)

void setAdditionalTestOutputLocation (String additionalTestDataPath)
void setClassName (String className)

void setClassNames (String[] classNames)

void setCoverage (boolean coverage)

void setCoverageReportLocation (String arg0)
void setDebug (boolean debug)

void setIgnoreSighup (boolean value)

SIGHUP を無視するように uiautomator のオプションを設定します。

void setLogOnly (boolean logOnly)

void setMaxTimeToOutputResponse (long timeout, TimeUnit unit)

void setMaxTimeout (long maxTimeout, TimeUnit unit)
void setMaxtimeToOutputResponse (int maxTimeToOutputResponse)

このメソッドは廃止されました。代わりにsetMaxTimeToOutputResponse(long, TimeUnit)を使用してください。

void setMethodName (String className, String testName)

void setRunName (String runName)

void setTestCollection (boolean b)
void setTestPackageName (String packageName)

void setTestSize (IRemoteAndroidTestRunner.TestSize size)

保護されたメソッド

String getRunCommand ()
String getRunnerPath ()

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

Uiオートメーターランナー

public UiAutomatorRunner (IDevice remoteDevice, 
                String[] jarPaths, 
                String runnerPath)

UI オートメーション テストを実行するための UiAutomatorRunner を作成する

パラメーター
remoteDevice IDevice : 対話するリモート デバイス: テストの実行、結果の収集など

jarPaths String : UI Automator テスト ケースが存在する jar ファイルへのパス。パスは絶対パスまたはデバイス上の /data/local/tmp/ に対する相対パスである必要があります

runnerPath String : 使用する代替の uiautomator ランナーnullの場合もあり、この場合はデフォルトが使用されます。

パブリックメソッド

addBooleanArg

public void addBooleanArg (String name, 
                boolean value)

パラメーター
name String

value boolean

addInstrumentationArg

public void addInstrumentationArg (String name, 
                String value)

パラメーター
name String

value String

キャンセル

public void cancel ()

getCoverageOutputType

public IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType ()

戻り値
IRemoteAndroidTestRunner.CoverageOutput

getパッケージ名

public String getPackageName ()

最後に追加された Java クラスのパッケージ名を返します。

戻り値
String

getRunnerName

public String getRunnerName ()

デフォルトの UiAutomatorTestRunner クラス名を返します

戻り値
String

削除InstrumentationArg

public void removeInstrumentationArg (String name)

パラメーター
name String

走る

public void run (ITestRunListener... listeners)

パラメーター
listeners ITestRunListener

投げる
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

走る

public void run ( listeners)

パラメーター
listeners

投げる
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

setAdditionalTestOutputLocation

public void setAdditionalTestOutputLocation (String additionalTestDataPath)

パラメーター
additionalTestDataPath String

セットクラス名

public void setClassName (String className)

パラメーター
className String

setClassNames

public void setClassNames (String[] classNames)

パラメーター
classNames String

セットカバレッジ

public void setCoverage (boolean coverage)

パラメーター
coverage boolean

setCoverageReportLocation

public void setCoverageReportLocation (String arg0)

パラメーター
arg0 String

セットデバッグ

public void setDebug (boolean debug)

パラメーター
debug boolean

セット無視ため息をつきます

public void setIgnoreSighup (boolean value)

SIGHUP を無視するように uiautomator のオプションを設定します。

パラメーター
value boolean : true に設定されている場合はシグナルを無視します。

setLogOnly

public void setLogOnly (boolean logOnly)

パラメーター
logOnly boolean

setMaxTimeToOutputResponse

public void setMaxTimeToOutputResponse (long timeout, 
                TimeUnit unit)

パラメーター
timeout long

unit TimeUnit

setMaxTimeout

public void setMaxTimeout (long maxTimeout, 
                TimeUnit unit)

パラメーター
maxTimeout long

unit TimeUnit

setMaxtimeToOutputResponse

public void setMaxtimeToOutputResponse (int maxTimeToOutputResponse)

このメソッドは廃止されました。
代わりにsetMaxTimeToOutputResponse(long, TimeUnit)を使用してください。

パラメーター
maxTimeToOutputResponse int

setMethodName

public void setMethodName (String className, 
                String testName)

パラメーター
className String

testName String

setRunName

public void setRunName (String runName)

パラメーター
runName String

セットテストコレクション

public void setTestCollection (boolean b)

パラメーター
b boolean

setTestPackageName

public void setTestPackageName (String packageName)

パラメーター
packageName String

setTestSize

public void setTestSize (IRemoteAndroidTestRunner.TestSize size)

パラメーター
size IRemoteAndroidTestRunner.TestSize

保護されたメソッド

getRunコマンド

protected String getRunCommand ()

戻り値
String

getRunnerPath

protected String getRunnerPath ()

戻り値
String