Thursday, October 6, 2011

More robust verification

Fragile: relying on certain behavior between action and response, and using this to know when to validate the response

Better: make no assumptions about the behavior. Instead, continuously check for a valid response for a reasonable amount of time.

e.g.:

Fragile:
- perform action
- wait for loading ui (if the devs change or remove loading ui, this will break)
- validate response

Better:
- perform action
- check for valid response
- wait a second or two
- check again...for 5-10 seconds

The second is only invalidated if the response changes (less likely). The former is invalidated if the loading UI changes (apparently, any time the PM/devs get bored).

No comments: