DeviceTestRunOptions

public class DeviceTestRunOptions
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.junit4.DeviceTestRunOptions


BaseHostJUnit4Test aracılığıyla cihaz testleri çalıştırmayla ilgili seçenekler için bir oluşturucu sınıfı.

Özet

Herkese açık oluşturucular

DeviceTestRunOptions(String packageName)

Herkese açık yöntemler

DeviceTestRunOptions addExtraListener(ITestLifeCycleReceiver listener)

Çalıştırılan enstrümantasyona ek bir dinleyici ekleyin.

DeviceTestRunOptions addInstrumentationArg(String key, String value)

Enstrümantasyona iletilecek bir bağımsız değişken ekleyin.

void clearExtraListeners()
void clearInstrumentationArgs()

Daha önce addInstrumentationArg(String,String) ile ayarlanmış tüm enstrümantasyon bağımsız değişkenlerini temizleyin.

String getApkFileName()

APK yüklemesi için APK dosyasının adını döndürür.

ITestDevice getDevice()
List<ITestLifeCycleReceiver> getExtraListeners()
String[] getInstallArgs()

Yükleme komutunun ek seçeneklerini döndürür.

Map<String, String> getInstrumentationArgs()
Long getMaxInstrumentationTimeoutMs()
Long getMaxTimeToOutputMs()
String getPackageName()
String getRunner()
String getTestClassName()
String getTestMethodName()
Long getTestTimeoutMs()
Integer getUserId()
boolean isForceQueryable()

Yüklenecek APK'nın sorgulanabilir olup olmayacağı.

boolean isGrantPermission()

APK yükleme için izin verilip verilmeyeceği.

boolean isHiddenApiCheckDisabled()
boolean isInstrumentInPcc()

Ana makine tarafında kullanılan "am instrument" komutuna --instrument-in-pcc parametresinin eklenip eklenmeyeceği.

boolean isIsolatedStorageDisabled()
boolean isRestartDisabled()
boolean isTestApiCheckDisabled()
boolean isWindowAnimationDisabled()
DeviceTestRunOptions setApkFileName(String apkFileName)

APK kurulumu için APK dosyasının adını ayarlar.

DeviceTestRunOptions setCheckResults(boolean checkResults)

Enstrümantasyon çalıştırmasının sonuçlarının kontrol edilip edilmeyeceğini ve hata oluşmadığından emin olunup olunmayacağını ayarlar.

DeviceTestRunOptions setDevice(ITestDevice device)
DeviceTestRunOptions setDisableHiddenApiCheck(boolean disableHiddenApiCheck)

Ana makine tarafında kullanılan "am instrument" komutuna --no-hidden-api-checks eklenip eklenmeyeceğini ayarlar.

DeviceTestRunOptions setDisableIsolatedStorage(boolean disableIsolatedStorage)

Ana makine tarafından kullanılan "am instrument" komutuna --no-isolated-storage eklenip eklenmeyeceğini ayarlar.

DeviceTestRunOptions setDisableRestart(boolean disableRestart)

Ana makine tarafında kullanılan "am instrument" komutuna --no-restart eklenip eklenmeyeceğini ayarlar.

DeviceTestRunOptions setDisableTestApiCheck(boolean disableTestApiCheck)

Ana makine tarafından kullanılan "am instrument" komutuna --no-test-api-access seçeneğinin eklenip eklenmeyeceğini belirler.

DeviceTestRunOptions setDisableWindowAnimation(boolean disableWindowAnimation)

Ana makine tarafından kullanılan "am instrument" komutuna --no-window-animation seçeneğinin eklenip eklenmeyeceğini belirler.

DeviceTestRunOptions setForceQueryable(boolean forceQueryable)

Yüklenecek APK'nın sorgulanabilir olmaması durumunda false değerini ayarlar.

DeviceTestRunOptions setGrantPermission(boolean grantPermission)

APK yükleme için izin verir.

DeviceTestRunOptions setInstallArgs(String... installArgs)

Yükleme komutunun ek seçeneklerini ayarlar.

DeviceTestRunOptions setInstrumentInPcc(boolean instrumentInPcc)

Ana makine tarafında kullanılan "am instrument" komutuna --instrument-in-pcc eklenip eklenmeyeceğini ayarlar.

DeviceTestRunOptions setMaxInstrumentationTimeoutMs(Long maxInstrumentationTimeoutMs)

Tam enstrümanın çalışması ve tamamlanması gereken maksimum süreyi (milisaniye cinsinden) ayarlar.

DeviceTestRunOptions setMaxTimeToOutputMs(Long maxTimeToOutputMs)

Enstrümanın durdurulmadan önce çıkış vermeyi durdurabileceği maksimum süreyi (milisaniye cinsinden) ayarlar.

DeviceTestRunOptions setRunner(String runner)

Enstrümantasyonu çalıştırmak için kullanılması gereken enstrümantasyon çalıştırıcısını ayarlar.

DeviceTestRunOptions setTestClassName(String testClassName)

Enstrümentasyonun çalışması gereken sınıf adını ayarlar.

