android / android/android-test

`InstrumentationActivityInvoker$BootstrapActivity` starts a separate process...

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

Description

### Description

`ActivityScenario` launches `InstrumentationActivityInvoker$BootstrapActivity` before it launches the requested activity.
In application modules this launches a separate process for the your Test APK, which slows down tests.

In library modules this launches in the same process (there is only one APK).

This can lead to behaviour differences of the same test depending on if it is in a library or app module.

### Steps to Reproduce

### Expected Results

BootstrapActivity launches in the process under test, not a new separate process.

### Actual Results

BootstrapActivity launches in a new separate process for application modules with a separate test APK.

### AndroidX Test and Android OS Versions
1.3.0
API 30

Contributor guide

Open the contributing guide

Research direction

Start by tracing how ActivityScenario launches InstrumentationActivityInvoker$BootstrapActivity and how the process is selected for application modules with a separate test APK. Compare that behavior with library modules, then verify that BootstrapActivity launches in the process under test without changing the requested activity flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile, 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.