Closed Bug 1897186 Opened 10 months ago Closed 4 months ago

Consider teaching mach test about Android Kotlin tests in GeckoView, Android Components, and Fenix

Categories

(Testing :: General, task)

task

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: olivia, Assigned: adhingra)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group3])

Attachments

(3 files)

Consider adding Android Kotlin tests to the tests ./mach test knows about.

When running ./mach test on a GeckoView test or an Android Components or a Fenix test, then ./mach test does not know how to execute them.

For example:

GeckoView:

./mach test /mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/TranslationsTest.kt
(For this one, there is a workaround of ./mach geckoview-junit org.mozilla.geckoview.test.TranslationsTest)

Android Components:
./mach test mobile/android/android-components/components/browser/state/src/test/java/mozilla/components/browser/state/engine/middleware/TranslationsMiddlewareTest.kt

Fenix:

./mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/TranslationsDialogBindingTest.kt

They give the response:

I was unable to find tests from the given argument(s).

You should specify a test directory, filename, test suite name, or
abbreviation.

It's possible my little brain doesn't know about the type of test you are
trying to execute. If you suspect this, please request support by filing
a bug at
https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=General.

(Tagging to monorepo-enhancements for triage, please move if out of scope.)

Bug 1897176 is highly related and likely blocks this bug.

Depends on: 1897176

This is going to be a little tricky, because mach test ... uses "test manifests" to determine what tests exist, and (historically, at least) we have not wanted to tie Android-specific tests to Gecko test manifests. I wonder if we want some kind of place-holder manifest file that registers directories but not individual files.

Commands added:

mach test fenix runs all tests for fenix
mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/TranslationsDialogBindingTest.kt will run all tests in the file.
mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/ will run all tests in the directory.

Assignee: nobody → adhingra
Status: NEW → ASSIGNED
Attachment #9429529 - Attachment description: WIP: Bug 1897186 - Add fenix tests to mach test. → Bug 1897186 - Add fenix tests to mach test.
Attachment #9429529 - Attachment description: Bug 1897186 - Add fenix tests to mach test. → Bug 1897186 - Add fenix and focus tests to mach test.
Attachment #9429529 - Attachment description: Bug 1897186 - Add fenix and focus tests to mach test. → Bug 1897186 - Add fenix tests to mach test.
Attachment #9429529 - Attachment description: Bug 1897186 - Add fenix tests to mach test. → Bug 1897186 - Add fenix and focus tests to mach test.
Whiteboard: [fxdroid][group3]
Pushed by adhingra@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5d1d138c332 Add fenix and focus tests to mach test. r=nalexander,ohall,jmaher https://hg.mozilla.org/integration/autoland/rev/4228aeab11d3 Add geckoview tests to mach test. r=nalexander,jmaher,ohall https://hg.mozilla.org/integration/autoland/rev/1fbe3791110b Add android-components tests to mach test. r=ohall,nalexander,jmaher
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Duplicate of this bug: 1826802
Blocks: 1936262
No longer blocks: 1936262
Blocks: 1950158
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: