Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about test structure. #163

Open
wearhere opened this issue Mar 30, 2014 · 0 comments
Open

Add documentation about test structure. #163

wearhere opened this issue Mar 30, 2014 · 0 comments

Comments

@wearhere
Copy link
Contributor

The current documentation does a pretty decent job of describing what test cases can do: use SLElements to manipulate the UI; use app hooks to manipulate the app.

What we're lacking is guidance as to how tests can and maybe ought to be structured, things like:

  • Elements used by multiple cases can be test ivars.
  • Don't put tear-down work after assertions, lest they fail and the work be skipped--it should go in -tearDownTest or -tearDownTestCaseWithSelector:.
  • Use abstract classes to consolidate set-up and tear-down work.
  • Make tests handle their own set-up and tear-down, so they can be run independently (i.e. by focusing) and to flush out test pollution.
  • It may not be possible to tear-down/undo some changes using the UI, but that's what app hooks are for (read: how to avoid ordering your tests).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant