Skip to content

Conversation

@MGaetan89
Copy link
Member

AGP is now able to merge test manifests, so it is no longer needed to have two modules.

@MGaetan89 MGaetan89 marked this pull request as draft November 8, 2024 18:27
@utzcoz
Copy link
Member

utzcoz commented Nov 9, 2024

@MGaetan89 Great to know this good news, could you share the AGP link of this feature?

@utzcoz
Copy link
Member

utzcoz commented Nov 9, 2024

@MGaetan89 I think you can run unit-tests locally.

@MGaetan89
Copy link
Member Author

@MGaetan89 Great to know this good news, could you share the AGP link of this feature?

It's my understanding of the last comment in the issue that was in the test comment: https://issuetracker.google.com/issues/127986458#comment22

@MGaetan89 I think you can run unit-tests locally.

Yes, I can 🙂
I did it for some APIs before opening the PR, but apparently I missed something.

@MGaetan89 MGaetan89 force-pushed the merge_integration_tests_agp_testsupport branch 3 times, most recently from 1b34d7d to 38fdda3 Compare November 9, 2024 12:03
@utzcoz
Copy link
Member

utzcoz commented Nov 9, 2024

java.lang.RuntimeException: Failed to instantiate test runner class androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner

Looks like there are some dependencies issue?

AGP is now able to merge test manifests,
so it is no longer needed to have two modules.
@MGaetan89 MGaetan89 force-pushed the merge_integration_tests_agp_testsupport branch from 38fdda3 to 742186e Compare November 10, 2024 11:54
@MGaetan89 MGaetan89 marked this pull request as ready for review November 10, 2024 12:08
@MGaetan89
Copy link
Member Author

The build is passing now 👍🏻

But is the :integration_tests:agp still necessary at all now? It basically declared an empty Activity that is started in a test. We do that in many other places, so probably the module can be removed too?

Copy link
Member

@utzcoz utzcoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, it works.

@MGaetan89 MGaetan89 merged commit 3ee772b into robolectric:master Nov 10, 2024
21 checks passed
@MGaetan89 MGaetan89 deleted the merge_integration_tests_agp_testsupport branch November 10, 2024 15:43
@MGaetan89
Copy link
Member Author

But is the :integration_tests:agp still necessary at all now? It basically declared an empty Activity that is started in a test. We do that in many other places, so probably the module can be removed too?

Merging this as-is, since it's already an improvement.

@utzcoz @hoisie what do you think about removing the :integration_tests:agp module completely?

@utzcoz
Copy link
Member

utzcoz commented Nov 10, 2024

@MGaetan89 IIRC, there are some modules use TestActivity of agp module in tests . If we can confirm that other modules don't depend on agp module, and we don't need extra basic tests, I prefer to deleting agp module.

@MGaetan89
Copy link
Member Author

I'll check again, but I didn't see any module depending on :integration_tests:agp or needing the TestActivity.

MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request Nov 10, 2024
This commit removes the `:integration_tests:agp` module.
Since the merge of robolectric#9778, it's no longer meaningful to have it.
utzcoz pushed a commit that referenced this pull request Nov 15, 2024
This commit removes the `:integration_tests:agp` module.
Since the merge of #9778, it's no longer meaningful to have it.
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.

2 participants