Skip to content
🤔 Documentation issue? Report it

Extension: Instrumentation tests

leakcanary-android-instrumentation / leakcanary

Package leakcanary

Types

Name Summary
FailAnnotatedTestOnLeakRunListener class FailAnnotatedTestOnLeakRunListener :FailTestOnLeakRunListener
A JUnit RunListener extending FailTestOnLeakRunListener to detecting memory leaks in Android instrumentation tests only when the FailTestOnLeak annotation is used.
FailTestOnLeakRunListener open class FailTestOnLeakRunListener : RunListener
A JUnit RunListener that uses InstrumentationLeakDetector to detect memory leaks in Android instrumentation tests. It waits for the end of a test, and if the test succeeds then it will look for retained objects, trigger a heap dump if needed and perform an analysis.
InstrumentationLeakDetector class InstrumentationLeakDetector
InstrumentationLeakDetector can be used to detect memory leaks in instrumentation tests.

Annotations

Name Summary
FailTestOnLeak annotation class FailTestOnLeak
An Annotation class to be used in conjunction with FailAnnotatedTestOnLeakRunListener for detecting memory leaks. When using FailAnnotatedTestOnLeakRunListener, the tests should be annotated with this class in order for the listener to detect memory leaks.