DeviceTestRunOptions setTestMethodName(String testMethodName)

Enstrümanın çalışması gereken yöntem adını ayarlar.

DeviceTestRunOptions setTestTimeoutMs(Long testTimeoutMs)

Bir testin kesintiye uğramadan önce çalışabileceği maksimum süreyi (milisaniye cinsinden) ayarlar.

DeviceTestRunOptions setUserId(Integer userId)

Enstrümanın çalıştırılacağı kullanıcı kimliğini ayarlar.

boolean shouldCheckResults()

Herkese açık oluşturucular

DeviceTestRunOptions

public DeviceTestRunOptions (String packageName)

Parametreler
packageName String

Herkese açık yöntemler

addExtraListener

public DeviceTestRunOptions addExtraListener (ITestLifeCycleReceiver listener)

Çalıştırılan enstrümana ekstra bir dinleyici ekleyin.

Parametreler
listener ITestLifeCycleReceiver

İadeler
DeviceTestRunOptions

addInstrumentationArg

public DeviceTestRunOptions addInstrumentationArg (String key, 
                String value)

Enstrümantasyona iletilecek bir bağımsız değişken ekleyin.

Parametreler
key String

value String

İadeler
DeviceTestRunOptions

clearExtraListeners

public void clearExtraListeners ()

clearInstrumentationArgs

public void clearInstrumentationArgs ()

Daha önce addInstrumentationArg(String,String) ile ayarlanmış tüm enstrümantasyon bağımsız değişkenlerini temizleyin.

getApkFileName

public String getApkFileName ()

APK yüklemesi için APK dosyasının adını döndürür.

İadeler
String

getDevice

public ITestDevice getDevice ()

İadeler
ITestDevice

getExtraListeners

public List<ITestLifeCycleReceiver> getExtraListeners ()

İadeler
List<ITestLifeCycleReceiver>

getInstallArgs

public String[] getInstallArgs ()

Yükleme komutunun ek seçeneklerini döndürür.

İadeler
String[]

getInstrumentationArgs

public Map<String, String> getInstrumentationArgs ()

İadeler
Map<String, String>

getMaxInstrumentationTimeoutMs

public Long getMaxInstrumentationTimeoutMs ()

İadeler
Long

getMaxTimeToOutputMs

public Long getMaxTimeToOutputMs ()

İadeler
Long

getPackageName

public String getPackageName ()

İadeler
String

getRunner

public String getRunner ()

İadeler
String

getTestClassName

public String getTestClassName ()

İadeler
String

getTestMethodName

public String getTestMethodName ()

İadeler
String

getTestTimeoutMs

public Long getTestTimeoutMs ()

İadeler
Long

getUserId

public Integer getUserId ()

İadeler
Integer

isForceQueryable

public boolean isForceQueryable ()

Yüklenecek APK'nın sorgulanabilir olup olmayacağı. Varsayılan değer true'dur.

İadeler
boolean

isGrantPermission

public boolean isGrantPermission ()

APK yükleme için izin verilip verilmeyeceği.

İadeler
boolean

isHiddenApiCheckDisabled

public boolean isHiddenApiCheckDisabled ()

İadeler
boolean

isInstrumentInPcc

public boolean isInstrumentInPcc ()

Ana makine tarafında kullanılan "am instrument" komutuna --instrument-in-pcc parametresinin eklenip eklenmeyeceği.

İadeler
boolean

isIsolatedStorageDisabled

public boolean isIsolatedStorageDisabled ()

İadeler
boolean

isRestartDisabled

public boolean isRestartDisabled ()

İadeler
boolean

isTestApiCheckDisabled

public boolean isTestApiCheckDisabled ()

İadeler
boolean

isWindowAnimationDisabled

public boolean isWindowAnimationDisabled ()

İadeler
boolean

setApkFileName

public DeviceTestRunOptions setApkFileName (String apkFileName)

APK kurulumu için APK dosyasının adını ayarlar.

Parametreler
apkFileName String

İadeler
DeviceTestRunOptions

setCheckResults

public DeviceTestRunOptions setCheckResults (boolean checkResults)

Enstrümantasyon çalıştırmasının sonuçlarının kontrol edilip edilmeyeceğini ve hata oluşmadığından emin olunup olunmayacağını ayarlar.

Parametreler
checkResults boolean

İadeler
DeviceTestRunOptions

setDevice

public DeviceTestRunOptions setDevice (ITestDevice device)

Parametreler
device ITestDevice

İadeler
DeviceTestRunOptions

setDisableHiddenApiCheck

public DeviceTestRunOptions setDisableHiddenApiCheck (boolean disableHiddenApiCheck)

Ana makine tarafında kullanılan "am instrument" komutuna --no-hidden-api-checks eklenip eklenmeyeceğini ayarlar.

Parametreler
disableHiddenApiCheck boolean

İadeler
DeviceTestRunOptions

setDisableIsolatedStorage

public DeviceTestRunOptions setDisableIsolatedStorage (boolean disableIsolatedStorage)

