android / android/android-test

Test Orchestrator fails with "No test results."

Open
#748 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
11h 29m
Merged PRs (30d)
2

Description

### Description
If tests are run with AndroidX test orchestrator, every test run fails with `Test running failed: No test results`.

### Steps to Reproduce
1. Create empty AS project.
2. Insert attached `build.gradle`
3. Run ExampleInstrumentedTest (or any test...)

### Expected Results
Tests should run with given options. They only run if AndroidX Orchestrator is disabled.

### Actual Results
Log:
> 020-09-21 10:41:29.802 7943-7943/? E/appproc: ERROR: could not find class 'androidx.test.services.shellexecutor.ShellMain'
2020-09-21 10:41:29.802 7943-7943/? A/app_process: java_vm_ext.cc:570] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: androidx.test.services.shellexecutor.ShellMain
2020-09-21 10:41:29.802 7943-7943/? A/app_process: java_vm_ext.cc:570] (Throwable with empty stack trace)
2020-09-21 10:41:29.802 7943-7943/? A/app_process: java_vm_ext.cc:570]
2020-09-21 10:41:29.802 7943-7943/? A/app_process: java_vm_ext.cc:570] in call to NewGlobalRef
2020-09-21 10:41:29.832 7943-7943/? A/app_process: runtime.cc:630] Runtime aborting...

### AndroidX Test and Android OS Versions

> androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test:Runner:1.3.0'
androidTestUtil 'androidx.test:orchestrator:1.3.0'
compileSdkVersion 29
buildToolsVersion "29.0.3"

Full app-level [build.gradle.txt](https://github.com/android/android-test/files/5254648/build.gradle.txt) is attached.

Occured on emulators with Oreo and v10 + physical device on v10.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the attached build.gradle and an ExampleInstrumentedTest using AndroidX Test Orchestrator. Start by tracing the missing androidx.test.services.shellexecutor.ShellMain dependency from the reported log; done means instrumented tests run successfully with the listed orchestrator options.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.