RemoteAndroidTestRunner

public class RemoteAndroidTestRunner
extends Object implements IRemoteAndroidTestRunner

java.lang.Object
com.android.tradefed.result.ddmlib.RemoteAndroidTestRunner


Zdalne uruchamianie polecenia testu Androida i zgłaszanie wyników.

Podsumowanie

Konstruktory publiczne

RemoteAndroidTestRunner(String packageName, IShellEnabledDevice remoteDevice)

Alternatywny konstruktor.

RemoteAndroidTestRunner(String packageName, String runnerName, IShellEnabledDevice remoteDevice)

Alternatywny konstruktor.

RemoteAndroidTestRunner(String packageName, String runnerName, IShellEnabledDevice remoteDevice, RemoteAndroidTestRunner.StatusReporterMode statusReporterMode)

Tworzy zdalnego uruchamianie testów na urządzeniach z Androidem.

Metody publiczne

void addBooleanArg(String name, boolean value)
void addInstrumentationArg(String name, String value)
void cancel()
IInstrumentationResultParser createParser(String runName, listeners)

Utwórz InstrumentationResultParser, który będzie używany do analizowania danych z instrumentacji.

String getAmInstrumentCommand()
IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType()
String getPackageName()
String getRunOptions()

Zwraca opcje polecenia instrumentu am.

String getRunnerName()
void removeInstrumentationArg(String name)
void run(ITestRunListener... listeners)
void run( listeners)
void setAdditionalTestOutputLocation(String additionalTestDataPath)
void setClassName(String className)
void setClassNames(String[] classNames)
void setCoverage(boolean coverage)
void setCoverageReportLocation(String reportPath)
void setDebug(boolean debug)
void setLogOnly(boolean logOnly)
void setMaxTimeToOutputResponse(long maxTimeToOutputResponse, TimeUnit maxTimeUnits)
void setMaxTimeout(long maxTimeout, TimeUnit maxTimeUnits)
void setMaxtimeToOutputResponse(int maxTimeToOutputResponse)
void setMethodName(String className, String testName)
void setRunName(String runName)
void setRunOptions(String options)

Ustawia opcje polecenia am instrument.

void setTestCollection(boolean collect)
void setTestPackageName(String packageName)
void setTestSize(IRemoteAndroidTestRunner.TestSize size)

Chronione metody

String getArgsCommand()

Zwraca pełną składnię wiersza poleceń instrumentacji dla podanych argumentów instrumentacji.

String getRunnerPath()

Zwraca pełną ścieżkę komponentu instrumentacji.

Konstruktory publiczne

Zdalny AndroidTestRunner

public RemoteAndroidTestRunner (String packageName, 
                IShellEnabledDevice remoteDevice)

Alternatywny konstruktor. Korzysta z domyślnego uruchomienia instrumentacji.

Parametry
packageName String: pakiet aplikacji na Androida zawierający testy do wykonania

remoteDevice IShellEnabledDevice: urządzenie z Androidem, na którym będą wykonywane testy.

Zdalny AndroidTestRunner

public RemoteAndroidTestRunner (String packageName, 
                String runnerName, 
                IShellEnabledDevice remoteDevice)

Alternatywny konstruktor. Używa wartości domyślnej: statusReporterMode.

Parametry
packageName String: pakiet aplikacji na Androida zawierający testy do wykonania

runnerName String: narzędzie do wykonywania testów z instrumentacją. Jeśli jest równa null, używany jest domyślny runner

remoteDevice IShellEnabledDevice: urządzenie z Androidem, na którym będą wykonywane testy.

Zdalny AndroidTestRunner

public RemoteAndroidTestRunner (String packageName, 
                String runnerName, 
                IShellEnabledDevice remoteDevice, 
                RemoteAndroidTestRunner.StatusReporterMode statusReporterMode)

Tworzy zdalnego wykonawcę testów na Androida.

Parametry
packageName String: pakiet aplikacji na Androida zawierający testy do wykonania

runnerName String: narzędzie do wykonywania testów z instrumentacją. Jeśli jest równa null, używany jest domyślny runner

remoteDevice IShellEnabledDevice: urządzenie z Androidem, na którym mają być wykonywane testy

