LogGraphicsStatsRule
public class LogGraphicsStatsRule
extends LoggingBaseRule
在应用于测试类时,此Rule
在执行测试方法之前执行图形系统信息重置。 Rule
然后在测试方法执行后收集图形系统信息并将其记录到外部存储器上的文件中。 默认文件位置保持在getTestDir(String, String, int)
。 该规则通过执行gfxinfo
服务上的gfxinfo
来执行这些操作。
The
Rule
's
before()
and
after()
methods can also be used for logging battery information across a test suite by manually invoking the methods in a
RunListener
.
Usage:
\@Rule public LogGraphicsStatsRule mLogGraphicsStatsRule = new LogGraphicsStatsRule(); Summary
Inherited methods |
From class android.support.test.rule.logging.LoggingBaseRule
|
From class org.junit.rules.ExternalResource
void |
after() |
Statement |
apply(Statement arg0, Description arg1) |
void |
before() |
|
From class java.lang.Object
Object |
clone() |
boolean |
equals(Object arg0) |
void |
finalize() |
final Class<?> |
getClass() |
int |
hashCode() |
final void |
notify() |
final void |
notifyAll() |
String |
toString() |
final void |
wait(long arg0, int arg1) |
final void |
wait(long arg0) |
final void |
wait() |
|
From interface org.junit.rules.TestRule
abstract Statement |
apply(Statement arg0, Description arg1) |
|
Public constructors
LogGraphicsStatsRule
LogGraphicsStatsRule ()
LogGraphicsStatsRule
LogGraphicsStatsRule (File logFileOutputDirectory,
String fileName)
Parameters |
logFileOutputDirectory |
File
|
fileName |
String
|
Public methods
afterTest
void afterTest ()
beforeTest
void beforeTest ()