nowinandroid
nowinandroid copied to clipboard
TestFixtures refactoring
Support for Kotlin TestFixtures on Android modules was added in AGP 8.5.0!
A lot more cleanup could be done, especially on test classes that redefine over and over again topics, newsResources, etc.
This is a new take on this PR:
- https://github.com/android/nowinandroid/pull/452
To close this issue from 2022:
- https://github.com/android/nowinandroid/issues/451
The main changes are split by commits:
- AGP 8.5.0 update with
enableTestFixturesKotlinSupportflag :core:data-test,:sync:testand:core:datastore-testhave been merged as testFixtures sourceSet of their respective module.:core:testingcontent has been migrated when possible to already existing modules.:sync:workhas been move to it's parent:syncmodule that was previously empty.
- [ ] Regenerate graphs
- [ ] Wait for
android.experimental.enableTestFixturesKotlinSupportto promote from experimental? - [ ] Wait for KSP on testFixtures?
This PR has a lot of conflicts. Do you want to continue and resolve these, @SimonMarquis ?
@keyboardsurfer yes, I'd love to see this integrated in the repository at some point (the initial PoC was on Nov 19, 2022 😅). But before I re-start working on this and fix conflicts, can you tell me if this is definitely something that will be merged in the repository or not? Thanks
Good to hear that you're interested in picking this back up again. @JoseAlcerreca can you chime in on the likelihood of this PR being integrated into main?
Just to add my 2 pence, I am strongly in favour of anything that tidies up our test architecture and TestFixtures seems to do that.
Just to add my 2 pence, I am strongly in favour of anything that tidies up our test architecture and TestFixtures seems to do that.
Does that mean "yes", or "maybe"? 😅