Closed Bug 1480920 Opened Last year Closed Last year

Upgrade to modern test runner

Categories

(GeckoView :: General, enhancement, P1)

59 Branch
enhancement

Tracking

(geckoview62 wontfix, firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
geckoview62 --- wontfix
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: snorp, Assigned: snorp)

Details

Attachments

(1 file, 1 obsolete file)

We're using an old test runner because we were stuck on an old version of the support lib. We should upgrade now that we're on 26.
Comment on attachment 8997601 [details]
Bug 1480920 - Bump versions for Android test runner packages

https://reviewboard.mozilla.org/r/261294/#review268554

::: mobile/android/geckoview/build.gradle:203
(Diff revision 1)
> -    androidTestImplementation 'com.android.support.test:runner:0.5'
> -    androidTestImplementation 'com.android.support.test:rules:0.5'
> -    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
> +    androidTestImplementation 'com.android.support.test:runner:1.0.2'
> +    androidTestImplementation 'com.android.support.test:rules:1.0.2'
> +    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

Please update "mobile/android/geckoview_example/build.gradle" as well, though these're not really used there.

::: mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/rule/GeckoSessionTestRule.java:1480
(Diff revision 1)
>      @Override
>      public Statement apply(final Statement base, final Description description) {
> -        return super.apply(new Statement() {
> +        return new Statement() {
>              @Override
>              public void evaluate() throws Throwable {
> +                final AtomicReference<Throwable> exceptionRef = new AtomicReference<>();

Use `FutureTask` like `UiThreadTestRule` does: https://android.googlesource.com/platform/frameworks/testing/+/android-support-test/rules/src/main/java/android/support/test/rule/UiThreadTestRule.java#73`
Attachment #8997601 - Flags: review?(nchen) → review+
Assignee: nobody → snorp
Priority: -- → P1
Comment on attachment 8997601 [details]
Bug 1480920 - Bump versions for Android test runner packages

https://reviewboard.mozilla.org/r/261294/#review269146

::: mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/rule/GeckoSessionTestRule.java:1480
(Diff revision 1)
>      @Override
>      public Statement apply(final Statement base, final Description description) {
> -        return super.apply(new Statement() {
> +        return new Statement() {
>              @Override
>              public void evaluate() throws Throwable {
> +                final AtomicReference<Throwable> exceptionRef = new AtomicReference<>();

I copied the meat of that function, found here:

https://android.googlesource.com/platform/frameworks/testing/+/android-support-test/rules/src/main/java/android/support/test/internal/statement/UiThreadStatement.java?autodive=0%2F%2F%2F
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3978309484a
Bump versions for Android test runner packages r=jchen
This also removes the trivial tests for geckoview_example that were
causing problems.
Attachment #8997601 - Attachment is obsolete: true
Flags: needinfo?(snorp)
Comment on attachment 9003182 [details]
Bug 1480920 - Bump versions for Android test runner packages r=jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9003182 - Flags: review+
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f5732e0812ff
Bump versions for Android test runner packages r=jchen
https://hg.mozilla.org/mozilla-central/rev/f5732e0812ff
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
status-firefox62=wontfix because (I assume) we don't need to uplift this test runner upgrade.
Product: Firefox for Android → GeckoView
Version: Firefox 59 → 59 Branch
Target Milestone: Firefox 63 → mozilla63
You need to log in before you can comment on or make changes to this bug.