Using a sharedTest folder is no longer the recommended approach to sharing code between unit and instrumented tests. It's also pretty confusing in the Project explorer -> Android view to see where to add a new test, since the sharedTest folder just shows up as a duplicate "test" folder:
Note that after #911 is merged MainCoroutineRule will show in red inside TasksDaoTest as the indexer won't index the sharedTest folder. This is another reason to create a separate test module.
Using a
sharedTest
folder is no longer the recommended approach to sharing code between unit and instrumented tests. It's also pretty confusing in the Project explorer -> Android view to see where to add a new test, since thesharedTest
folder just shows up as a duplicate "test" folder:Suggest implementing the recommendation from https://b.corp.google.com/issues/232420188#comment19 which is to create a module containing shared test code. This results in a clearer structure: