DeviceTestRun옵션
public class DeviceTestRunOptions
extends Object
java.lang.Object | |
↳ | 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-isolation-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 |
클리어엑스트라리스너
public void clearExtraListeners ()
ClearInstrumentationArgs
public void clearInstrumentationArgs ()
이전에 addInstrumentationArg(String, String)
사용하여 설정된 모든 계측 인수를 지웁니다.
getApk파일 이름
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를 쿼리할 수 있는지 여부를 확인합니다. 기본값은 true입니다.
보고 | |
---|---|
boolean |
isGrantPermission
public boolean isGrantPermission ()
APK 설치 권한을 부여할지 여부입니다.
보고 | |
---|---|
boolean |
isHiddenApiCheckDisabled
public boolean isHiddenApiCheckDisabled ()
보고 | |
---|---|
boolean |
isIsolatedStorageDisabled
public boolean isIsolatedStorageDisabled ()
보고 | |
---|---|
boolean |
재시작 비활성화됨
public boolean isRestartDisabled ()
보고 | |
---|---|
boolean |
isTestApiCheckDisabled
public boolean isTestApiCheckDisabled ()
보고 | |
---|---|
boolean |
isWindowAnimationDisabled
public boolean isWindowAnimationDisabled ()
보고 | |
---|---|
boolean |
setApk파일 이름
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-isolation-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 |
결과를 확인해야 합니다.
public boolean shouldCheckResults ()
보고 | |
---|---|
boolean |