TestFilterHelper

public class TestFilterHelper
extends Object

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


Classe helper per il filtraggio dei test

Riepilogo

Costruttori pubblici

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

Metodi pubblici

void addAllExcludeAnnotation(Set<String> notAnnotations)

Aggiunge Set dell'annotazione di esclusione del test da eseguire

void addAllExcludeFilters(Set<String> filters)

Aggiunge il Set dei filtri dei test da escludere.

void addAllIncludeAnnotation(Set<String> annotations)

Aggiunge Set dell'annotazione di inclusione del test da eseguire

void addAllIncludeFilters(Set<String> filters)

Aggiunge il Set dei filtri dei test da includere

void addExcludeAnnotation(String notAnnotation)

Aggiunge un'annotazione di esclusione del test da eseguire

void addExcludeFilter(String filter)

Aggiunge un filtro per i test da escludere

void addIncludeAnnotation(String annotation)

Aggiunge un'annotazione di inclusione del test da eseguire

void addIncludeFilter(String filter)

Aggiunge un filtro per i test da includere

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)

Controlla se un elemento con annotazione supera il filtro

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

Controlla se un elemento con annotazione supera il filtro

boolean shouldTestRun(AnnotatedElement annotatedElement)

Controlla se un elemento con annotazione supera il filtro

boolean shouldTestRun(Description desc)

Controlla se il Description che contiene le annotazioni supera il filtro

Costruttori pubblici

TestFilterHelper

public TestFilterHelper ()

TestFilterHelper

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

Parametri
includeFilters Collection

excludeFilters Collection

includeAnnotation Collection

excludeAnnotation Collection

Metodi pubblici

addAllExcludeAnnotation

public void addAllExcludeAnnotation (Set<String> notAnnotations)

Aggiunge Set dell'annotazione di esclusione del test da eseguire

Parametri
notAnnotations Set

addAllExcludeFilters

public void addAllExcludeFilters (Set<String> filters)

Aggiunge il Set dei filtri dei test da escludere.

Parametri
filters Set

addAllIncludeAnnotation

public void addAllIncludeAnnotation (Set<String> annotations)

Aggiunge Set dell'annotazione di inclusione del test da eseguire

Parametri
annotations Set

addAllIncludeFilters

public void addAllIncludeFilters (Set<String> filters)

Aggiunge il Set dei filtri dei test da includere

Parametri
filters Set

addExcludeAnnotation

public void addExcludeAnnotation (String notAnnotation)

Aggiunge un'annotazione di esclusione del test da eseguire

Parametri
notAnnotation String

addExcludeFilter

public void addExcludeFilter (String filter)

Aggiunge un filtro per i test da escludere

Parametri
filter String

addIncludeAnnotation

public void addIncludeAnnotation (String annotation)

Aggiunge un'annotazione di inclusione del test da eseguire

Parametri
annotation String

addIncludeFilter

public void addIncludeFilter (String filter)

Aggiunge un filtro per i test da includere

Parametri
filter String

clearExcludeAnnotations

public void clearExcludeAnnotations ()

clearExcludeFilters

public void clearExcludeFilters ()

clearIncludeAnnotations

public void clearIncludeAnnotations ()

clearIncludeFilters

public void clearIncludeFilters ()

getExcludeAnnotation

public Set<String> getExcludeAnnotation ()

Resi
Set<String>

getExcludeFilters

public Set<String> getExcludeFilters ()

Resi
Set<String>

getIncludeAnnotation

public Set<String> getIncludeAnnotation ()

Resi
Set<String>

getIncludeFilters

public Set<String> getIncludeFilters ()

Resi
Set<String>

shouldRun

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

Controlla se un elemento con annotazione supera il filtro

Parametri
desc Description: un Description che descrive il test.

extraJars List: un elenco di File che puntano a file JAR aggiuntivi da caricare.

Resi
boolean true se il metodo di test deve essere eseguito, false in caso contrario

shouldRun

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

Controlla se un elemento con annotazione supera il filtro

Parametri
packageName String: nome del pacchetto del metodo

classObj Class: la classe del metodo

method Method: metodo di test

Resi
boolean true se il metodo di test deve essere eseguito, false in caso contrario

shouldTestRun

public boolean shouldTestRun (AnnotatedElement annotatedElement)

Controlla se un elemento con annotazione supera il filtro

Parametri
annotatedElement AnnotatedElement: l'elemento da filtrare

Resi
boolean true se il test deve essere eseguito, false in caso contrario

shouldTestRun

public boolean shouldTestRun (Description desc)

Controlla se il Description che contiene le annotazioni supera il filtro

Parametri
desc Description: l'elemento da filtrare

Resi
boolean true se il test deve essere eseguito, false in caso contrario