statusReporterMode RemoteAndroidTestRunner.StatusReporterMode: tryb raportowania stanu używany w przypadku polecenia am instrument

Metody publiczne

addBooleanArg

public void addBooleanArg (String name, 
                boolean value)

Parametry
name String

value boolean

Parametr dodawania instrumentacji

public void addInstrumentationArg (String name, 
                String value)

Parametry
name String

value String

anuluj

public void cancel ()

createParser

public IInstrumentationResultParser createParser (String runName, 
                 listeners)

Utwórz obiekt InstrumentationResultParser, który posłuży do analizy instrumentacji dane wyjściowe.

Parametry
runName String: nazwa uruchomienia, które ma zostać użyte.

listeners : detektory, które mają raportować wyniki.

Zwroty
IInstrumentationResultParser Wystąpienie InstrumentationResultParser.

getAmInstrumentCommand

public String getAmInstrumentCommand ()

Zwroty
String

getZakres wyjściowy

public IRemoteAndroidTestRunner.CoverageOutput getCoverageOutputType ()

Zwroty
IRemoteAndroidTestRunner.CoverageOutput

getPackageName

public String getPackageName ()

Zwroty
String

getRunOptions

public String getRunOptions ()

Zwraca opcje polecenia instrumentu am.

Zwroty
String

getRunnerName

public String getRunnerName ()

Zwroty
String

removeInstrumentationArg

public void removeInstrumentationArg (String name)

Parametry
name String

home run

public void run (ITestRunListener... listeners)

Parametry
listeners ITestRunListener

Rzuty
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

home run

public void run ( listeners)

Parametry
listeners

Rzuty
AdbCommandRejectedException
ShellCommandUnresponsiveException
TimeoutException

ustaw dodatkową lokalizację Wyjściową-Testu

public void setAdditionalTestOutputLocation (String additionalTestDataPath)

Parametry
additionalTestDataPath String

nazwaklasy

public void setClassName (String className)

Parametry
className String

setClassNames

public void setClassNames (String[] classNames)

Parametry
classNames String

setCoverage

public void setCoverage (boolean coverage)

Parametry
coverage boolean

setCoverageReportLocation

public void setCoverageReportLocation (String reportPath)

Parametry
reportPath String

setDebug

public void setDebug (boolean debug)

Parametry
debug boolean

setLogOnly

public void setLogOnly (boolean logOnly)

Parametry
logOnly boolean

setMaxTimeToOutputResponse (UstawMaxTimeToOutputResponse)

public void setMaxTimeToOutputResponse (long maxTimeToOutputResponse, 
                TimeUnit maxTimeUnits)

Parametry
maxTimeToOutputResponse long

maxTimeUnits TimeUnit

setMaxTimeout

public void setMaxTimeout (long maxTimeout, 
                TimeUnit maxTimeUnits)

Parametry
maxTimeout long

maxTimeUnits TimeUnit

setMaxtimeToOutputResponse

public void setMaxtimeToOutputResponse (int maxTimeToOutputResponse)

Parametry
maxTimeToOutputResponse int

Nazwa_metody setMethod

public void setMethodName (String className, 
                String testName)

Parametry
className String

testName String

setRunName

public void setRunName (String runName)

Parametry
runName String

setRunOptions

public void setRunOptions (String options)

Ustawia opcje polecenia instrumentu am. Pełna lista opcji znajduje się w pliku com/android/commands/am/Am.java.

Parametry
options String

zbiórTestów

public void setTestCollection (boolean collect)

Parametry
collect boolean

setTestNameName

public void setTestPackageName (String packageName)

Parametry
packageName String

setTestSize

public void setTestSize (IRemoteAndroidTestRunner.TestSize size)

Parametry
size IRemoteAndroidTestRunner.TestSize

Metody chronione

getArgsCommand

protected String getArgsCommand ()

Zwraca pełną składnię wiersza poleceń instrumentacji dla podanej instrumentacji . Zwraca pusty ciąg, jeśli nie podano żadnych argumentów.

Zwroty
String

getRunnerPath

protected String getRunnerPath ()

Zwraca pełną ścieżkę komponentu pomiarowego.

Zwroty
String