Hello Xcode Users,

I am new to UI testing/automation. I intend to use an Xcode UI Testing bundle 
to automate UI testing for my app. 

As always, the WWDC examples are always super simple cases, so I have some 
questions about UI Testing which hopefully someone can help me with.
Backdoor: Is it standard/good practise to program in a “back door” to setup 
some initial state the app should be in? For example:
Some test scenarios I have been given start with “given the user is not logged 
in…” - Of course I persist some data when the user logs in, so I guess I would 
need to have UI Test path going to a logout screen and optionally logout if the 
user is logged in. Is this what is recommended?
I have a “what’s new” splash screen, which is shown only once per app version. 
If I want to UI Test this, I would need to either reinstall the app each time, 
or somehow reset the user defaults to bypass the flag which I had set when the 
screen was first seen. What approach would be recommended?
Stubbing: I have a lot of data coming into the app via an external API service, 
it’s a travel app so I need to be aware that my UI Tests could fail if I did a 
train times search at 3am, if I tested that I have some train times coming 
back, my test would fail; so, is stubbing network tasks recommended for UI 
tests? Or is the point to test this app “in the wild”? Again if I did want to 
stub then I would probably begin to need to bundle stub responses within my 
apps bundle (given the intension of using continuous integration, I would end 
up shipping stubs within my binary). I don’t suppose this is recommended.
I guess there’s a fine line between a UI Test and an Integration Test, and 
probably this means that I should probably provide stubbed network responses 
for certain tests. But this must mean I cannot (or should not) have a single 
binary, which has the knock on effect of hindering my companies continuous 
delivery requirement.

Any thoughts welcome on this. 

Thanks
- Daniel
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to