Open Bug 1807306 Opened 3 years ago Updated 2 years ago

ActivityTestRule is deprecated (for UI tests)

Categories

(Firefox for Android :: UI Tests, defect, P3)

All
Android
defect

Tracking

()

People

(Reporter: cpeterson, Assigned: jajohnson)

References

Details

From github: https://github.com/mozilla-mobile/fenix/issues/22248.

According to the docs, it should be replaced with ActivityScenario or ActivityScenarioRule:

This class is deprecated.
use ActivityScenario or ActivityScenarioRule instead. They offer a simpler, and safer way of controlling Activity lifecycles.

I wonder if switching will help reduce the number of intermittent failures we experience.

This API apparently can also be used in robolectric tests: maybe it'd produce fewer failures there too.

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

Problems surfaced while trying to upgrade to Android API 30 & replacing the ActivityTestRule with ActivityScenario: https://github.com/mozilla-mobile/mobile-test-eng/issues/602
@Aaron, should we keep this open?

Flags: needinfo?(atrain)

Yes, we'll want to eventually adopt ActivityScenario or ActivityScenarioRule as ActivityTestRule is deprecated. Deprecation, for Android means that Google has ended official support for the APIs, but they will continue to remain available to developers.

In my first dig in, I filed https://github.com/android/android-test/issues/1282 asking about the new preferred approach to running pre-test activity and post-test activity code before and after activity finishes. There's some work-arounds the android-test team posted about in there that we should look at.

Flags: needinfo?(atrain)

The severity field is not set for this bug.
:rpapa, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(rpappalardo)
Severity: -- → S4
Priority: -- → P3
Flags: needinfo?(rpappalardo)

looking into this now as we work through a re-arch toward using POM, Fragments, etc.

Assignee: nobody → jajohnson
You need to log in before you can comment on or make changes to this bug.