모듈 정의

public class ModuleDefinition
extends Object implements ITestCollector

java.lang.Object
com.android.tradefed.testtype.suite.ModuleDefinition


테스트 실행 구성을 위한 컨테이너입니다. 이 클래스는 테스트를 준비하고 실행하는 데 도움을 주는 클래스입니다.

요약

필드

public static final String ISOLATION_COST

public static final String MODULE_ABI

public static final String MODULE_CACHED

테스트 모듈 결과가 캐시된 경우 이 속성은 true로 설정됩니다.

public static final String MODULE_CONTROLLER

public static final String MODULE_EXTERNAL_DEPENDENCIES

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 MODULE_TEST_COUNT

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 SPARSE_MODULE

모듈 수준 이벤트만 보고되는 경우 이 속성은 true로 설정됩니다.

public static final String TEAR_DOWN_TIME

public static final String TEST_TIME

공개 생성자

ModuleDefinition ()
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 ()

고유한 모듈 이름을 반환합니다.

IConfiguration getModuleConfiguration ()
IInvocationContext getModuleInvocationContext ()

모듈과 연결된 IInvocationContext 반환합니다.

getRequiredTokens ( TestInformation testInfo)
long getRuntimeHint ()

모듈에서 모든 테스트를 실행하는 데 걸리는 대략적인 시간을 반환합니다.

boolean hasModuleFailed ()

모듈에서 testRunFailure가 호출된 경우 True를 반환합니다. *

int neededDevices ()

이 테스트를 실행할 것으로 예상되는 장치 수를 반환합니다.

int numTests ()

현재 실행 대기 중인 IRemoteTest 의 수를 반환합니다.

final void reportNotExecuted ( ITestInvocationListener listener, String message)

완전히 실행되지 않은 모듈을 보고합니다.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit)

모듈에 포함된 모든 IRemoteTest 실행하고 장치를 설정하고 청소하기 전과 후에 모든 준비자를 사용합니다.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener)

모듈에 포함된 모든 IRemoteTest 실행하고 장치를 설정하고 청소하기 전과 후에 모든 준비자를 사용합니다.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener)

모듈에 포함된 모든 IRemoteTest 실행하고 장치를 설정하고 청소하기 전과 후에 모든 준비자를 사용합니다.

Throwable runPreparation (boolean includeSuitePreparers)

지정된 경우 제품군 수준 준비자를 포함하여 테스트 준비자를 실행합니다.

void setBuild ( IBuildInfo build)

테스트 중에 사용할 IBuildInfo 삽입합니다.

void setCollectTestsOnly (boolean collectTestsOnly)

테스트 수집 모드를 활성화 또는 비활성화합니다.

void setDevice ( ITestDevice device)

테스트 중에 사용할 ITestDevice 삽입합니다.

void setEnableDynamicDownload (boolean enableDynamicDownload)

모듈 수준에서 동적 다운로드를 활성화할지 여부입니다.

void setLogSaver ( ILogSaver logSaver)

필요한 경우 사용할 수 있도록 호출 로그 보호기를 모듈에 전달합니다.

final void setMergeAttemps (boolean mergeAttempts)

결과를 병합할지 여부를 설정합니다.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

모듈에서 사용할 IMetricCollector 목록을 삽입합니다.

void setRecoverVirtualDevice (boolean recoverVirtualDevice)

세트는 가상 장치를 복구해야 합니다.

final void setRetryDecision ( IRetryDecision decision)

모듈 내 재시도에 사용할 IRetryDecision 설정합니다.

boolean shouldRecoverVirtualDevice ()

가상 장치를 복구해야 하는지 여부를 반환합니다.

String toString ()

void transferSuiteLevelOptions ( IConfiguration mSuiteConfiguration)

제품군 수준 구성 중 일부 복사

보호된 방법

boolean hasTests ()

모듈에 풀에서 실행할 IRemoteTest 아직 있으면 True를 반환합니다.

필드

ISOLATION_COST

public static final String ISOLATION_COST

MODULE_ABI

public static final String MODULE_ABI

MODULE_캐시됨

public static final String MODULE_CACHED

