모듈 정의
public class ModuleDefinition
extends Object
implements ITestCollector
java.lang.객체 | |
↳ | com.android.tradefed.testtype.suite.ModuleDefinition |
테스트 실행 구성을 위한 컨테이너입니다. 이 클래스는 테스트를 준비하고 실행하는 도우미입니다.
요약
필드 | |
---|---|
public static final String | MODULE_ABI |
public static final String | MODULE_CONTROLLER |
public static final String | MODULE_ID 모듈 ID testRunStart 중에 모듈을 고유하게 식별하는 데 사용할 이름입니다. |
public static final String | MODULE_ISOLATED 모듈이 새로 준비된 장치에서 실행 중인 경우 이 속성은 true로 설정됩니다. |
public static final String | MODULE_NAME 모듈 이름은 일반적으로 모듈이 로드된 Xml TF 구성 파일에서 가져온 모듈과 관련된 기본 이름입니다. |
public static final String | MODULE_PARAMETERIZATION |
public static final String | PREPARATION_TIME |
public static final String | RETRY_FAIL_COUNT |
public static final String | RETRY_SUCCESS_COUNT |
public static final String | RETRY_TIME |
public static final String | TEAR_DOWN_TIME |
public static final String | TEST_TIME
|
공개 생성자 | |
---|---|
ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) 건설자 | |
ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) 건설자 |
공개 메서드 | |
---|---|
int | compareTo ( ModuleDefinition moduleDef) |
String | getId () 고유한 모듈 이름을 반환합니다. |
IInvocationContext | getModuleInvocationContext () 반환은 |
getRequiredTokens () | |
long | getRuntimeHint () 모듈의 모든 테스트를 실행하는 대략적인 시간을 반환합니다. |
boolean | hasModuleFailed () 모듈에서 testRunFailure가 호출된 경우 True 반환 * |
int | numTests () 의 현재 수를 반환 |
final void | reportNotExecuted (ITestInvocationListener listener, String message) 완전히 실행되지 않은 모듈을 보고합니다. |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) 모든 실행 |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener) 모든 실행 |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) 모든 실행 |
Throwable | runPreparation (boolean includeSuitePreparers) 지정된 경우 제품군 수준 준비자를 포함하여 테스트 준비자를 실행합니다. |
void | setBuild (IBuildInfo build) 분사 |
void | setCollectTestsOnly (boolean collectTestsOnly) 테스트 수집 모드 활성화 또는 비활성화 |
void | setDevice (ITestDevice device) 분사 |
void | setEnableDynamicDownload (boolean enableDynamicDownload) 모듈 수준에서 동적 다운로드를 활성화할지 여부입니다. |
void | setLogSaver (ILogSaver logSaver) 필요한 경우 사용할 수 있도록 호출 로그 보호기를 모듈에 전달합니다. |
final void | setMergeAttemps (boolean mergeAttempts) 결과를 병합할지 여부를 설정합니다. |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) 의 목록 주입 |
final void | setRetryDecision ( IRetryDecision decision) 설정합니다 |
String | toString () |
void | transferSuiteLevelOptions ( IConfiguration mSuiteConfiguration) 제품군 수준 구성의 일부 복사 |
보호된 방법 | |
---|---|
boolean | hasTests () 반환 사실이 모듈은 여전히있는 경우 |
필드
모듈_ABI
public static final String MODULE_ABI
모듈_컨트롤러
public static final String MODULE_CONTROLLER
MODULE_ID
public static final String MODULE_ID
모듈 ID testRunStart 동안 모듈을 고유하게 식별하는 데 사용할 이름입니다. 일반적으로 MODULE_ABI + MODULE_NAME의 조합입니다.
MODULE_ISOLATED
public static final String MODULE_ISOLATED
모듈이 새로 준비된 장치에서 실행 중인 경우 이 속성은 true로 설정됩니다.
MODULE_NAME
public static final String MODULE_NAME
모듈 이름은 일반적으로 모듈이 로드된 Xml TF 구성 파일에서 가져온 모듈과 관련된 기본 이름입니다.
MODULE_PARAMETERIZATION
public static final String MODULE_PARAMETERIZATION
준비 시간
public static final String PREPARATION_TIME
RETRY_FAIL_COUNT
public static final String RETRY_FAIL_COUNT
RETRY_SUCCESS_COUNT
public static final String RETRY_SUCCESS_COUNT
RETRY_TIME
public static final String RETRY_TIME
TEAR_DOWN_TIME
public static final String TEAR_DOWN_TIME
TEST_TIME
public static final String TEST_TIME
공개 생성자
모듈 정의
public ModuleDefinition (String name,tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig)
건설자
매개변수 | |
---|---|
name | String : 테스트 구성의 고유 한 이름. |
tests | IRemoteTest 실행해야합니다. |
preparersPerDevice | ITargetPreparer 설정에 장치를 사용합니다. |
multiPreparers | |
moduleConfig | IConfiguration 다음 IConfiguration 기본 모듈 설정의. |
모듈 정의
public ModuleDefinition (String name,tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig)
건설자
매개변수 | |
---|---|
name | String : 테스트 구성의 고유 한 이름. |
tests | IRemoteTest 실행해야합니다. |
preparersPerDevice | ITargetPreparer 설정에 장치를 사용합니다. |
suitePreparersPerDevice | |
multiPreparers | |
moduleConfig | IConfiguration 다음 IConfiguration 기본 모듈 설정의. |
공개 메서드
getId
public String getId ()
고유한 모듈 이름을 반환합니다.
보고 | |
---|---|
String |
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
반환은 IInvocationContext
모듈과 관련된.
보고 | |
---|---|
IInvocationContext |
getRequiredTokens
publicgetRequiredTokens ()
보고 | |
---|---|
getRuntime힌트
public long getRuntimeHint ()
모듈의 모든 테스트를 실행하는 대략적인 시간을 반환합니다.
보고 | |
---|---|
long |
hasModule실패
public boolean hasModuleFailed ()
모듈에서 testRunFailure가 호출된 경우 True 반환 *
보고 | |
---|---|
boolean |
보고되지 않음
public final void reportNotExecuted (ITestInvocationListener listener, String message)
완전히 실행되지 않은 모듈을 보고합니다.
매개변수 | |
---|---|
listener | ITestInvocationListener |
message | String |
운영
public final void run (TestInformation moduleInfo, ITestInvocationListener listener,moduleLevelListeners, TestFailureListener failureListener)
모든 실행 IRemoteTest
모듈에 포함 된 및 설정에 이전과 이후의 모든 작성자를 사용하여 장치를 청소합니다.
매개변수 | |
---|---|
moduleInfo | TestInformation |
listener | ITestInvocationListener 다음 ITestInvocationListener 결과를보고하고자한다. |
moduleLevelListeners | |
failureListener | TestFailureListener : testFail에 수집 로그에 대한 특정 청취자입니다. null일 수 있습니다. |
던지다 | |
---|---|
DeviceNotAvailableException | 장치가 오프라인 상태가 되는 경우. |
운영
public final void run (TestInformation moduleInfo, ITestInvocationListener listener)
모든 실행 IRemoteTest
모듈에 포함 된 및 설정에 이전과 이후의 모든 작성자를 사용하여 장치를 청소합니다.
매개변수 | |
---|---|
moduleInfo | TestInformation |
listener | ITestInvocationListener 다음 ITestInvocationListener 결과를보고하고자한다. |
던지다 | |
---|---|
DeviceNotAvailableException | 장치가 오프라인 상태가 되는 경우. |
운영
public final void run (TestInformation moduleInfo, ITestInvocationListener listener,moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit)
모든 실행 IRemoteTest
모듈에 포함 된 및 설정에 이전과 이후의 모든 작성자를 사용하여 장치를 청소합니다.
매개변수 | |
---|---|
moduleInfo | TestInformation 다음 TestInformation 모듈에 대한. |
listener | ITestInvocationListener 다음 ITestInvocationListener 결과를보고하고자한다. |
moduleLevelListeners | |
failureListener | TestFailureListener : testFail에 수집 로그에 대한 특정 청취자입니다. null일 수 있습니다. |
maxRunLimit | int 각 테스트 케이스에 대한 실행의 최대 수입니다. |
던지다 | |
---|---|
DeviceNotAvailableException | 장치가 오프라인 상태가 되는 경우. |
실행 준비
public Throwable runPreparation (boolean includeSuitePreparers)
지정된 경우 제품군 수준 준비자를 포함하여 테스트 준비자를 실행합니다.
매개변수 | |
---|---|
includeSuitePreparers | boolean : Set에 대한 true 도 실행 스위트 룸 수준의 작성자에. |
보고 | |
---|---|
Throwable | Throwable 작성자를 실행할 때 어떤 예외가 발생합니다. |
setCollectTestsOnly
public void setCollectTestsOnly (boolean collectTestsOnly)
테스트 수집 모드 활성화 또는 비활성화
setEnableDynamicDownload
public void setEnableDynamicDownload (boolean enableDynamicDownload)
모듈 수준에서 동적 다운로드를 활성화할지 여부입니다.
매개변수 | |
---|---|
enableDynamicDownload | boolean |
setLogSaver
public void setLogSaver (ILogSaver logSaver)
필요한 경우 사용할 수 있도록 호출 로그 보호기를 모듈에 전달합니다.
매개변수 | |
---|---|
logSaver | ILogSaver |
setMergeAttemps
public final void setMergeAttemps (boolean mergeAttempts)
결과를 병합할지 여부를 설정합니다.
매개변수 | |
---|---|
mergeAttempts | boolean |
setMetricCollectors
public void setMetricCollectors (collectors)
의 목록 주입 IMetricCollector
모듈에 의해 사용된다.
매개변수 | |
---|---|
collectors |
setRetryDecision
public final void setRetryDecision (IRetryDecision decision)
설정합니다 IRetryDecision
내 모듈 재 시도를 사용합니다.
매개변수 | |
---|---|
decision | IRetryDecision |
toString
public String toString ()
보고 | |
---|---|
String |
transferSuiteLevelOptions
public void transferSuiteLevelOptions (IConfiguration mSuiteConfiguration)
제품군 수준 구성의 일부 복사
매개변수 | |
---|---|
mSuiteConfiguration | IConfiguration |
보호된 방법
hasTests
protected boolean hasTests ()
반환 사실이 모듈은 여전히있는 경우 IRemoteTest
자사의 풀에서 실행합니다. 그렇지 않으면 거짓입니다.
보고 | |
---|---|
boolean |