public abstract class

LoggingBaseRule

extends ExternalResource
java.lang.Object
   ↳ org.junit.rules.ExternalResource
     ↳ android.support.test.rule.logging.LoggingBaseRule
Known Direct Subclasses

Class Overview

Base class for logging rules to remove boiler-plate instance variables used by most logging rules.

Summary

Public Constructors
LoggingBaseRule()
LoggingBaseRule(File logFileOutputDirectory, String fileName)
Request the log be written to a specific location.
Public Methods
final void after()
final Statement apply(Statement base, Description description)
final void before()
void setTestRunNumber(int testRunNumber)
Indicate to the Rule that this is the testRunNumberth time the test method is being called in a test instrumentation.
Protected Methods
String getLogFileName()
File getLogFileOutputDirectory()
String getPackageNameUnderTest()
String getTestClass()
String getTestName()
int getTestRunNumber()
[Expand]
Inherited Methods
From class org.junit.rules.ExternalResource
From class java.lang.Object
From interface org.junit.rules.TestRule

Public Constructors

public LoggingBaseRule ()

public LoggingBaseRule (File logFileOutputDirectory, String fileName)

Request the log be written to a specific location.

File logFileOutputDirectory directory to log output to String fileName to override the default file name, if desired

Public Methods

public final void after ()

public final Statement apply (Statement base, Description description)

public final void before ()

public void setTestRunNumber (int testRunNumber)

Indicate to the Rule that this is the testRunNumberth time the test method is being called in a test instrumentation. This method only needs to be called when a test method is being called multiple times in a test instrumentation.

Parameters
testRunNumber indicates the nth run for the test method in zero-index form

Protected Methods

protected String getLogFileName ()

protected File getLogFileOutputDirectory ()

protected String getPackageNameUnderTest ()

protected String getTestClass ()

protected String getTestName ()

protected int getTestRunNumber ()