RunOnSecondaryUserTargetPreparer

public class RunOnSecondaryUserTargetPreparer
extends BaseTargetPreparer implements IConfigurationReceiver

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.RunOnSecondaryUserTargetPreparer


ITargetPreparer, który tworzy w ramach konfiguracji dodatkowego użytkownika i oznacza, że testy powinny być uruchamiane na tym użytkowniku.

W procesie demontażu użytkownik dodatkowy zostaje usunięty.

Jeśli użytkownik dodatkowy już istnieje, zostanie użyty zamiast utworzyć nowego. Nie zostanie usunięty podczas rozwiązywania.

Jeśli urządzenie nie ma możliwości utworzenia nowego użytkownika, gdy jest to wymagane, zostanie ustawiony argument pomijania testów skip-tests-reason, a użytkownik nie zostanie zmieniony. Testy działające na urządzeniu mogą odczytać ten argument, aby zareagować na ten stan.

Podsumowanie

Konstruktory publiczne

RunOnSecondaryUserTargetPreparer()

Metody publiczne

void setConfiguration(IConfiguration configuration)

Wstrzykuje IConfiguration w użyciu.

void setUp(TestInformation testInfo)
void tearDown(TestInformation testInfo, Throwable e)

Chronione metody

boolean canCreateAdditionalUsers(ITestDevice device, int numberOfUsers)

Sprawdzanie, czy można utworzyć żądaną liczbę użytkowników.

Konstruktory publiczne

RunOnSecondaryUserTargetPreparer

public RunOnSecondaryUserTargetPreparer ()

Metody publiczne

setConfiguration

public void setConfiguration (IConfiguration configuration)

Wstrzykuje IConfiguration w użyciu.

Parametry
configuration IConfiguration

setUp

public void setUp (TestInformation testInfo)

Parametry
testInfo TestInformation

Rzuty
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Parametry
testInfo TestInformation

e Throwable

Rzuty
DeviceNotAvailableException

Chronione metody

canCreateAdditionalUsers

protected boolean canCreateAdditionalUsers (ITestDevice device, 
                int numberOfUsers)

Sprawdzanie, czy można utworzyć żądaną liczbę użytkowników.

Parametry
device ITestDevice

numberOfUsers int

Zwroty
boolean

Rzuty
DeviceNotAvailableException