In my androidTest/resources
directory I have a few hundreds of images. I want to read all of them in a loop and test against specific function. I don't want to use their names, as often I don't know them. Is there any possibility to load by regex or iterate through the directory?
Asked
Active
Viewed 21 times
0

dragon7
- 1,057
- 9
- 23
1 Answers
0
I found a solution. Change the name of directory from resources
to assets
and then use InstrumentationRegistry.getInstrumentation().context.resources.assets.list("")

dragon7
- 1,057
- 9
- 23