Ana makine tarafından kullanılan "am instrument" komutuna --no-isolated-storage eklenip eklenmeyeceğini ayarlar.

Parametreler
disableIsolatedStorage boolean

İadeler
DeviceTestRunOptions

setDisableRestart

public DeviceTestRunOptions setDisableRestart (boolean disableRestart)

Ana makine tarafında kullanılan "am instrument" komutuna --no-restart eklenip eklenmeyeceğini ayarlar.

Parametreler
disableRestart boolean

İadeler
DeviceTestRunOptions

setDisableTestApiCheck

public DeviceTestRunOptions setDisableTestApiCheck (boolean disableTestApiCheck)

Ana makine tarafından kullanılan "am instrument" komutuna --no-test-api-access seçeneğinin eklenip eklenmeyeceğini belirler.

Parametreler
disableTestApiCheck boolean

İadeler
DeviceTestRunOptions

setDisableWindowAnimation

public DeviceTestRunOptions setDisableWindowAnimation (boolean disableWindowAnimation)

Ana makine tarafından kullanılan "am instrument" komutuna --no-window-animation seçeneğinin eklenip eklenmeyeceğini belirler.

Parametreler
disableWindowAnimation boolean

İadeler
DeviceTestRunOptions

setForceQueryable

public DeviceTestRunOptions setForceQueryable (boolean forceQueryable)

Yüklenecek APK'nın sorgulanabilir olmaması durumunda false değerini ayarlar.

Parametreler
forceQueryable boolean

İadeler
DeviceTestRunOptions

setGrantPermission

public DeviceTestRunOptions setGrantPermission (boolean grantPermission)

APK yükleme için izin verir.

Parametreler
grantPermission boolean

İadeler
DeviceTestRunOptions

setInstallArgs

public DeviceTestRunOptions setInstallArgs (String... installArgs)

Yükleme komutunun ek seçeneklerini ayarlar.

Parametreler
installArgs String

İadeler
DeviceTestRunOptions

setInstrumentInPcc

public DeviceTestRunOptions setInstrumentInPcc (boolean instrumentInPcc)

Ana makine tarafında kullanılan "am instrument" komutuna --instrument-in-pcc eklenip eklenmeyeceğini ayarlar.

Parametreler
instrumentInPcc boolean

İadeler
DeviceTestRunOptions

setMaxInstrumentationTimeoutMs

public DeviceTestRunOptions setMaxInstrumentationTimeoutMs (Long maxInstrumentationTimeoutMs)

Tam enstrümanın çalışması ve tamamlanması gereken maksimum süreyi (milisaniye cinsinden) ayarlar. Zaman aşımı olmaması için 0 olarak ayarlayın. İsteğe bağlı.

Parametreler
maxInstrumentationTimeoutMs Long

İadeler
DeviceTestRunOptions

setMaxTimeToOutputMs

public DeviceTestRunOptions setMaxTimeToOutputMs (Long maxTimeToOutputMs)

Enstrümanın durdurulmadan önce çıkış vermeyi durdurabileceği maksimum süreyi (milisaniye cinsinden) ayarlar. Zaman aşımı olmaması için 0 olarak ayarlayın. İsteğe bağlı.

Parametreler
maxTimeToOutputMs Long

İadeler
DeviceTestRunOptions

setRunner

public DeviceTestRunOptions setRunner (String runner)

Enstrümantasyonu çalıştırmak için kullanılması gereken enstrümantasyon çalıştırıcısını ayarlar. Varsayılan çalıştırıcı "android.support.test.runner.AndroidJUnitRunner"dır. İsteğe bağlı.

Parametreler
runner String

İadeler
DeviceTestRunOptions

setTestClassName

public DeviceTestRunOptions setTestClassName (String testClassName)

Enstrümentasyonun çalışması gereken sınıf adını ayarlar. Enstrüman yalnızca sınıfı çalıştıracak şekilde filtrelenir. setTestMethodName(String) ile kullanılabilir. İsteğe bağlı.

Parametreler
testClassName String

İadeler
DeviceTestRunOptions

setTestMethodName

public DeviceTestRunOptions setTestMethodName (String testMethodName)

Enstrümanın çalışması gereken yöntem adını ayarlar. Düzgün çalışması için setTestClassName(String) ayarlanmalıdır. İsteğe bağlı.

Parametreler
testMethodName String

İadeler
DeviceTestRunOptions

setTestTimeoutMs

public DeviceTestRunOptions setTestTimeoutMs (Long testTimeoutMs)

Bir testin kesintiye uğramadan önce çalışabileceği maksimum süreyi (milisaniye cinsinden) ayarlar. Zaman aşımı olmaması için 0 olarak ayarlayın. İsteğe bağlı.

Parametreler
testTimeoutMs Long

İadeler
DeviceTestRunOptions

setUserId

public DeviceTestRunOptions setUserId (Integer userId)

Enstrümanın çalıştırılacağı kullanıcı kimliğini ayarlar. İsteğe bağlı.

Parametreler
userId Integer

İadeler
DeviceTestRunOptions

shouldCheckResults

public boolean shouldCheckResults ()

İadeler
boolean