IMultiTargetPreparer

public interface IMultiTargetPreparer
implements IDisableable

com.android.tradefed.targetprep.multi.IMultiTargetPreparer


Prepares the test environment for several devices together. Only use for a setup that requires multiple devices, otherwise use the regular ITargetPreparer on each device.

Note that multiple IMultiTargetPreparers can be specified in a configuration. It is recommended that each IMultiTargetPreparer clearly document its expected environment pre-setup and post-setUp.

Summary

Public methods

default void setUp(IInvocationContext context)

This method is deprecated. Use setUp(com.android.tradefed.invoker.TestInformation) instead.

default void setUp(TestInformation testInformation)

Perform the targets setup for testing.

default void tearDown(TestInformation testInformation, Throwable e)

Perform the targets cleanup/teardown after testing.

default void tearDown(IInvocationContext context, Throwable e)

This method is deprecated. Use tearDown(com.android.tradefed.invoker.TestInformation, Throwable) instead.

Public methods

setUp

public void setUp (IInvocationContext context)

This method is deprecated.
Use setUp(com.android.tradefed.invoker.TestInformation) instead.

Perform the targets setup for testing.

Parameters
context IInvocationContext: the IInvocationContext describing the invocation, devices, builds.

Throws
TargetSetupError if fatal error occurred setting up environment
BuildError In case of build related error
DeviceNotAvailableException if device became unresponsive

setUp

public void setUp (TestInformation testInformation)

Perform the targets setup for testing.

Parameters
testInformation TestInformation: the TestInformation describing the invocation, devices, builds.

Throws
TargetSetupError if fatal error occurred setting up environment
BuildError In case of build related error
DeviceNotAvailableException if device became unresponsive

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

Perform the targets cleanup/teardown after testing.

Parameters
testInformation TestInformation: the TestInformation describing the invocation, devices, builds.

e Throwable: if the invocation ended with an exception, this will be the exception that was caught at the Invocation level. Otherwise, will be null.

Throws
DeviceNotAvailableException if device became unresponsive

tearDown

public void tearDown (IInvocationContext context, 
                Throwable e)

This method is deprecated.
Use tearDown(com.android.tradefed.invoker.TestInformation, Throwable) instead.

Perform the targets cleanup/teardown after testing.

Parameters
context IInvocationContext: the IInvocationContext describing the invocation, devices, builds.

e Throwable: if the invocation ended with an exception, this will be the exception that was caught at the Invocation level. Otherwise, will be null.

Throws
DeviceNotAvailableException if device became unresponsive