UiAutomatorTest
public
class
UiAutomatorTest
extends Object
implements
IDeviceTest,
IRemoteTest,
ITestFilterReceiver
java.lang.Object | |
↳ | com.android.tradefed.testtype.UiAutomatorTest |
Podsumowanie
Fieldsem | |
---|---|
protected
|
mListeners
|
Konstruktory publiczne | |
---|---|
UiAutomatorTest()
|
Metody publiczne | |
---|---|
void
|
addAllExcludeFilters(
Dodaje |
void
|
addAllIncludeFilters(
Dodaje |
void
|
addClassName(String className)
Dodaj nazwę klasy testu do uruchomienia. |
void
|
addClassNames(
Dodaj kolekcję nazw zajęć testowych do uruchomienia. |
void
|
addExcludeFilter(String filter)
Dodaje filtr, który określa, które testy mają być wykluczone. |
void
|
addIncludeFilter(String filter)
Dodaje filtr określający, które testy mają być uwzględnione. |
void
|
addRunArg(String key, String value)
Dodawanie argumentu do uruchamiania testów UI Automator |
void
|
clearExcludeFilters()
usunąć wszystkie filtry wykluczeń, które są obecnie śledzone; |
void
|
clearIncludeFilters()
Usuń wszystkie filtry uwzględniania, które są obecnie śledzone. |
|
getClassNames()
Pobiera listę nazw klas testów, które są skonfigurowane do uruchamiania. |
ITestDevice
|
getDevice()
Przygotuj urządzenie do testowania. |
|
getExcludeFilters()
Zwraca bieżącą |
|
getIncludeFilters()
Zwraca bieżącą wartość |
long
|
getSyncTime()
|
|
getTestJarPaths()
|
|
getTestRunArgMap()
|
IRemoteAndroidTestRunner
|
getTestRunner()
|
boolean
|
isInstrumentationTest()
|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
Przeprowadza testy i przekazuje wyniki do odbiorcy. |
void
|
setCaptureLogs(boolean captureLogs)
Ta metoda została wycofana.
użyj w zastępstwie Zachowano ze względu na zgodność z cts-tradefed |
void
|
setDevice(ITestDevice device)
Wstrzyknij urządzenie testowe. |
void
|
setLoggingOption(UiAutomatorTest.LoggingOption loggingOption)
|
void
|
setRunName(String runName)
|
void
|
setRunnerName(String runnerName)
|
void
|
setSyncTime(long syncTime)
|
void
|
setTestJarPaths(
|
void
|
setTestRunArgMap(
|
Chronione metody | |
---|---|
IRemoteAndroidTestRunner
|
createTestRunner()
|
IRunUtil
|
getRunUtil()
|
void
|
onScreenshotAndBugreport(ITestDevice device, ITestInvocationListener listener, String prefix, UiAutomatorTest.TestFailureAction overrideAction)
|
void
|
onScreenshotAndBugreport(ITestDevice device, ITestInvocationListener listener, String prefix)
|
void
|
preTestSetup()
Sprawdzanie, czy na urządzeniu są komponenty UI Automator |
Fieldsem
mListeners
protectedmListeners
Konstruktory publiczne
UiAutomatorTest
public UiAutomatorTest ()
Metody publiczne
addAllExcludeFilters
public void addAllExcludeFilters (filters)
Dodaje ERROR(/Set)
filtrów, które testy mają być wykluczone.
Parametry | |
---|---|
filters |
|
addAllIncludeFilters
public void addAllIncludeFilters (filters)
Dodaje ERROR(/Set)
filtrów, których testy mają być uwzględnione.
Parametry | |
---|---|
filters |
|
addClassName
public void addClassName (String className)
Dodaj nazwę klasy testu do uruchomienia.
Parametry | |
---|---|
className |
String |
addClassNames
public void addClassNames (classNames)
Dodaj kolekcję nazw zajęć testowych do uruchomienia.
Parametry | |
---|---|
classNames |
|
addExcludeFilter
public void addExcludeFilter (String filter)
Dodaje filtr, który określa, które testy mają być wykluczone.
Parametry | |
---|---|
filter |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
Dodaje filtr określający, które testy mają być uwzględnione.
Parametry | |
---|---|
filter |
String |
addRunArg
public void addRunArg (String key, String value)
Dodawanie argumentu do uruchamiania testów UI Automator
Parametry | |
---|---|
key |
String : nazwa argumentu |
value |
String : wartość argumentu |
clearExcludeFilters
public void clearExcludeFilters ()
usunąć wszystkie filtry wykluczeń, które są obecnie śledzone;
clearIncludeFilters
public void clearIncludeFilters ()
Usuń wszystkie filtry uwzględniania, które są obecnie śledzone.
getClassNames
publicgetClassNames ()
Pobiera listę nazw klas testów, które są skonfigurowane do uruchamiania.
Zwroty | |
---|---|
|
lista nazw klas testów, |
getDevice
public ITestDevice getDevice ()
Przygotuj urządzenie do testowania.
Zwroty | |
---|---|
ITestDevice |
ITestDevice |
getIncludeFilters
publicgetIncludeFilters ()
Zwraca bieżącą wartość ERROR(/Set)
filtrów uwzględniania.
Zwroty | |
---|---|
|
getSyncTime
public long getSyncTime ()
Zwroty | |
---|---|
long |
czas przeznaczony na synchronizację testów. |
getTestJarPaths
publicgetTestJarPaths ()
Zwroty | |
---|---|
|
ścieżka pliku jar testu. |
getTestRunArgMap
publicgetTestRunArgMap ()
Zwroty | |
---|---|
|
mapę argumentów do przekazania do UiAutomatorRunner. |
getTestRunner
public IRemoteAndroidTestRunner getTestRunner ()
Zwroty | |
---|---|
IRemoteAndroidTestRunner |
Uruchamiający test. |
isInstrumentationTest
public boolean isInstrumentationTest ()
Zwroty | |
---|---|
boolean |
home run
public void run (TestInformation testInfo, ITestInvocationListener listener)
Przeprowadza testy i przekazuje wyniki do odbiorcy.
Parametry | |
---|---|
testInfo |
TestInformation : obiekt TestInformation zawierający przydatne informacje do przeprowadzania testów. |
listener |
ITestInvocationListener : ITestInvocationListener wyników testu |
Rzuty | |
---|---|
DeviceNotAvailableException |
setCaptureLogs
public void setCaptureLogs (boolean captureLogs)
Ta metoda została wycofana.
Zamiast niej użyj interfejsu setLoggingOption(com.android.tradefed.testtype.UiAutomatorTest.LoggingOption)
.
Zachowano ze względu na zgodność z cts-tradefed
Parametry | |
---|---|
captureLogs |
boolean |
setDevice
public void setDevice (ITestDevice device)
Wstrzyknij urządzenie testowe.
Parametry | |
---|---|
device |
ITestDevice : ITestDevice do użycia |
setLoggingOption
public void setLoggingOption (UiAutomatorTest.LoggingOption loggingOption)
Parametry | |
---|---|
loggingOption |
UiAutomatorTest.LoggingOption |
setRunName
public void setRunName (String runName)
Parametry | |
---|---|
runName |
String |
setRunnerName
public void setRunnerName (String runnerName)
Parametry | |
---|---|
runnerName |
String |
setSyncTime
public void setSyncTime (long syncTime)
Parametry | |
---|---|
syncTime |
long : czas synchronizacji plików testów. |
setTestJarPaths
public void setTestJarPaths (jarPaths)
Parametry | |
---|---|
jarPaths |
: lokalizacje plików jar testowych. |
setTestRunArgMap
public void setTestRunArgMap (runArgMap)
Parametry | |
---|---|
runArgMap |
: argumenty przekazywane do UiAutomatorRunner. |
Chronione metody
createTestRunner
protected IRemoteAndroidTestRunner createTestRunner ()
Zwroty | |
---|---|
IRemoteAndroidTestRunner |
Rzuty | |
---|---|
DeviceNotAvailableException |
onScreenshotAndBugreport
protected void onScreenshotAndBugreport (ITestDevice device, ITestInvocationListener listener, String prefix, UiAutomatorTest.TestFailureAction overrideAction)
Parametry | |
---|---|
device |
ITestDevice |
listener |
ITestInvocationListener |
prefix |
String |
overrideAction |
UiAutomatorTest.TestFailureAction |
onScreenshotAndBugreport
protected void onScreenshotAndBugreport (ITestDevice device, ITestInvocationListener listener, String prefix)
Parametry | |
---|---|
device |
ITestDevice |
listener |
ITestInvocationListener |
prefix |
String |
preTestSetup
protected void preTestSetup ()
Sprawdzanie, czy na urządzeniu są komponenty UI Automator
Rzuty | |
---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |