testingautomationtestcasemanual-testing

Sanity Test Case Writing


What is the difference in writing test cases and writing Sanity test cases for sign up of any website? Could anyone please let me understand by giving few test cases or example of Sanity test cases for sign up page of any website?


Solution

  • 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:

    1. Sign up option is available on login page.
    2. Clicking "Sign up" redirects to proper , sign up form.
    3. Clicking Sign in does not re-direct to "Sign up" form.
    4. Submitting "Sign up" form goes successful, with out crash.
    5. 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.

    1. Signing up again, with same user id, is not allowed.
    2. Sql injection is restricted.
    3. Once signed up, user is allowed to sign in from multiple devices / browsers, without need to sign up again.
    4. Cancelling mid-way sign up(half-filled form), is allowed.
    5. Only the mandatory fields in form(if blank) should block the sign up.
    6. Blank form sign up should not be allowed.