Consider teaching mach test about Android Kotlin tests in GeckoView, Android Components, and Fenix
Categories
(Testing :: General, task)
Tracking
(firefox133 fixed)
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.
Reporter | ||
Comment 1•10 months ago
|
||
(Tagging to monorepo-enhancements for triage, please move if out of scope.)
Reporter | ||
Comment 2•9 months ago
|
||
Bug 1897176 is highly related and likely blocks this bug.
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.
Assignee | ||
Comment 4•5 months ago
|
||
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.
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Comment 5•4 months ago
|
||
Assignee | ||
Comment 6•4 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c5d1d138c332
https://hg.mozilla.org/mozilla-central/rev/4228aeab11d3
https://hg.mozilla.org/mozilla-central/rev/1fbe3791110b
Description
•