leakcanary-android-instrumentation / leakcanary / FailTestOnLeakRunListener / <init>

<init>

FailTestOnLeakRunListener()

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.

FailTestOnLeakRunListener can be subclassed to override skipLeakDetectionReason and onAnalysisPerformed

See Also

InstrumentationLeakDetector