CrashCollector
public
class
CrashCollector
extends TestFilePushSetup
implements
ITestLoggerReceiver,
ITargetCleaner
java.lang.Object | |||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | ||
↳ | com.android.tradefed.targetprep.TestFilePushSetup | ||
↳ | com.android.tradefed.targetprep.CrashCollector |
A ITargetPreparer
that runs crash collector on device which suppresses and logs crashes
during test execution.
Note: this preparer requires N platform or newer.
Summary
Public constructors | |
---|---|
CrashCollector()
|
Public methods | |
---|---|
void
|
setTestLogger(ITestLogger testLogger)
Injects the |
void
|
setUp(ITestDevice device, IBuildInfo buildInfo)
|
void
|
tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
Perform the target cleanup/teardown after testing. |
Public constructors
CrashCollector
public CrashCollector ()
Public methods
setTestLogger
public void setTestLogger (ITestLogger testLogger)
Injects the ITestLogger
instance
Parameters | |
---|---|
testLogger |
ITestLogger |
setUp
public void setUp (ITestDevice device, IBuildInfo buildInfo)
Parameters | |
---|---|
device |
ITestDevice |
buildInfo |
IBuildInfo |
Throws | |
---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
tearDown
public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)
Perform the target cleanup/teardown after testing.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to prepare. |
buildInfo |
IBuildInfo : data about the build under test. |
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 |