Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve reporting for parallel instrumentation tests #307

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

mannodermaus
Copy link
Owner

Wrap the default RunNotifier with a parallel-aware variant if JUnit Jupiter's parallel test execution is enabled. It injects itself into the default AndroidX instrumentation and reorders the emission of test events as necessary. This requires a hefty bit of reflective inspection, therefore guard this access via a helper class.

As for the sample app, enable parallelism for it and update the tests to demonstrate the effect of it further. Finally, improve the error message when trying to launch a UI test (e.g. Espresso) in parallel, since that doesn't work.

Resolves #295.

@mannodermaus mannodermaus added this to the Instrumentation 1.4.0 milestone Sep 18, 2023
@mannodermaus mannodermaus self-assigned this Sep 18, 2023
@mannodermaus mannodermaus force-pushed the feature/parallel-instrumentation-tests branch from 8eb7b5f to f3ec788 Compare September 18, 2023 09:45
Wrap the default RunNotifier with a parallel-aware variant if JUnit Jupiter's parallel test execution is enabled.
It injects itself into the default AndroidX instrumentation and reorders the emission of test events as necessary.
This requires a hefty bit of reflective inspection, therefore guard this access via a helper class.

As for the sample app, enable parallelism for it and update the tests to demonstrate the effect of it further.
Finally, improve the error message when trying to launch a UI test (e.g. Espresso) in parallel,
since that doesn't work.

Resolves #295.
@mannodermaus mannodermaus force-pushed the feature/parallel-instrumentation-tests branch from f3ec788 to 3c632ac Compare September 18, 2023 09:45
@mannodermaus mannodermaus merged commit e107b41 into main Sep 18, 2023
@mannodermaus mannodermaus deleted the feature/parallel-instrumentation-tests branch September 18, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel concurrent execution of instrumentation tests
1 participant