I am doing GUI tests for my network application and I'm wondering if I should stub out mock responses, or if it's OK to keep using the network for the GUI tests.
It seems to me the main benefits of stubbing the responses are:
- Robustness - no false errors because of network problems
And the cons are:
- Server interaction (real world) - doesn't test this
- Time to implement and maintain mock up (for a large application)
Are the pros worth the cons? Are GUI tests about testing the actual application and if it runs for a real user connected to the server, or are they more similar to regular unit tests, but for the GUI - are they just trying to test the GUI and don't care about server interaction.
This question specifically relates to GUI tests, not regular unit tests, and is questioning the value of stubbing mock responses in the GUI tests vs. using the server normally.