to top
public class

FakeTest

extends Object
implements IDeviceTest IRemoteTest @OptionClass(alias = "faketest")
java.lang.Object
   ↳ com.android.tradefed.testtype.FakeTest

Class Overview

A fake test whose purpose is to make it easy to generate repeatable test results.

Summary

Fields
static final Map<String, String> EMPTY_MAP
private String mFailInvocationWithCause @Option(name = "fail-invocation-with-cause", description = "If set, the invocation will be reported as a failure, with the specified message as the cause.")
private Map<String, String> mRuns @Option(name = "run", description = "Specify a new run to include. The key should be the unique name of the TestRun (which may be a Java class name). The value should specify the sequence of test results, using the characters P[ass], or F[ail]. You may use run-length encoding to specify repeats, and you may use parentheses for grouping. So \"(PF)4\" and \"((PF)2)2\" will both expand to \"PFPFPFPF\".", importance = com.android.tradefed.config.Option.Importance.IF_UNSET)
Public Constructors
FakeTest()
Public Methods
ITestDevice getDevice()
Get the device under test.
void run(ITestInvocationListener listener)
Runs the tests, and reports result to the listener.
void setDevice(ITestDevice device)
Inject the device under test.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.testtype.IDeviceTest
From interface com.android.tradefed.testtype.IRemoteTest

Fields

static final Map<String, String> EMPTY_MAP

private String mFailInvocationWithCause

private Map<String, String> mRuns

Public Constructors

public FakeTest ()

Public Methods

public ITestDevice getDevice ()

Get the device under test.

Returns

public void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener the ITestInvocationListener of test results

public void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device the ITestDevice to use