TestFilterHelper

public class TestFilterHelper
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.TestFilterHelper


테스트 필터링을 위한 도우미 클래스

요약

공개 생성자

TestFilterHelper()
TestFilterHelper(Collection<String> includeFilters, Collection<String> excludeFilters, Collection<String> includeAnnotation, Collection<String> excludeAnnotation)

공개 메서드

void addAllExcludeAnnotation(Set<String> notAnnotations)

실행할 테스트의 제외 주석 Set 추가

void addAllExcludeFilters(Set<String> filters)

제외할 테스트의 필터 Set를 추가합니다.

void addAllIncludeAnnotation(Set<String> annotations)

실행할 테스트의 include 주석의 Set 추가

void addAllIncludeFilters(Set<String> filters)

테스트를 포함할 필터의 Set를 추가합니다.

void addExcludeAnnotation(String notAnnotation)

실행할 테스트의 제외 주석을 추가합니다.

void addExcludeFilter(String filter)

제외할 테스트 필터 추가

void addIncludeAnnotation(String annotation)

실행할 테스트의 include 주석을 추가합니다.

void addIncludeFilter(String filter)

포함할 테스트의 필터를 추가합니다.

void clearExcludeAnnotations()
void clearExcludeFilters()
void clearIncludeAnnotations()
void clearIncludeFilters()
Set<String> getExcludeAnnotation()
Set<String> getExcludeFilters()
Set<String> getIncludeAnnotation()
Set<String> getIncludeFilters()
boolean shouldRun(Description desc, List<File> extraJars)

주석이 있는 요소가 필터를 통과하는지 확인

boolean shouldRun(String packageName, Class<?> classObj, Method method)

주석이 있는 요소가 필터를 통과하는지 확인

boolean shouldTestRun(AnnotatedElement annotatedElement)

주석이 있는 요소가 필터를 통과하는지 확인

boolean shouldTestRun(Description desc)

주석이 포함된 Description이(가) 필터를 통과하는지 확인

공개 생성자

TestFilterHelper

public TestFilterHelper ()

TestFilterHelper

public TestFilterHelper (Collection<String> includeFilters, 
                Collection<String> excludeFilters, 
                Collection<String> includeAnnotation, 
                Collection<String> excludeAnnotation)

매개변수
includeFilters Collection

excludeFilters Collection

includeAnnotation Collection

excludeAnnotation Collection

공개 메서드

addAllExcludeAnnotation

public void addAllExcludeAnnotation (Set<String> notAnnotations)

실행할 테스트의 제외 주석 Set 추가

매개변수
notAnnotations Set

addAllExcludeFilters

public void addAllExcludeFilters (Set<String> filters)

제외할 테스트의 필터 Set를 추가합니다.

매개변수
filters Set

addAllIncludeAnnotation

public void addAllIncludeAnnotation (Set<String> annotations)

실행할 테스트의 include 주석의 Set 추가

매개변수
annotations Set

addAllIncludeFilters

public void addAllIncludeFilters (Set<String> filters)

테스트를 포함할 필터의 Set를 추가합니다.

매개변수
filters Set

addExcludeAnnotation

public void addExcludeAnnotation (String notAnnotation)

실행할 테스트의 제외 주석을 추가합니다.

매개변수
notAnnotation String

addExcludeFilter

public void addExcludeFilter (String filter)

제외할 테스트 필터 추가

매개변수
filter String

addIncludeAnnotation

public void addIncludeAnnotation (String annotation)

실행할 테스트의 include 주석을 추가합니다.

매개변수
annotation String

addIncludeFilter

public void addIncludeFilter (String filter)

포함할 테스트의 필터를 추가합니다.

매개변수
filter String

clearExcludeAnnotations

public void clearExcludeAnnotations ()

clearExcludeFilters

public void clearExcludeFilters ()

clearIncludeAnnotations

public void clearIncludeAnnotations ()

clearIncludeFilters

public void clearIncludeFilters ()

getExcludeAnnotation

public Set<String> getExcludeAnnotation ()

반환
Set<String>

getExcludeFilters

public Set<String> getExcludeFilters ()

반환
Set<String>

getIncludeAnnotation

public Set<String> getIncludeAnnotation ()

반환
Set<String>

getIncludeFilters

public Set<String> getIncludeFilters ()

반환
Set<String>

shouldRun

public boolean shouldRun (Description desc, 
                List<File> extraJars)

주석이 있는 요소가 필터를 통과하는지 확인

매개변수
desc Description: 테스트를 설명하는 Description입니다.

extraJars List: 로드할 추가 JAR를 가리키는 File 목록입니다.

반환
boolean 테스트 메서드를 실행해야 하면 true, 그렇지 않으면 false

shouldRun

public boolean shouldRun (String packageName, 
                Class<?> classObj, 
                Method method)

주석이 있는 요소가 필터를 통과하는지 확인

매개변수
packageName String: 메서드 패키지의 이름

classObj Class: 메서드의 클래스

method Method: 테스트 메서드

반환
boolean 테스트 메서드를 실행해야 하면 true, 그렇지 않으면 false

shouldTestRun

public boolean shouldTestRun (AnnotatedElement annotatedElement)

주석이 있는 요소가 필터를 통과하는지 확인

매개변수
annotatedElement AnnotatedElement: 필터링할 요소

반환
boolean 테스트를 실행해야 하면 true, 그렇지 않으면 false입니다.

shouldTestRun

public boolean shouldTestRun (Description desc)

주석이 포함된 Description이(가) 필터를 통과하는지 확인

매개변수
desc Description: 필터링할 요소

반환
boolean 테스트를 실행해야 하면 true, 그렇지 않으면 false입니다.