Skip to content

Most visited

Recently visited

navigation

EnableTestTracingRule

public class EnableTestTracingRule
extends LoggingBaseRule

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


When applied to a test class this TestRule calls Trace.beginSection() before test method execution. The TestRule then calls Trace.endSection() after test method execution. The TestRule enables Systrace/Atrace output to have discrete information about when/which test methods were run (which helps during performance test debugging).

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

Public constructors

EnableTestTracingRule()

Public methods

void afterTest()
void beforeTest()

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

EnableTestTracingRule

EnableTestTracingRule ()

Public methods

afterTest

void afterTest ()

beforeTest

void beforeTest ()

This site uses cookies to store your preferences for site-specific language and display options.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.