TestFilterHelper
public
class
TestFilterHelper
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.TestFilterHelper |
Classe auxiliar para filtrar testes
Resumo
Construtores públicos | |
|---|---|
TestFilterHelper()
|
|
TestFilterHelper(Collection<String> includeFilters, Collection<String> excludeFilters, Collection<String> includeAnnotation, Collection<String> excludeAnnotation)
|
|
Métodos públicos | |
|---|---|
void
|
addAllExcludeAnnotation(Set<String> notAnnotations)
Adiciona o |
void
|
addAllExcludeFilters(Set<String> filters)
Adiciona o |
void
|
addAllIncludeAnnotation(Set<String> annotations)
Adiciona o |
void
|
addAllIncludeFilters(Set<String> filters)
Adiciona o |
void
|
addExcludeAnnotation(String notAnnotation)
Adiciona uma anotação de exclusão do teste a ser executado. |
void
|
addExcludeFilter(String filter)
Adiciona um filtro de quais testes excluir. |
void
|
addIncludeAnnotation(String annotation)
Adiciona uma anotação de inclusão do teste a ser executado |
void
|
addIncludeFilter(String filter)
Adiciona um filtro de quais testes incluir |
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)
Verifica se um elemento com anotação passa pelo filtro |
boolean
|
shouldRun(String packageName, Class<?> classObj, Method method)
Verifica se um elemento com anotação passa pelo filtro |
boolean
|
shouldTestRun(AnnotatedElement annotatedElement)
Verifica se um elemento com anotação passa pelo filtro |
boolean
|
shouldTestRun(Description desc)
Verifique se o |
Construtores públicos
TestFilterHelper
public TestFilterHelper ()
TestFilterHelper
public TestFilterHelper (Collection<String> includeFilters,
Collection<String> excludeFilters,
Collection<String> includeAnnotation,
Collection<String> excludeAnnotation)| Parâmetros | |
|---|---|
includeFilters |
Collection |
excludeFilters |
Collection |
includeAnnotation |
Collection |
excludeAnnotation |
Collection |
Métodos públicos
addAllExcludeAnnotation
public void addAllExcludeAnnotation (Set<String> notAnnotations)
Adiciona o Set da anotação de exclusão do teste a ser executado.
| Parâmetros | |
|---|---|
notAnnotations |
Set |
addAllExcludeFilters
public void addAllExcludeFilters (Set<String> filters)
Adiciona o Set de filtros de quais testes excluir.
| Parâmetros | |
|---|---|
filters |
Set |
addAllIncludeAnnotation
public void addAllIncludeAnnotation (Set<String> annotations)
Adiciona o Set da anotação de inclusão do teste a ser executado.
| Parâmetros | |
|---|---|
annotations |
Set |
addAllIncludeFilters
public void addAllIncludeFilters (Set<String> filters)
Adiciona o Set de filtros de quais testes incluir.
| Parâmetros | |
|---|---|
filters |
Set |
addExcludeAnnotation
public void addExcludeAnnotation (String notAnnotation)
Adiciona uma anotação de exclusão do teste a ser executado.
| Parâmetros | |
|---|---|
notAnnotation |
String |
addExcludeFilter
public void addExcludeFilter (String filter)
Adiciona um filtro de quais testes excluir.
| Parâmetros | |
|---|---|
filter |
String |
addIncludeAnnotation
public void addIncludeAnnotation (String annotation)
Adiciona uma anotação de inclusão do teste a ser executado
| Parâmetros | |
|---|---|
annotation |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
Adiciona um filtro de quais testes incluir
| Parâmetros | |
|---|---|
filter |
String |
clearExcludeAnnotations
public void clearExcludeAnnotations ()
clearExcludeFilters
public void clearExcludeFilters ()
clearIncludeAnnotations
public void clearIncludeAnnotations ()
clearIncludeFilters
public void clearIncludeFilters ()
getExcludeAnnotation
public Set<String> getExcludeAnnotation ()
| Retorna | |
|---|---|
Set<String> |
|
getExcludeFilters
public Set<String> getExcludeFilters ()
| Retorna | |
|---|---|
Set<String> |
|
getIncludeAnnotation
public Set<String> getIncludeAnnotation ()
| Retorna | |
|---|---|
Set<String> |
|
getIncludeFilters
public Set<String> getIncludeFilters ()
| Retorna | |
|---|---|
Set<String> |
|
shouldRun
public boolean shouldRun (Description desc,
List<File> extraJars)Verifica se um elemento com anotação passa pelo filtro
| Parâmetros | |
|---|---|
desc |
Description: um Description que descreve o teste. |
extraJars |
List: uma lista de File que apontam para arquivos JAR extras a serem carregados. |
| Retorna | |
|---|---|
boolean |
"true" se o método de teste precisar ser executado. Caso contrário, "false". |
shouldRun
public boolean shouldRun (String packageName,
Class<?> classObj,
Method method)Verifica se um elemento com anotação passa pelo filtro
| Parâmetros | |
|---|---|
packageName |
String: nome do pacote do método |
classObj |
Class: classe do método |
method |
Method: método de teste |
| Retorna | |
|---|---|
boolean |
"true" se o método de teste precisar ser executado. Caso contrário, "false". |
shouldTestRun
public boolean shouldTestRun (AnnotatedElement annotatedElement)
Verifica se um elemento com anotação passa pelo filtro
| Parâmetros | |
|---|---|
annotatedElement |
AnnotatedElement: o elemento a ser filtrado |
| Retorna | |
|---|---|
boolean |
"true" se o teste deve ser executado. Caso contrário, "false". |
shouldTestRun
public boolean shouldTestRun (Description desc)
Verifique se o Description que contém anotações passa pelo filtro
| Parâmetros | |
|---|---|
desc |
Description: o elemento a ser filtrado |
| Retorna | |
|---|---|
boolean |
"true" se o teste deve ser executado. Caso contrário, "false". |