테스트 모듈 결과가 캐시된 경우 이 속성은 true로 설정됩니다.

모듈_컨트롤러

public static final String MODULE_CONTROLLER

MODULE_EXTERNAL_DEPENDENCIES

public static final String MODULE_EXTERNAL_DEPENDENCIES

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

MODULE_TEST_COUNT

public static final String MODULE_TEST_COUNT

준비 시간

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

SPARSE_MODULE

public static final String SPARSE_MODULE

모듈 수준 이벤트만 보고되는 경우 이 속성은 true로 설정됩니다.

TEAR_DOWN_TIME

public static final String TEAR_DOWN_TIME

TEST_TIME

public static final String TEST_TIME

공개 생성자

모듈 정의

public ModuleDefinition ()

모듈 정의

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 .

공개 메소드

비교 대상

public int compareTo (ModuleDefinition moduleDef)

매개변수
moduleDef ModuleDefinition

보고
int

getId

public String getId ()

고유한 모듈 이름을 반환합니다.

보고
String

getModuleConfiguration

public IConfiguration getModuleConfiguration ()

보고
IConfiguration

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

모듈과 연결된 IInvocationContext 반환합니다.

보고
IInvocationContext

getRequiredTokens

public  getRequiredTokens (TestInformation testInfo)

매개변수
testInfo TestInformation

보고

getRuntimeHint

public long getRuntimeHint ()

모듈에서 모든 테스트를 실행하는 데 걸리는 대략적인 시간을 반환합니다.

보고
long

hasModule실패

public boolean hasModuleFailed ()

모듈에서 testRunFailure가 호출된 경우 True를 반환합니다. *

보고
boolean

필요한 장치

public int neededDevices ()

이 테스트를 실행할 것으로 예상되는 장치 수를 반환합니다.

보고
int

테스트 수

public int numTests ()

현재 실행 대기 중인 IRemoteTest 의 개수를 반환합니다.

보고
int

보고서가 실행되지 않음

public final void reportNotExecuted (ITestInvocationListener listener, 
                String message)

완전히 실행되지 않은 모듈을 보고합니다.

매개변수
listener ITestInvocationListener

message String

달리다

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 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 Throwable runPreparation (boolean includeSuitePreparers)

지정된 경우 제품군 수준 준비자를 포함하여 테스트 준비자를 실행합니다.

매개변수
includeSuitePreparers boolean : 제품군 수준 준비자도 실행하려면 true 로 설정합니다.

보고
Throwable 준비자를 실행할 때 발생하는 예외가 Throwable .

세트빌드

public void setBuild (IBuildInfo build)

테스트 중에 사용할 IBuildInfo 삽입합니다.

매개변수
build IBuildInfo

setCollectTestsOnly

public void setCollectTestsOnly (boolean collectTestsOnly)

테스트 수집 모드를 활성화 또는 비활성화합니다.

setDevice

public void setDevice (ITestDevice device)

테스트 중에 사용할 ITestDevice 삽입합니다.

매개변수
device ITestDevice

setEnableDynamic다운로드

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

setRecoverVirtualDevice

public void setRecoverVirtualDevice (boolean recoverVirtualDevice)

세트는 가상 장치를 복구해야 합니다.

매개변수
recoverVirtualDevice boolean

set재시도결정

public final void setRetryDecision (IRetryDecision decision)

모듈 내 재시도에 사용할 IRetryDecision 설정합니다.

매개변수
decision IRetryDecision

가상 장치를 복구해야 합니다.

public boolean shouldRecoverVirtualDevice ()

가상 장치를 복구해야 하는지 여부를 반환합니다.

보고
boolean

toString

public String toString ()

보고
String

transferSuite레벨 옵션

public void transferSuiteLevelOptions (IConfiguration mSuiteConfiguration)

제품군 수준 구성 중 일부 복사

매개변수
mSuiteConfiguration IConfiguration

보호된 방법

hasTests

protected boolean hasTests ()

모듈에 풀에서 실행할 IRemoteTest 아직 있으면 True를 반환합니다. 그렇지 않으면 거짓입니다.

보고
boolean