TestFilterHelper
public
class
TestFilterHelper
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.TestFilterHelper |
Lớp trợ giúp để lọc các kiểm thử
Tóm tắt
Hàm khởi tạo công khai | |
|---|---|
TestFilterHelper()
|
|
TestFilterHelper(Collection<String> includeFilters, Collection<String> excludeFilters, Collection<String> includeAnnotation, Collection<String> excludeAnnotation)
|
|
Phương thức công khai | |
|---|---|
void
|
addAllExcludeAnnotation(Set<String> notAnnotations)
Thêm |
void
|
addAllExcludeFilters(Set<String> filters)
Thêm |
void
|
addAllIncludeAnnotation(Set<String> annotations)
Thêm |
void
|
addAllIncludeFilters(Set<String> filters)
Thêm |
void
|
addExcludeAnnotation(String notAnnotation)
Thêm chú giải loại trừ của thử nghiệm để chạy |
void
|
addExcludeFilter(String filter)
Thêm bộ lọc để loại trừ các kiểm thử |
void
|
addIncludeAnnotation(String annotation)
Thêm chú thích include của thử nghiệm để chạy |
void
|
addIncludeFilter(String filter)
Thêm bộ lọc để chọn những thử nghiệm cần đưa vào |
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)
Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không |
boolean
|
shouldRun(String packageName, Class<?> classObj, Method method)
Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không |
boolean
|
shouldTestRun(AnnotatedElement annotatedElement)
Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không |
boolean
|
shouldTestRun(Description desc)
Kiểm tra xem |
Hàm khởi tạo công khai
TestFilterHelper
public TestFilterHelper ()
TestFilterHelper
public TestFilterHelper (Collection<String> includeFilters,
Collection<String> excludeFilters,
Collection<String> includeAnnotation,
Collection<String> excludeAnnotation)| Tham số | |
|---|---|
includeFilters |
Collection |
excludeFilters |
Collection |
includeAnnotation |
Collection |
excludeAnnotation |
Collection |
Phương thức công khai
addAllExcludeAnnotation
public void addAllExcludeAnnotation (Set<String> notAnnotations)
Thêm Set của chú giải loại trừ của kiểm thử để chạy
| Tham số | |
|---|---|
notAnnotations |
Set |
addAllExcludeFilters
public void addAllExcludeFilters (Set<String> filters)
Thêm Set bộ lọc mà bạn muốn loại trừ khỏi các kiểm thử.
| Tham số | |
|---|---|
filters |
Set |
addAllIncludeAnnotation
public void addAllIncludeAnnotation (Set<String> annotations)
Thêm Set của chú thích include của bài kiểm thử để chạy
| Tham số | |
|---|---|
annotations |
Set |
addAllIncludeFilters
public void addAllIncludeFilters (Set<String> filters)
Thêm Set bộ lọc để kiểm tra những nội dung cần đưa vào
| Tham số | |
|---|---|
filters |
Set |
addExcludeAnnotation
public void addExcludeAnnotation (String notAnnotation)
Thêm chú giải loại trừ của thử nghiệm để chạy
| Tham số | |
|---|---|
notAnnotation |
String |
addExcludeFilter
public void addExcludeFilter (String filter)
Thêm bộ lọc để loại trừ các kiểm thử
| Tham số | |
|---|---|
filter |
String |
addIncludeAnnotation
public void addIncludeAnnotation (String annotation)
Thêm chú thích include của thử nghiệm để chạy
| Tham số | |
|---|---|
annotation |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
Thêm bộ lọc để chọn những thử nghiệm cần đưa vào
| Tham số | |
|---|---|
filter |
String |
clearExcludeAnnotations
public void clearExcludeAnnotations ()
clearExcludeFilters
public void clearExcludeFilters ()
clearIncludeAnnotations
public void clearIncludeAnnotations ()
clearIncludeFilters
public void clearIncludeFilters ()
getExcludeAnnotation
public Set<String> getExcludeAnnotation ()
| Giá trị trả về | |
|---|---|
Set<String> |
|
getExcludeFilters
public Set<String> getExcludeFilters ()
| Giá trị trả về | |
|---|---|
Set<String> |
|
getIncludeAnnotation
public Set<String> getIncludeAnnotation ()
| Giá trị trả về | |
|---|---|
Set<String> |
|
getIncludeFilters
public Set<String> getIncludeFilters ()
| Giá trị trả về | |
|---|---|
Set<String> |
|
shouldRun
public boolean shouldRun (Description desc,
List<File> extraJars)Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không
| Tham số | |
|---|---|
desc |
Description: một Description mô tả bài kiểm tra. |
extraJars |
List: một danh sách File trỏ đến các tệp jar bổ sung cần tải. |
| Giá trị trả về | |
|---|---|
boolean |
true nếu phương thức kiểm thử sẽ chạy, false nếu không |
shouldRun
public boolean shouldRun (String packageName,
Class<?> classObj,
Method method)Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không
| Tham số | |
|---|---|
packageName |
String: tên gói của phương thức |
classObj |
Class: lớp của phương thức |
method |
Method: phương thức kiểm thử |
| Giá trị trả về | |
|---|---|
boolean |
true nếu phương thức kiểm thử sẽ chạy, false nếu không |
shouldTestRun
public boolean shouldTestRun (AnnotatedElement annotatedElement)
Kiểm tra xem một phần tử có chú thích có vượt qua bộ lọc hay không
| Tham số | |
|---|---|
annotatedElement |
AnnotatedElement: phần tử cần lọc |
| Giá trị trả về | |
|---|---|
boolean |
true nếu cần chạy kiểm thử, false nếu không |
shouldTestRun
public boolean shouldTestRun (Description desc)
Kiểm tra xem Description chứa chú thích có vượt qua bộ lọc hay không
| Tham số | |
|---|---|
desc |
Description: phần tử cần lọc |
| Giá trị trả về | |
|---|---|
boolean |
true nếu cần chạy kiểm thử, false nếu không |