Adding a rule for analyzing view capture data

For now, the rule is basically empty, to start with. In the following CLs it will
invoke the search for anomalies in the data collected by ViewCaptureRule
after the test succeeds and fail the test if an anomaly is found.

Bug: 286251603
Test: presubmit
Flag: N/A
Change-Id: I373ea0d7ee85206101fb15584889ea5933e7d7b8
This commit is contained in:
vadimt
2023-06-05 11:08:55 -07:00
parent fde9d30ff2
commit de54cb8fa5
4 changed files with 63 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ import com.android.launcher3.util.rule.SamplerRule;
import com.android.launcher3.util.rule.ScreenRecordRule;
import com.android.launcher3.util.rule.ShellCommandRule;
import com.android.launcher3.util.rule.TestStabilityRule;
import com.android.launcher3.util.rule.ViewCaptureAnalysisRule;
import com.android.launcher3.util.rule.ViewCaptureRule;
import org.junit.After;
@@ -210,7 +211,8 @@ public abstract class AbstractLauncherUiTest {
final RuleChain inner = RuleChain
.outerRule(new PortraitLandscapeRunner(this))
.around(viewCaptureRule)
.around(new FailureWatcher(mDevice, mLauncher, viewCaptureRule.getViewCapture()));
.around(new FailureWatcher(mDevice, mLauncher, viewCaptureRule.getViewCapture()))
.around(new ViewCaptureAnalysisRule(viewCaptureRule.getViewCapture()));
return TestHelpers.isInLauncherProcess()
? RuleChain.outerRule(ShellCommandRule.setDefaultLauncher()).around(inner)