LaunchArguments and LaunchEnvironment cannot be set in UI Tests
| Originator: | d4rkf1br3 | ||
| Number: | rdar://25671561 | Date Originated: | 12/04/2016 |
| Status: | Closed | Resolved: | Developer problem |
| Product: | Xcode 7.3 | Product Version: | 7.3 |
| Classification: | Bug | Reproducible: | Always |
Summary: See UI tests in attached project. Basically I'm trying to set launchArguments and launchEnvironment in a UI test. Documentation for this seems to be very light, but searching the inter webs has surfaced two techniques. Both of which fail. Apple's documentation says that these can be set in code, but after setting the values are still empty. Steps to Reproduce: Expected Results: Values should be assigned and be able to be read by the app as it starts up. Actual Results: API appears to ignore any values that are set and when queried, returns an empty array or dictionary. Version: 7.3 Notes: Configuration: Xcode 7.3 Attachments: 'LaunchDebug.zip' was successfully uploaded. Just confirmed that arguments and environmental values set on the scheme are NOT passed through to the app when UI testing. This is probably part of the same bug. Update: -------- Problem was my misunderstanding of how to use XCUIApplication(). it should only be used once.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!