Sanity tests by name suggests the case that validate if the application is sane. For example in context of sign up of a website, you may have the following tests as sanity:
- Sign up option is available on login page.
- Clicking "Sign up" redirects to proper , sign up form.
- Clicking Sign in does not re-direct to "Sign up" form.
- Submitting "Sign up" form goes successful, with out crash.
- User signed up, is able to login.
The above are more then enough for a sanity test. But for detailed testing you may include following tests in addition to the above one.
- Signing up again, with same user id, is not allowed.
- injection is restricted.
- Once signed up, user is allowed to sign in from multiple devices / browsers, without need to sign up again.
- Cancelling mid-way sign up(half-filled form), is allowed.
- Only the mandatory fields in form(if blank) should block the sign up.
- Blank form sign up should not be allowed.