How to test Fragments in a module which has no activityfrom the CommonsWare Community archives
At February 20, 2020, 10:01am, islam.farid2100 asked:
I am working in a module that provide some needed fragments which will be used in Activity from the app module. Therefore, I need to do some UI test and also need to test the fragments view models. There will be also End to End test in the app module, but I want to do unit and UI test inside my module too. Should I create a Dummy Activity, please provide me an example to learn and follow.
At February 20, 2020, 12:16pm, mmurphy replied:
Depending on your situation,
FragmentScenario may be sufficient. It uses a library-supplied generic activity for use in testing a fragment.
Sorry, but I do not have anything available for you.