- Newest
- Most votes
- Most comments
When you upload extra data to AWS Device Farm using the EXTERNAL_DATA type, the files become accessible during your test run. Here's how you can access these files on Android and iOS devices:
For Android: The extra data files are extracted to external storage on the device. You can access them using the environment variable EXTERNAL_STORAGE. The path to your files would typically be:
$EXTERNAL_STORAGE/extra_data/
For iOS: The extra data files are extracted to the app's sandbox. You can access them within your app's bundle. The path to your files would typically be within the app's Documents directory.
To access these files in your app's upload feature:
-
For Android, you can use the EXTERNAL_STORAGE environment variable to construct the path to your extra data files.
-
For iOS, you can use NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) to get the path to the Documents directory, then append the path to your extra data files.
When your test runs, Device Farm will automatically extract the contents of your extra-data.zip file to these locations. You don't need to manually specify the path in your schedule-run command beyond what you've already done with the --extraDataPackageArn parameter.
In your app's upload feature, you should implement logic to check for and access these directories based on the platform (Android or iOS). This way, your app can locate and use the extra data files during the test run.
Sources
ScheduleRunConfiguration - AWS Device Farm Documentation
Adding extra files to your test package in Device Farm - AWS Device Farm
Relevant content
- asked 22 days ago