Zadbaj o dobrą organizację dzięki kolekcji Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.

UiAutomatorRunner

public class UiAutomatorRunner
extends Object implements IRemoteAndroidTestRunner

java.lang.Object
com.android.tradefed.testtype.UiAutomatorRunner


Uruchamia test UI Automator na urządzeniu i raportuje wyniki. Test UI Automator to dedykowany program uruchamiający testy do uruchamiania testów automatyzacji interfejsu użytkownika, który wykorzystuje platformę UI Automator. Program uruchamiający testy na urządzeniu emuluje format wyjściowy testu oprzyrządowania, dzięki czemu można ponownie użyć istniejącego kodu analizy w ddmlib i TF. Zasadniczo jest to opakowanie wokół tego polecenia: adb shell uiautomator runtest (pliki jar) -e class (klasy testowe) ...

Streszczenie

Konstruktorzy publiczni

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

Utwórz UiAutomatorRunner do przeprowadzania testów automatyzacji interfejsu użytkownika

Metody publiczne

void addBooleanArg (String name, boolean value)

void addInstrumentationArg (String name, String value)

void cancel ()

IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType ()
String getPackageName ()

Zwraca nazwę pakietu ostatnio dodanej klasy Java

String getRunnerName ()

Zwraca domyślną nazwę klasy 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)

Ustawia w uiautomatorze opcję ignorowania SIGHUP.

void setLogOnly (boolean logOnly)

void setMaxTimeToOutputResponse (long timeout, TimeUnit unit)

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

Ta metoda jest przestarzała. zamiast tego użyj 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)

Metody chronione

String getRunCommand ()
String getRunnerPath ()

Konstruktorzy publiczni

UiAutomatorRunner

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

Utwórz UiAutomatorRunner do przeprowadzania testów automatyzacji interfejsu użytkownika

Parametry
remoteDevice IDevice : zdalne urządzenie do interakcji: uruchom test, zbierz wyniki itp

jarPaths String : ścieżki do plików jar, w których znajdują się przypadki testowe UI Automator; ścieżki muszą być bezwzględne lub względne do /data/local/tmp/ na urządzeniu

runnerPath String : alternatywny do użycia runner uiautomator, może być null i w tym przypadku zostanie użyty domyślny

Metody publiczne

addBooleanArg

public void addBooleanArg (String name, 
                boolean value)

Parametry
name String

value boolean

addArgOprzyrządowania

public void addInstrumentationArg (String name, 
                String value)

Parametry
name String

value String

anulować

public void cancel ()

get CoverageOutputType

public IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType ()

Zwroty
IRemoteAndroidTestRunner.CoverageOutput

pobierzNazwęPakietu

public String getPackageName ()

Zwraca nazwę pakietu ostatnio dodanej klasy Java

Zwroty
String

getRunnerName

public String getRunnerName ()

Zwraca domyślną nazwę klasy UiAutomatorTestRunner

Zwroty
String

removeInstrumentationArg

public void removeInstrumentationArg (String name)

Parametry
name String

biegać

public void run (ITestRunListener... listeners)

Parametry
listeners ITestRunListener

Rzuty
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

biegać

public void run ( listeners)

Parametry
listeners

Rzuty
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

setAdditionalTestOutputLocation

public void setAdditionalTestOutputLocation (String additionalTestDataPath)

Parametry
additionalTestDataPath String

setNazwaKlasy

public void setClassName (String className)

Parametry
className String

setClassNames

public void setClassNames (String[] classNames)

Parametry
classNames String

ustawPokrycie

public void setCoverage (boolean coverage)

Parametry
coverage boolean

setPokrycieRaportLokalizacja

public void setCoverageReportLocation (String arg0)

Parametry
arg0 String

setDebug

public void setDebug (boolean debug)

Parametry
debug boolean

setIgnoreSighup

public void setIgnoreSighup (boolean value)

Ustawia w uiautomatorze opcję ignorowania SIGHUP.

Parametry
value boolean : zignoruj ​​sygnał, jeśli jest ustawiony na true

setLogOnly

public void setLogOnly (boolean logOnly)

Parametry
logOnly boolean

setMaxTimeToOutputResponse

public void setMaxTimeToOutputResponse (long timeout, 
                TimeUnit unit)

Parametry
timeout long

unit TimeUnit

setMaxTimeout

public void setMaxTimeout (long maxTimeout, 
                TimeUnit unit)

Parametry
maxTimeout long

unit TimeUnit

setMaxtimeToOutputResponse

public void setMaxtimeToOutputResponse (int maxTimeToOutputResponse)

Ta metoda jest przestarzała.
zamiast tego użyj setMaxTimeToOutputResponse(long, TimeUnit) .

Parametry
maxTimeToOutputResponse int

setMethodName

public void setMethodName (String className, 
                String testName)

Parametry
className String

testName String

setRunName

public void setRunName (String runName)

Parametry
runName String

setTestCollection

public void setTestCollection (boolean b)

Parametry
b boolean

setNazwaPakietuTestowego

public void setTestPackageName (String packageName)

Parametry
packageName String

ustawRozmiarTestu

public void setTestSize (IRemoteAndroidTestRunner.TestSize size)

Parametry
size IRemoteAndroidTestRunner.TestSize

Metody chronione

getRunCommand

protected String getRunCommand ()

Zwroty
String

getRunnerPath

protected String getRunnerPath ()

Zwroty
String