HIRE US

Let us help you with your Drupal requirements

To prevent automated spam submissions leave this field empty.

A contact form is included with websites mainly with an intention to allow users to communicate with the site administrator, sharing their feedback/messages regarding the website or reaching out to the business owner of the site for services / support. In this article I have covered a set of test cases that can be used to test the Drupal site contact form.

In Drupal you can limit the number of submissions that can be accepeted from an IP within an hour. Further submissions within that time period will not be accepted by the system. See the attached contact form.

contact form example

These are the default fields found in a default drupal contact form along with the captcha. Following are its test cases/checklists:

  1. Ensure that an error message is displayed on submitting the form by leaving the mandatory fields empty. Expected error messages for the above example is:
    • "Your name field is required."
    • "Your e-mail address field is required."
    • "Subject field is required."
    • "Message field is required."
    • "Math question field is required."

Name field:

  1. Ensure that the system accepts valid name. For example: a name "@run" which when given in the field will be accepted.
    By default text fields in drupal accepts alphanumeric values. If the field is customized, then test accordingly.
  2. Ensure that the system rejects the invalid name (input:*##456456@#).

E-mail field:

  1. Ensure that the system accepts valid e-mail ids. For example; an id: tester@example.com should be accepted.
  2. Ensure that the system rejects invalid e-mail ids. For example; inputs "tester@example", "tester.example@com" should not be accepted.

Subject field:

  1. Ensure that the system accepts the valid subject. Usually all alphanumeric entries will be accepted. If there is any other specifications like character limits etc, check that as well.

Message field:

  1. Ensure that the system accepts valid messages. Usually all alphanumeric entries will be accepted. If there is any other specifications like character limits etc, check that as well.

Captcha field:

  1. Ensure that the system accepts valid captcha.
  2. Ensure that the system rejects the invalid captcha.
  3. Ensure that the captcha code resets as the system reloads.
  4. Ensure that the captcha changes as the user enters wrong value.

Submit button:

  1. Ensure that the spelling and position of the button is correct.
  2. Ensure that the button is clickable.
  3. Ensure that on submitting a valid form,the value get saved and administrator receives the same.
  4. Ensure that the administrator receives the contact form at the email address which has been configured. The administrator can set/edit email id on Contact form by selecting the contact form from administrator menu bar - Menu » Site Building » Contact form » List.

Happy testing :)..

Post your comments / questions