SkipManager

public class SkipManager
extends Object implements IDisableable

java.lang.Object
   ↳ com.android.tradefed.result.skipped.SkipManager


Based on a variety of criteria the skip manager helps to decide what should be skipped at different levels: invocation, modules and tests.

Summary

Public constructors

SkipManager()

Public methods

void clearManager()
getDemotedTests()

Returns the demoted tests and the reason for demotion

String getInvocationSkipReason()
boolean isDisabled()

Returns True if entire object disabled (skip both setup and teardown).

void reportDiscoveryDependencies( modules, depFiles)
void reportDiscoveryWithNoTests()

In the early download and discovery process, report to the skip manager that no tests are expected to be run.

void setDisable(boolean isDisabled)

Sets whether the object should be disabled.

void setImageAnalysis(ITestDevice device, ContentAnalysisContext analysisContext)
void setSkipDecision(boolean shouldSkip)
void setTestArtifactsAnalysis(ContentAnalysisContext analysisContext)
void setup(IConfiguration config, IInvocationContext context)

Setup and initialize the skip manager.

boolean shouldSkipInvocation(TestInformation information)

Reports whether we should skip the current invocation.

Public constructors

SkipManager

public SkipManager ()

Public methods

clearManager

public void clearManager ()

getDemotedTests

public  getDemotedTests ()

Returns the demoted tests and the reason for demotion

Returns

getInvocationSkipReason

public String getInvocationSkipReason ()

Returns
String

isDisabled

public boolean isDisabled ()

Returns True if entire object disabled (skip both setup and teardown). False otherwise.

Returns
boolean

reportDiscoveryDependencies

public void reportDiscoveryDependencies ( modules, 
                 depFiles)

Parameters
modules

depFiles

reportDiscoveryWithNoTests

public void reportDiscoveryWithNoTests ()

In the early download and discovery process, report to the skip manager that no tests are expected to be run. This should lead to skipping the invocation.

setDisable

public void setDisable (boolean isDisabled)

Sets whether the object should be disabled. Disabled means that both setup and teardown steps should be skipped. Can be use to make an object disabled by default in the default constructor.

Parameters
isDisabled boolean: the state the object should be put in.

setImageAnalysis

public void setImageAnalysis (ITestDevice device, 
                ContentAnalysisContext analysisContext)

Parameters
device ITestDevice

analysisContext ContentAnalysisContext

setSkipDecision

public void setSkipDecision (boolean shouldSkip)

Parameters
shouldSkip boolean

setTestArtifactsAnalysis

public void setTestArtifactsAnalysis (ContentAnalysisContext analysisContext)

Parameters
analysisContext ContentAnalysisContext

setup

public void setup (IConfiguration config, 
                IInvocationContext context)

Setup and initialize the skip manager.

Parameters
config IConfiguration

context IInvocationContext

shouldSkipInvocation

public boolean shouldSkipInvocation (TestInformation information)

Reports whether we should skip the current invocation.

Parameters
information TestInformation

Returns
boolean