Open nojunpark opened 5 years ago
I guess my question is why it's looking for /data/app/android.support.test.orchestrator-2
instead of /data/app/android.support.test.orchestrator
. On other machines (where it still fails, I've seen it looking for /data/app/android.support.test.orchestrator-1
as well.
seems like Android Studio isn't the issue either, when adb shell am instrument -w -e debug true org.mozilla.tv.firefox.debug.test/org.mozilla.tv.firefox.FirefoxTestRunner
is executed on cli, the test hangs as well. it runs test fine with other test options it seems.
This was mistakenly closed - the issue still exists, and with this bug UI tests cannot be debugged (i.e. setting a breakpoint, etc.)
There's a good reason to believe that this may be tied to the Test Orchestrator we're using - currently we use version 1.0.2., but using 1.1.0 still causes issue.
Further investigation shows that after commenting out execution 'ANDROID_TEST_ORCHESTRATOR'
in gradle testOptions let you step through the test in debug mode.
Well, I suppose we can't get rid of test orchestrator at this point, @Baron-Severin (and other devs) how should we proceed?
TestOrchestrator
is super important, but it only affects anything when we're running multiple tests at the same time (it causes each test to be run in its own process, to reduce shared state). I think we should be able to write some Gradle logic to detect the debugger flag and disable TestOrchestrator
any time it's present. I usually only use the debugger when executing an individual test.
In the short term, I would recommend commenting out the execution 'ANDROID_TEST_ORCHESTRATOR'
when debugging. That should be safe to do.
Agreed, closing this issue with above workaround
If you don't mind, I would actually like to keep it open until we make that Gradle change to fix it permanently. I'm hoping to find time to sneak it in in the next few days.
@Baron-Severin did you add the permanent fix in?
@athomasmoz no, sorry, this one fell off my radar.
No problem. Is the workaround sufficient or should the permanent fix be prioritized?
Workaround is fine for now. I'd call it maybe a P3? It's annoying to debug UI tests without the cleaner fix, but it's not a blocker.
Steps to reproduce
Run UI Test in Android Studio, to either device or simulator, in debug mode
Expected behavior
Test starts
Actual behavior
Test does not start, stuck after the command
$ adb shell CLASSPATH=$(pm path android.support.test.services) app_process / android.support.test.services.shellexecutor.ShellMain am instrument -r -w -e targetInstrumentation org.mozilla.tv.firefox.debug.test/org.mozilla.tv.firefox.FirefoxTestRunner -e debug true -e class 'org.mozilla.tv.firefox.ui.BasicNavigationTest#basicNavigationTest' android.support.test.orchestrator/android.support.test.orchestrator.AndroidTestOrchestrator
Logcat shows this information: