XCUITest: How to set a specific state when creating iOS UI Tests for an app using GraphQL?

I'm new to iOS development. My question is how can I send data to my API so that I can set a state in iOS. For example if I have an app that can create and delete contacts. How can I send data to the API so that if I want to test just deleting a contact when I launch the test a contact has already been created so that I can just test deleting it? My app uses a GraphQL API. I tried calling the function that creates contacts by hardcoding the data needed and putting the function within a launch argument then using that launch argument in my test but that doesn't seem to work. So I'm not sure if this is possible to do within xcuitest. Any suggestions?



Read more here: https://stackoverflow.com/questions/68459961/xcuitest-how-to-set-a-specific-state-when-creating-ios-ui-tests-for-an-app-usin

Content Attribution

This content was originally published by user2415183 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: