MoblyBinaryHostTest

public class MoblyBinaryHostTest
extends Object implements IBuildReceiver, IDeviceTest, IRemoteTest, IShardableTest, ITestFilterReceiver

java.lang.Object
   ↳ com.android.tradefed.testtype.mobly.MoblyBinaryHostTest


Test hosta przeznaczony do uruchamiania pliku binarnego w Pythonie w systemie kompilacji Androida (Soong).

Podsumowanie

Konstruktory publiczne

MoblyBinaryHostTest()

Metody publiczne

void addAllExcludeFilters(Set<String> filters)

Dodaje Set filtrów określających, które testy mają zostać wykluczone.

void addAllIncludeFilters(Set<String> filters)

Dodaje Set filtrów, które określają, jakie testy mają być uwzględnione.

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 clearExcludeFilters()

Usuń wszystkie obecnie śledzone filtry wykluczeń.

void clearIncludeFilters()

Usuń wszystkie obecnie śledzone filtry uwzględniania.

ITestDevice getDevice()

Przygotuj urządzenie testowe.

Set<String> getExcludeFilters()

Zwraca bieżącą Set filtrów wykluczeń.

Set<String> getIncludeFilters()

Zwraca bieżącą Set filtrów uwzględniania.

final void run(TestInformation testInfo, ITestInvocationListener listener)

Przeprowadza testy i przekazuje wyniki odbiorcy.

void setBuild(IBuildInfo buildInfo)
void setDevice(ITestDevice device)

Wstrzyknij testowane urządzenie.

Collection<IRemoteTest> split(int shardCountHint)

Alternatywna wersja split(), która podaje też liczbę fragmentów, które mają zostać uruchomione.

Metody chronione

String[] buildCommandLineArray(String filePath, String configPath, List<String> tests)
String[] buildCommandLineArray(String filePath, String configPath)
String[] buildCommandLineForListTests(String filePath)
Optional<Pair<List<String>, List<String>>> filterTests(String[] testListLines, String runName, ITestInvocationListener listener)
MoblyArtifactReporter getArtifactReporter()
String getLogDirAbsolutePath()
File getLogDirFile()
boolean processYamlTestResults(InputStream inputStream, MoblyYamlResultParser parser, ITestInvocationListener listener, String runName)

Analizuje wyniki testów Mobly i tworzy raporty z wynikami.

void updateConfigFile(InputStream configInputStream, Writer writer)

Konstruktory publiczne

MoblyBinaryHostTest

public MoblyBinaryHostTest ()

Metody publiczne

addAllExcludeFilters

public void addAllExcludeFilters (Set<String> filters)

Dodaje Set filtrów określających, które testy mają zostać wykluczone.

Parametry
filters Set

addAllIncludeFilters

public void addAllIncludeFilters (Set<String> filters)

Dodaje Set filtrów, które określają, jakie testy mają być uwzględnione.

Parametry
filters Set

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

clearExcludeFilters

public void clearExcludeFilters ()

Usuń wszystkie obecnie śledzone filtry wykluczeń.

clearIncludeFilters

public void clearIncludeFilters ()

Usuń wszystkie obecnie śledzone filtry uwzględniania.

getDevice

public ITestDevice getDevice ()

Przygotuj urządzenie testowe.

Zwraca
ITestDevice ITestDevice

getExcludeFilters

public Set<String> getExcludeFilters ()

Zwraca bieżącą Set filtrów wykluczeń.

Zwraca
Set<String>

getIncludeFilters

public Set<String> getIncludeFilters ()

Zwraca bieżącą Set filtrów uwzględniania.

Zwraca
Set<String>

home run

public final 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

setBuild

public void setBuild (IBuildInfo buildInfo)

Parametry
buildInfo IBuildInfo

setDevice

public void setDevice (ITestDevice device)

Wstrzyknij testowane urządzenie.

Parametry
device ITestDevice: ITestDevice, którego chcesz użyć.

podziel

public Collection<IRemoteTest> split (int shardCountHint)

Alternatywna wersja split(), która podaje też liczbę fragmentów, które mają zostać uruchomione. Jest to przydatne w przypadku niektórych programów do uruchamiania testów, które nie mogą czasami podejmować arbitralnych decyzji.

Parametry
shardCountHint int: liczba fragmentów, których utworzenie zostało podjęte.

Zwraca
Collection<IRemoteTest> zbiór podtestów do wykonania osobno lub null, jeśli test nie jest obecnie podzielony na części.

Metody chronione

buildCommandLineArray

protected String[] buildCommandLineArray (String filePath, 
                String configPath, 
                List<String> tests)

Parametry
filePath String

configPath String

tests List

Zwraca
String[]

buildCommandLineArray

protected String[] buildCommandLineArray (String filePath, 
                String configPath)

Parametry
filePath String

configPath String

Zwraca
String[]

buildCommandLineForListTests

protected String[] buildCommandLineForListTests (String filePath)

Parametry
filePath String

Zwraca
String[]

filterTests

protected Optional<Pair<List<String>, List<String>>> filterTests (String[] testListLines, 
                String runName, 
                ITestInvocationListener listener)

Parametry
testListLines String

runName String

listener ITestInvocationListener

Zwraca
Optional<Pair<List<String>, List<String>>>

getArtifactReporter

protected MoblyArtifactReporter getArtifactReporter ()

Zwraca
MoblyArtifactReporter

getLogDirAbsolutePath

protected String getLogDirAbsolutePath ()

Zwraca
String

getLogDirFile

protected File getLogDirFile ()

Zwraca
File

processYamlTestResults

protected boolean processYamlTestResults (InputStream inputStream, 
                MoblyYamlResultParser parser, 
                ITestInvocationListener listener, 
                String runName)

Analizuje wyniki testów Mobly i tworzy raporty z wynikami.

Parametry
inputStream InputStream: obiekt InputStream odczytujący plik wyników testu Mobly.

parser MoblyYamlResultParser: obiekt MoblyYamlResultParser, który przetwarza wyniki testów Mobly.

listener ITestInvocationListener: instancja ITestInvocationListener, która generuje różne raporty.

runName String: str, nazwa uruchomienia binarnego testu Mobly.

Zwraca
boolean

updateConfigFile

protected void updateConfigFile (InputStream configInputStream, 
                Writer writer)

Parametry
configInputStream InputStream

writer Writer

Zgłasza
HarnessRuntimeException