Purpose
The purpose of this test case is to ensure that a web form meets the functional requirements for a proper user experience.
It does not make any assumptions about your business requirements.
Preconditions
- The form is functional and ready for testing.
- The page it is on is accessible via a URL.
Specifications and Steps
- The initial state of the form should have no invalid warnings or error messages.
- When you fill out the fields, it is permissible for the form to warn you when you leave a field in an invalid state. It should not warn you while you are still typing in the field.
- It is also permissible for no warning to be shown until you attempt to submit the form.
- The form should give hints or instructions if it attempts to enforce specific formatting.
- All form fields should have visible labels. The labels should also be programmatically connected to their fields. When you click on a label, it should focus on that field and you should be able to begin typing.
- Ideally, the form should use autocomplete hinting for common fields related to name and address. Your browser should complete those for you automatically (this is dependent on your browser and if you’ve allowed it to save your contact information).
- Required inputs should be marked, or some instructions should indicate that all fields are required.
- Try navigating the form fields with your keyboard by using the Tab key to move to the next field, and Shift+Tab to move back. Note any failures.
- For testing purposes, leave at least one field in an invalid state.
- For more thorough testing, you’ll want to test both invalid inputs and empty inputs on all fields.
- For instance, try putting some information in an email field that is not an email, but also test the field being empty.
- When attempting to submit an invalid field and/or empty fields, the form should not submit, and the form should provide instructions on how to fix your errors.
- If the form is for lead collection, it is required that you get explicit consent to send marketing via email to the customer. This consent is usually in the form of a checkbox, and the checkbox should be unchecked in its initial state. The form being unchecked is NOT A VALIDATION ERROR. This checkbox cannot be “required”.
- Captcha functionality will vary, but note any Captcha-related errors you encounter.
- When the field is in a valid state, submit the form.
- Some forms may send their information and update the page you are on, while some forms will take you to a different page. Regardless of the functionality, any errors at this step should be detailed, and the test has failed.