DeviceTestRun옵션
public class DeviceTestRunOptions
extends Object
java.lang.객체 | |
↳ | com.android.tradefed.testtype.junit4.DeviceTestRunOptions |
BaseHostJUnit4Test를 통한 장치 테스트 실행과 관련된 옵션의 빌더 클래스입니다.
요약
공개 생성자 | |
---|---|
DeviceTestRunOptions (String packageName) |
공개 방법 | |
---|---|
DeviceTestRunOptions | addExtraListener ( ITestLifeCycleReceiver listener) 실행 중인 계측에 추가 수신기를 추가합니다. |
DeviceTestRunOptions | addInstrumentationArg (String key, String value) 계측에 전달될 인수를 추가합니다. |
void | clearExtraListeners () |
void | clearInstrumentationArgs () 이전에 |
String | getApkFileName () apk 설치를 위한 apk 파일의 이름을 반환합니다. |
ITestDevice | getDevice () |
getExtraListeners () | |
String[] | getInstallArgs () 설치 명령의 추가 옵션을 반환합니다. |
getInstrumentationArgs () | |
Long | getMaxInstrumentationTimeoutMs () |
Long | getMaxTimeToOutputMs () |
String | getPackageName () |
String | getRunner () |
String | getTestClassName () |
String | getTestMethodName () |
Long | getTestTimeoutMs () |
Integer | getUserId () |
boolean | isForceQueryable () 설치할 apk를 쿼리할 수 있는지 여부입니다. |
boolean | isGrantPermission () apk 설치에 대한 권한 부여 여부입니다. |
boolean | isHiddenApiCheckDisabled () |
boolean | isIsolatedStorageDisabled () |
boolean | isRestartDisabled () |
boolean | isTestApiCheckDisabled () |
boolean | isWindowAnimationDisabled () |
DeviceTestRunOptions | setApkFileName (String apkFileName) apk 설치를 위한 apk 파일의 이름을 설정합니다. |
DeviceTestRunOptions | setCheckResults (boolean checkResults) 계측 실행 결과를 확인하고 오류가 발생하지 않았는지 확인해야 하는지 여부를 설정합니다. |
DeviceTestRunOptions | setDevice ( ITestDevice device) |
DeviceTestRunOptions | setDisableHiddenApiCheck (boolean disableHiddenApiCheck) 호스트 측에서 사용되는 'am instrument'에 --no-hidden-api-checks를 추가할지 여부를 설정합니다. |
DeviceTestRunOptions | setDisableIsolatedStorage (boolean disableIsolatedStorage) 호스트 측에서 사용되는 'am instrument'에 --no-isolated-storage를 추가할지 여부를 설정합니다. |
DeviceTestRunOptions | setDisableRestart (boolean disableRestart) 호스트 측에서 사용하는 'am instrument'에 --no-restart를 추가할지 여부를 설정합니다. |
DeviceTestRunOptions | setDisableTestApiCheck (boolean disableTestApiCheck) 호스트 측에서 사용되는 'am instrument'에 --no-test-api-access를 추가할지 여부를 설정합니다. |
DeviceTestRunOptions | setDisableWindowAnimation (boolean disableWindowAnimation) 호스트 측에서 사용하는 'am instrument'에 --no-window-animation을 추가할지 여부를 설정합니다. |
DeviceTestRunOptions | setForceQueryable (boolean forceQueryable) 설치할 apk를 쿼리할 수 없는 경우 |
DeviceTestRunOptions | setGrantPermission (boolean grantPermission) apk 설치에 대한 권한을 부여합니다. |
DeviceTestRunOptions | setInstallArgs (String... installArgs) 설치 명령의 추가 옵션을 설정합니다. |
DeviceTestRunOptions | setMaxInstrumentationTimeoutMs (Long maxInstrumentationTimeoutMs) 전체 계측이 실행되고 완료되어야 하는 최대 시간(밀리초)을 설정합니다. |
DeviceTestRunOptions | setMaxTimeToOutputMs (Long maxTimeToOutputMs) 계측이 중지되기 전에 출력을 중지할 수 있는 최대 시간(밀리초)을 설정합니다. |
DeviceTestRunOptions | setRunner (String runner) 계측을 실행하는 데 사용해야 하는 계측 러너를 설정합니다. |
DeviceTestRunOptions | setTestClassName (String testClassName) 계측이 실행되어야 하는 클래스 이름을 설정합니다. |
DeviceTestRunOptions | setTestMethodName (String testMethodName) 계측이 실행되어야 하는 메서드 이름을 설정합니다. |
DeviceTestRunOptions | setTestTimeoutMs (Long testTimeoutMs) 테스트가 중단되기 전에 실행할 수 있는 최대 시간(밀리초)을 설정합니다. |
DeviceTestRunOptions | setUserId (Integer userId) 계측이 실행되어야 하는 사용자 ID를 설정합니다. |
boolean | shouldCheckResults () |
공개 생성자
DeviceTestRun옵션
public DeviceTestRunOptions (String packageName)
매개변수 | |
---|---|
packageName | String |
공개 방법
addExtraListener
public DeviceTestRunOptions addExtraListener (ITestLifeCycleReceiver listener)
실행 중인 계측에 추가 수신기를 추가합니다.
매개변수 | |
---|---|
listener | ITestLifeCycleReceiver |
보고 | |
---|---|
DeviceTestRunOptions |
addInstrumentationArg
public DeviceTestRunOptions addInstrumentationArg (String key, String value)
계측에 전달될 인수를 추가합니다.
매개변수 | |
---|---|
key | String |
value | String |
보고 | |
---|---|
DeviceTestRunOptions |
clearExtraListeners
public void clearExtraListeners ()
clearInstrumentationArgs
public void clearInstrumentationArgs ()
이전에 addInstrumentationArg(String, String)
로 설정한 계측 인수를 모두 지웁니다.
getApkFileName
public String getApkFileName ()
apk 설치를 위한 apk 파일의 이름을 반환합니다.
보고 | |
---|---|
String |
getExtraListeners
publicgetExtraListeners ()
보고 | |
---|---|
getInstallArgs
public String[] getInstallArgs ()
설치 명령의 추가 옵션을 반환합니다.
보고 | |
---|---|
String[] |
getInstrumentationArgs
publicgetInstrumentationArgs ()
보고 | |
---|---|
getMaxInstrumentationTimeoutMs
public Long getMaxInstrumentationTimeoutMs ()
보고 | |
---|---|
Long |
getMaxTimeToOutputMs
public Long getMaxTimeToOutputMs ()
보고 | |
---|---|
Long |
getPackageName
public String getPackageName ()
보고 | |
---|---|
String |
getRunner
public String getRunner ()
보고 | |
---|---|
String |
getTestClassName
public String getTestClassName ()
보고 | |
---|---|
String |
getTestMethodName
public String getTestMethodName ()
보고 | |
---|---|
String |
getTestTimeoutMs
public Long getTestTimeoutMs ()
보고 | |
---|---|
Long |
getUserId
public Integer getUserId ()
보고 | |
---|---|
Integer |
isForceQueryable
public boolean isForceQueryable ()
설치할 apk를 쿼리할 수 있는지 여부입니다. 기본값은 참입니다.
보고 | |
---|---|
boolean |
isGrantPermission
public boolean isGrantPermission ()
apk 설치에 대한 권한 부여 여부입니다.
보고 | |
---|---|
boolean |
isHiddenApiCheckDisabled
public boolean isHiddenApiCheckDisabled ()
보고 | |
---|---|
boolean |
isIsolatedStorageDisabled
public boolean isIsolatedStorageDisabled ()
보고 | |
---|---|
boolean |
isRestartDisabled
public boolean isRestartDisabled ()
보고 | |
---|---|
boolean |
isTestApiCheckDisabled
public boolean isTestApiCheckDisabled ()
보고 | |
---|---|
boolean |
isWindowAnimationDisabled
public boolean isWindowAnimationDisabled ()
보고 | |
---|---|
boolean |
setApkFileName
public DeviceTestRunOptions setApkFileName (String apkFileName)
apk 설치를 위한 apk 파일의 이름을 설정합니다.
매개변수 | |
---|---|
apkFileName | String |
보고 | |
---|---|
DeviceTestRunOptions |
setCheckResults
public DeviceTestRunOptions setCheckResults (boolean checkResults)
계측 실행 결과를 확인하고 오류가 발생하지 않았는지 확인해야 하는지 여부를 설정합니다.
매개변수 | |
---|---|
checkResults | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setDevice
public DeviceTestRunOptions setDevice (ITestDevice device)
매개변수 | |
---|---|
device | ITestDevice |
보고 | |
---|---|
DeviceTestRunOptions |
setDisableHiddenApiCheck
public DeviceTestRunOptions setDisableHiddenApiCheck (boolean disableHiddenApiCheck)
호스트 측에서 사용되는 'am instrument'에 --no-hidden-api-checks를 추가할지 여부를 설정합니다.
매개변수 | |
---|---|
disableHiddenApiCheck | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setDisableIsolatedStorage
public DeviceTestRunOptions setDisableIsolatedStorage (boolean disableIsolatedStorage)
호스트 측에서 사용되는 'am instrument'에 --no-isolated-storage를 추가할지 여부를 설정합니다.
매개변수 | |
---|---|
disableIsolatedStorage | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setDisableRestart
public DeviceTestRunOptions setDisableRestart (boolean disableRestart)
호스트 측에서 사용하는 'am instrument'에 --no-restart를 추가할지 여부를 설정합니다.
매개변수 | |
---|---|
disableRestart | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setDisableTestApiCheck
public DeviceTestRunOptions setDisableTestApiCheck (boolean disableTestApiCheck)
호스트 측에서 사용되는 'am instrument'에 --no-test-api-access를 추가할지 여부를 설정합니다.
매개변수 | |
---|---|
disableTestApiCheck | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setDisableWindowAnimation
public DeviceTestRunOptions setDisableWindowAnimation (boolean disableWindowAnimation)
호스트 측에서 사용하는 'am instrument'에 --no-window-animation을 추가할지 여부를 설정합니다.
매개변수 | |
---|---|
disableWindowAnimation | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setForceQueryable
public DeviceTestRunOptions setForceQueryable (boolean forceQueryable)
설치할 apk를 쿼리할 수 없는 경우 false
로 설정합니다.
매개변수 | |
---|---|
forceQueryable | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setGrantPermission
public DeviceTestRunOptions setGrantPermission (boolean grantPermission)
apk 설치에 대한 권한을 부여합니다.
매개변수 | |
---|---|
grantPermission | boolean |
보고 | |
---|---|
DeviceTestRunOptions |
setInstallArgs
public DeviceTestRunOptions setInstallArgs (String... installArgs)
설치 명령의 추가 옵션을 설정합니다.
매개변수 | |
---|---|
installArgs | String |
보고 | |
---|---|
DeviceTestRunOptions |
setMaxInstrumentationTimeoutMs
public DeviceTestRunOptions setMaxInstrumentationTimeoutMs (Long maxInstrumentationTimeoutMs)
전체 계측이 실행되고 완료되어야 하는 최대 시간(밀리초)을 설정합니다. 제한 시간이 없으면 0으로 설정합니다. 선택 과목.
매개변수 | |
---|---|
maxInstrumentationTimeoutMs | Long |
보고 | |
---|---|
DeviceTestRunOptions |
setMaxTimeToOutputMs
public DeviceTestRunOptions setMaxTimeToOutputMs (Long maxTimeToOutputMs)
계측이 중지되기 전에 출력을 중지할 수 있는 최대 시간(밀리초)을 설정합니다. 제한 시간이 없으면 0으로 설정합니다. 선택 과목.
매개변수 | |
---|---|
maxTimeToOutputMs | Long |
보고 | |
---|---|
DeviceTestRunOptions |
setRunner
public DeviceTestRunOptions setRunner (String runner)
계측을 실행하는 데 사용해야 하는 계측 러너를 설정합니다. 기본 러너는 'android.support.test.runner.AndroidJUnitRunner'입니다. 선택 과목.
매개변수 | |
---|---|
runner | String |
보고 | |
---|---|
DeviceTestRunOptions |
setTestClassName
public DeviceTestRunOptions setTestClassName (String testClassName)
계측이 실행되어야 하는 클래스 이름을 설정합니다. 계측은 클래스만 실행하도록 필터링됩니다. setTestMethodName(String)
과 함께 사용할 수 있습니다. 선택 과목.
매개변수 | |
---|---|
testClassName | String |
보고 | |
---|---|
DeviceTestRunOptions |
setTestMethodName
public DeviceTestRunOptions setTestMethodName (String testMethodName)
계측이 실행되어야 하는 메서드 이름을 설정합니다. 제대로 작동하려면 setTestClassName(String)
설정해야 합니다. 선택 과목.
매개변수 | |
---|---|
testMethodName | String |
보고 | |
---|---|
DeviceTestRunOptions |
setTestTimeoutMs
public DeviceTestRunOptions setTestTimeoutMs (Long testTimeoutMs)
테스트가 중단되기 전에 실행할 수 있는 최대 시간(밀리초)을 설정합니다. 제한 시간이 없으면 0으로 설정합니다. 선택 과목.
매개변수 | |
---|---|
testTimeoutMs | Long |
보고 | |
---|---|
DeviceTestRunOptions |
setUserId
public DeviceTestRunOptions setUserId (Integer userId)
계측이 실행되어야 하는 사용자 ID를 설정합니다. 선택 과목.
매개변수 | |
---|---|
userId | Integer |
보고 | |
---|---|
DeviceTestRunOptions |
shouldCheckResults
public boolean shouldCheckResults ()
보고 | |
---|---|
boolean |