Test Case For Contact Form: 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.
Why do we need a Contact Form for WordPress Website?
A page on a website that allows users to communicate with the site owner. The page has fields for filling in name, address, and type of comment. On most company websites, email and mailing addresses are also included; however, the contact form provides an immediate, convenient way for users to ask the company questions.
|Post On:||Test Case For Contact Form|
|Post Type:||Test Case Example|
|Applicable For:||Freshers & Experience|
|Join Here:||SoftwareTestingo Group Link|
If we see most of the websites all over the world, then you can notice there is around 40% of websites or blogs are created by using WordPress CMS. To create a contact form for WordPress there are somany popular WordPress plugins are there.
Test Case For Contact Form
you can limit the number of submissions that can be accepted from an IP within an hour. Further submissions within that time period will not be accepted by the system. See the attached contact form.
These are the default fields found in a default drupal contact form along with the captcha. Following are its test cases/checklists:
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
- The subject field is required
- Message field is required
- The math question field is required (Or Captcha)
Test Case For the Name field
- Check is the name accept valid names.
- Check if the user enters an invalid name then is the warning message is displaying or not. For example, the name “@run” which when given in the field will be accepted.
- Check the name fields that accepts the alphanumeric values. If the field is customized, then test accordingly.
- Check is the system rejects the invalid name (input:*##456456@#).
Test Case For E-mail field
- Check is the email field allows valid e-mail ids. For example; an id: email@example.com should be accepted.
- Check is the warning or error message is displaying on entering the invalid e-mail ids. For example; inputs “tester@example”, “tester.example@com” should not be accepted.
Test Case For Subject field
Check is the system accepts the valid subject. Usually, all alphanumeric entries will be accepted. If there are any other specifications like character limits etc, check that as well.
Test Case For Message field
Check is the system accepts valid messages. Usually, all alphanumeric entries will be accepted. If there are any other specifications like character limits etc, check that as well.
Test Cases For Captcha field
- Check is the system accepts valid captcha.
- Check is the system rejects the invalid captcha.
- Check is the captcha code resets as the system reloads.
- Check is the captcha changes as the user enters the wrong value.
Test Cases For Submit button
- Check is the spelling and position of the button are correct.
- Check is the button is clickable.
- Check on submitting a valid form, the value gets saved and the administrator receives the same.
- Check is the administrator receives the contact form at the email address which has been configured.