EnableTestTracingRule
public class EnableTestTracingRule
extends LoggingBaseRule
当施加到一个测试类此TestRule
呼叫Trace.beginSection()
测试方法执行之前。 然后Trace.endSection()
在测试方法执行后调用Trace.endSection()
。 TestRule使Systrace / Atrace输出具有关于什么时间/哪些测试方法运行的离散信息(这有助于在性能测试调试期间)。
If the API level is less than 18 (Jelly Bean) this rule will do nothing since
Trace
isn't supported.
Usage:
\@Rule public EnableTestTracingRule mEnableTestTracing = new EnableTestTracingRule(); 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
EnableTestTracingRule
EnableTestTracingRule ()
Public methods
afterTest
void afterTest ()
beforeTest
void beforeTest ()