Allow preloading custom application data for UI Tests

Number:rdar://28776130 Date Originated:14-Oct-2016 07:17 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8.0
Classification:Enhancement Reproducible:Always

Xcode allows preloading of custom application data in form of a .xcappdata file in the scheme editor. This is true for both the Run and Test actions. Adding a custom .xcappdata data file however doesn’t work in the context of a UI Testing bundle. The set test data simply does not show up in the main application. 

Steps to Reproduce:

Set an appropriate .xcappdata file to a Xcode UI Testing scheme as shown in the attached screenshot. Run the UI test.

Expected Results:

The provided data from the .xcappdata file would used in the tested app. 

Actual Results:

The app is not modified in any way. 


Xcode 8.0. Did also not work with Xcode 7. The results are the same, regardless of the selected simulator / device. 


Similar reports:

The feature would be important to allow consistent test data for UI Tests and automated screenshot gathering. A possible workaround would be to modify the main application to provide appropriate test data when the application detects its being launched in a testing environment, however this makes it difficult to keep test data separate from the main application bundle. Testa data inside the main application data increases the app bundle size and is thus something we would like to avoid.


Me too

This is still broken on Xcode 9


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!