RunOnSecondaryUserTargetPreparer

public class RunOnSecondaryUserTargetPreparer
extends BaseTargetPreparer

Obiekt Java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.RunOnSecondaryUserTargetPreparer


ITargetPreparer , który tworzy dodatkowego użytkownika podczas instalacji i zaznacza, że ​​testy powinny zostać uruchomione w tym użytkowniku.

Podczas rozłączania użytkownik dodatkowy jest usuwany.

Jeśli dodatkowy użytkownik już istnieje, zostanie on wykorzystany zamiast tworzyć nowego i nie zostanie usunięty podczas demontażu.

Jeśli urządzenie nie ma możliwości utworzenia nowego użytkownika, gdy jest to wymagane, ustawiony zostanie argument instrumentacji pomiń-testy-powód, a użytkownik nie zostanie zmieniony. Testy uruchomione na urządzeniu mogą odczytać ten argument, aby odpowiedzieć na ten stan.

Streszczenie

Konstruktorzy publiczni

RunOnSecondaryUserTargetPreparer ()

Metody publiczne

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

Metody chronione

boolean canCreateAdditionalUsers ( ITestDevice device, int numberOfUsers)

Sprawdza, czy możliwe jest utworzenie żądanej liczby użytkowników.

Konstruktorzy publiczni

RunOnSecondaryUserTargetPreparer

public RunOnSecondaryUserTargetPreparer ()

Metody publiczne

organizować coś

public void setUp (TestInformation testInfo)

Parametry
testInfo TestInformation

Rzuca
DeviceNotAvailableException
TargetSetupError

zburzyć

public void tearDown (TestInformation testInfo, 
                Throwable e)

Parametry
testInfo TestInformation

e Throwable

Rzuca
DeviceNotAvailableException

Metody chronione

canCreateAdditionalUsers

protected boolean canCreateAdditionalUsers (ITestDevice device, 
                int numberOfUsers)

Sprawdza, czy możliwe jest utworzenie żądanej liczby użytkowników.

Parametry
device ITestDevice

numberOfUsers int

Zwroty
boolean

Rzuca
DeviceNotAvailableException