UiAutomatorTest
public
class
UiAutomatorTest
extends Object
implements
IDeviceTest,
IRemoteTest,
ITestFilterReceiver
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.UiAutomatorTest |
Podsumowanie
Fieldsem | |
|---|---|
protected
|
mListeners
|
Publiczne konstruktory | |
|---|---|
UiAutomatorTest()
|
|
Metody publiczne | |
|---|---|
void
|
addAllExcludeFilters(
Dodaje |
void
|
addAllIncludeFilters(
Dodaje |
void
|
addClassName(String className)
Dodaj nazwę klasy testowej do uruchomienia. |
void
|
addClassNames(
Dodaj kolekcję nazw klas testowych do uruchomienia. |
void
|
addExcludeFilter(String filter)
Dodaje filtr określający, które testy mają zostać 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 podania podczas uruchamiania testów UI Automator |
void
|
clearExcludeFilters()
Usuń wszystkie obecnie śledzone filtry wykluczeń. |
void
|
clearIncludeFilters()
Usuń wszystkie obecnie śledzone filtry uwzględniania. |
|
getClassNames()
Pobiera listę nazw klas testowych, które mają być uruchamiane przez narzędzie. |
ITestDevice
|
getDevice()
Przygotuj testowane urządzenie. |
|
getExcludeFilters()
Zwraca bieżącą |
|
getIncludeFilters()
Zwraca bieżący |
long
|
getSyncTime()
|
|
getTestJarPaths()
|
|
getTestRunArgMap()
|
IRemoteAndroidTestRunner
|
getTestRunner()
|
boolean
|
isInstrumentationTest()
|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
Przeprowadza testy i przekazuje wyniki odbiorcy. |
void
|
setCaptureLogs(boolean captureLogs)
Ta metoda została wycofana.
zamiast niej używaj zasady Zachowane ze względu na zgodność z cts-tradefed |
void
|
setDevice(ITestDevice device)
Wstrzyknij testowane urządzenie. |
void
|
setLoggingOption(UiAutomatorTest.LoggingOption loggingOption)
|
void
|
setRunName(String runName)
|
void
|
setRunnerName(String runnerName)
|
void
|
setSyncTime(long syncTime)
|
void
|
setTestJarPaths(
|
void
|
setTestRunArgMap(
|
Metody chronione | |
|---|---|
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()
Sprawdza, czy na urządzeniu są dostępne komponenty UI Automator |
Fieldsem
mListeners
protectedmListeners
Publiczne konstruktory
UiAutomatorTest
public UiAutomatorTest ()
Metody publiczne
addAllExcludeFilters
public void addAllExcludeFilters (filters)
Dodaje ERROR(/Set) filtrów, które określają, które testy mają zostać wykluczone.
| Parametry | |
|---|---|
filters |
|
addAllIncludeFilters
public void addAllIncludeFilters (filters)
Dodaje ERROR(/Set) filtrów, które określają, jakie testy mają być uwzględnione.
| Parametry | |
|---|---|
filters |
|
addClassName
public void addClassName (String className)
Dodaj nazwę klasy testowej do uruchomienia.
| Parametry | |
|---|---|
className |
String |
addClassNames
public void addClassNames (classNames)
Dodaj kolekcję nazw klas testowych do uruchomienia.
| Parametry | |
|---|---|
classNames |
|
addExcludeFilter
public void addExcludeFilter (String filter)
Dodaje filtr określający, które testy mają zostać 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 podania podczas uruchamiania testów UI Automator
| Parametry | |
|---|---|
key |
String: nazwa argumentu |
value |
String: wartość argumentu |
clearExcludeFilters
public void clearExcludeFilters ()
Usuń wszystkie obecnie śledzone filtry wykluczeń.
clearIncludeFilters
public void clearIncludeFilters ()
Usuń wszystkie obecnie śledzone filtry uwzględniania.
getClassNames
publicgetClassNames ()
Pobiera listę nazw klas testowych, które mają być uruchamiane przez narzędzie.
| Zwroty | |
|---|---|
|
lista nazw klas testowych, |
getDevice
public ITestDevice getDevice ()
Przygotuj testowane urządzenie.
| Zwroty | |
|---|---|
ITestDevice |
ITestDevice |
getIncludeFilters
publicgetIncludeFilters ()
Zwraca bieżący ERROR(/Set) filtrów uwzględniania.
| Zwroty | |
|---|---|
|
|
getSyncTime
public long getSyncTime ()
| Zwroty | |
|---|---|
long |
czasu przeznaczonego na synchronizację testów. |
getTestJarPaths
publicgetTestJarPaths ()
| Zwroty | |
|---|---|
|
ścieżkę do pliku JAR testu. |
getTestRunArgMap
publicgetTestRunArgMap ()
| Zwroty | |
|---|---|
|
mapa argumentów do przekazania do UiAutomatorRunner. |
getTestRunner
public IRemoteAndroidTestRunner getTestRunner ()
| Zwroty | |
|---|---|
IRemoteAndroidTestRunner |
uruchamiający testy, |
isInstrumentationTest
public boolean isInstrumentationTest ()
| Zwroty | |
|---|---|
boolean |
|
home run
public void run (TestInformation testInfo, ITestInvocationListener listener)
Przeprowadza testy i przekazuje wyniki odbiorcy.
| Parametry | |
|---|---|
testInfo |
TestInformation: Obiekt TestInformation zawierający przydatne informacje do przeprowadzania testów. |
listener |
ITestInvocationListener: ITestInvocationListener wyników testu |
| Zgłasza | |
|---|---|
DeviceNotAvailableException |
|
setCaptureLogs
public void setCaptureLogs (boolean captureLogs)
Ta metoda została wycofana.
Użyj w zamian zasady setLoggingOption(com.android.tradefed.testtype.UiAutomatorTest.LoggingOption).
Zachowane ze względu na zgodność z cts-tradefed
| Parametry | |
|---|---|
captureLogs |
boolean |
setDevice
public void setDevice (ITestDevice device)
Wstrzyknij testowane urządzenie.
| Parametry | |
|---|---|
device |
ITestDevice: ITestDevice, którego chcesz użyć |
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 testowych. |
setTestJarPaths
public void setTestJarPaths (jarPaths)
| Parametry | |
|---|---|
jarPaths |
: lokalizacje testowych plików JAR. |
setTestRunArgMap
public void setTestRunArgMap (runArgMap)
| Parametry | |
|---|---|
runArgMap |
: argumenty do przekazania do UiAutomatorRunner. |
Metody chronione
createTestRunner
protected IRemoteAndroidTestRunner createTestRunner ()
| Zwroty | |
|---|---|
IRemoteAndroidTestRunner |
|
| Zgłasza | |
|---|---|
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 ()
Sprawdza, czy na urządzeniu są komponenty UI Automatora
| Zgłasza | |
|---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
|