public class

LogDeviceGetPropInfoRule

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

Class Overview

When applied to a test class this Rule executes the "getprop" device command after test method execution and logs it to a file on external storage. The default file location is retrieved via getTestDir(String, String, int).

The Rule logs the runtime build number, device name, build type, lcd density, cpu type, among many other device state attributes. When used in conjunction with a device lab it might assist in identifying trends in test failures for a subset of Android devices.

The pertinent information output by this rule typically doesn't change between tests, therefore, it is typically used manually by using the before() and after() methods in a ERROR(RunListener/org.junit.runner.notification.RunListener RunListener).

Usage: \@Rule public LogDeviceGetPropInfoRule mLogDeviceGetPropInfoRule = new LogDeviceGetPropInfoRule();

Summary

Public Constructors
LogDeviceGetPropInfoRule()
LogDeviceGetPropInfoRule(File logFileOutputDirectory, String fileName)
Public Methods
void afterTest()
void beforeTest()
[Expand]
Inherited Methods
From class android.support.test.rule.logging.LoggingBaseRule
From class org.junit.rules.ExternalResource
From class java.lang.Object
From interface org.junit.rules.TestRule

Public Constructors

public LogDeviceGetPropInfoRule ()

public LogDeviceGetPropInfoRule (File logFileOutputDirectory, String fileName)

Public Methods

public void afterTest ()

public void beforeTest ()