android / android/android-test

ActivityScenarioRule launches an EmptyActivity in between each test

Open
#411 1 comment 3 reactions 1 assignee Claimed by @brettchabot View on GitHub
Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
11h 29m
Merged PRs (30d)
2

Description

This adds several hundred ms to each test using the Rule.

The separate launch should be confined to only the affected API levels:

https://github.com/android/android-test/blob/ef59895f4132aa13f01b263e5342d5cbb73b37a9/core/java/androidx/test/core/app/InstrumentationActivityInvoker.java#L469

Additionally, consider disabling animations with `overridePendingTransitions(0,0)` for EmptyActivity and similar, since most tests run with window animations enabled (and they're difficult to disable in Studio: https://issuetracker.google.com/issues/138120842)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.