android / android/android-test

Repeat many times of Espresso Remote test got IllegalStateException

Aperta
#284 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Java
Stelle
1.2k
Fork
342
Merge medio
11h 29m
PR unite (30g)
2

Descrizione

Description

MultiProcessSample in googlesamples/android-testing will crash occasionally.

And if change the private process to main process, repeat 100 times, will success.

Steps to Reproduce

run the ExampleInstrumentedTest in MultiProcessSample 100 times.

Expected Results

Test success.

Actual Results
Testing started at 21:13 ...

03/29 21:13:21: Launching ExampleInstrumentedT...
Running tests

$ adb shell am instrument -w -r   -e debug false -e class 'com.example.android.testing.espresso.multiprocesssample.ExampleInstrumentedTest' com.example.android.testing.espresso.multiprocesssample.test/androidx.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests

java.lang.IllegalStateException: Interaction response reported Status.Error, but noerror message was attached to interaction response: androidx.test.espresso.remote.InteractionResponse@8763d4a
at androidx.test.espresso.remote.EspressoRemote.reportResults(EspressoRemote.java:386)
at androidx.test.espresso.remote.EspressoRemote.initiateRemoteCall(EspressoRemote.java:278)
at androidx.test.espresso.remote.EspressoRemote$2.run(EspressoRemote.java:237)
at androidx.test.espresso.remote.EspressoRemote$3.call(EspressoRemote.java:256)
at androidx.test.espresso.remote.EspressoRemote$3.call(EspressoRemote.java:244)
at androidx.test.espresso.core.internal.deps.guava.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at androidx.test.espresso.core.internal.deps.guava.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
at androidx.test.espresso.core.internal.deps.guava.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)


Tests ran to completion.


AndroidX Test and Android OS Versions

AndroidX Test version as it is in MultiProcessSample of googlesamples/android-testing.

    buildToolsVersion = "28.0.3"
    androidxLibVersion = "1.0.0"
    coreVersion = "1.1.1-alpha02"
    extJUnitVersion = "1.1.1-alpha02"
    runnerVersion = "1.1.2-alpha02"
    rulesVersion = "1.1.2-alpha02"
    espressoVersion = "3.2.0-alpha02"

Android OS Version is 9.0
I use AVD test it.

Name: Pixel_2_XL_API_28

CPU/ABI: Intel Atom (x86_64)

Path: /Users/shifujun/.android/avd/Pixel_2_XL_API_28.avd

Target: default [Default Android System Image] (API level 28)

Skin: pixel_2_xl

SD Card: 512M

fastboot.chosenSnapshotFile: 

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: pixel_2_xl

hw.lcd.width: 1440

hw.initialOrientation: Portrait

image.androidVersion.api: 28

tag.id: default

hw.mainKeys: no

hw.camera.front: emulated

avd.ini.displayname: Pixel 2 XL API 28

hw.gpu.mode: auto

hw.ramSize: 1536

PlayStore.enabled: false

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 2880

vm.heapSize: 384

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images/android-28/default/x86_64/

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Pixel_2_XL_API_28

hw.lcd.density: 560

hw.arc: false

hw.device.hash2: MD5:ce72d6c2506218ad8c9cc1cfa7e13357

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Default Android System Image

runtime.network.latency: none

disk.dataPartition.size: 800M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes
Link to a public git repo demonstrating the problem:

I have commit code of repeat the test 100 times in my repo.
https://github.com/shifujun/android-testing/tree/master/ui/espresso/MultiProcessSample

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con MultiProcessSample ed esegui ExampleInstrumentedTest 100 volte sull’emulatore API 28 fornito, confrontando le configurazioni del processo privato e del processo principale. Segui il fallimento attraverso le chiamate segnalate di EspressoRemote.java e utilizza il repository di esempio collegato per riprodurlo. Il lavoro è completato quando il test multiprocesso ripetuto termina correttamente senza la IllegalStateException.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, java
Ambito
mobile-dev, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.