TestFinch

Test cases for forms and validation

A starting set of form and validation checks, as a spreadsheet, CSV or Markdown.

A starting point: adapt these to your app. These cases cover filling in and sending a form: required fields, limits, formats and error messages. They are generic, not full coverage of your app: remove what does not apply and add what is special about yours.

Download .xlsxDownload .csvDownload .md

14 cases, with a How to use tab in the .xlsx

Forms and validation: 14 cases
IDTitleTypeStepsExpected result
FRM-01Required fields left emptyNegative
  1. Leave every required field empty
  2. Send the form
Each required field shows a message next to it, and the form is not sent.
FRM-02Text at the maximum lengthBoundary
  1. Type exactly the maximum number of characters into a limited field
  2. Send the form
The form is sent and the full text is saved.
FRM-03Text one character over the maximumBoundary
  1. Type one character more than the maximum
  2. Send the form
The field stops at the maximum or shows a message. Nothing is cut short without telling the user.
FRM-04Letters in a number fieldNegative
  1. Type 'abc' in a field that takes a number
  2. Send the form
The field says it takes a number.
FRM-05An email in the wrong formatNegative
  1. Type 'name@example' in an email field
  2. Send the form
The field says the email is not valid.
FRM-06A valid form is sent oncePositive
  1. Fill in every field correctly
  2. Select Send twice, quickly
One submission is recorded, and a confirmation shows.
FRM-07What was typed is kept after an errorPositive
  1. Fill in the form with one invalid field
  2. Send the form
Only the invalid field shows an error, and everything else typed is still there.
FRM-08Errors are announced and reachablePositive
  1. Turn on a screen reader, or use only the keyboard
  2. Send the form with one field in error
Focus moves to the first error or a summary, and each message is read out with its field.
FRM-09Characters beyond plain EnglishBoundary
  1. Enter a name such as 'Zoë Ångström' or '山田太郎'
  2. Send the form and open the saved record
The name is saved and shown exactly as typed.
FRM-10HTML in a text field is shown as textNegative
  1. Type '<b>bold</b>' in a text field
  2. Send the form and view the saved value
The text shows as typed, with the angle brackets, and is not turned into formatting.
FRM-11Spaces only in a required fieldBoundary
  1. Type only spaces in a required field
  2. Send the form
The field is treated as empty and asks for a value.
FRM-12An impossible dateNegative
  1. Enter 31 February in a date field
  2. Send the form
The field says the date does not exist.
FRM-13Keyboard onlyPositive
  1. Use Tab to move through every field and button
  2. Press Enter or Space on the send button
Focus moves in a sensible order with a visible outline, and the form is sent.
FRM-14Cancel discards the changesPositive
  1. Change some fields
  2. Select Cancel, and confirm if asked
The changes are not saved, and the form shows the earlier values when opened again.

FlowQA's agent explores your site, writes the tests and runs them after every deploy, so you stop running them by hand. Free to start.

Try FlowQA free

A starting point: adapt these to your app. This page lists 14 test cases for forms and field validation, each with numbered steps and an expected result, and gives them to you as an Excel workbook, a CSV file or Markdown.

How to use it#

  1. Read the cases on this page. Each is marked Positive (the normal path), Negative (wrong input or a refused action) or Boundary (at or just past a limit).
  2. Select Download .xlsx for a workbook with a How to use tab and a tab of the cases, with Status set to Not run and blank rows for your own.
  3. Or select Download .csv to import the cases into another tool or a shared sheet, or Download .md to paste them into a wiki, a pull request or a test plan.
  4. Remove what does not apply to your app, change the steps to match your screens, and add what is special about yours.

What the cases cover#

Required fields left empty or holding only spaces, text exactly at a field's maximum length and one character over it, letters in a number field, an email in the wrong format and an impossible date. They check that a valid form is sent once even when the button is pressed twice, that what was typed survives an error, and that names such as Zoë Ångström or 山田太郎 are saved exactly. Text that looks like HTML must show as text. Errors must be announced to screen readers and reachable from the keyboard, and Cancel must discard changes.

Why these matter#

Forms are where users give you data, so their faults turn into bad records, double orders and support tickets. Validation that only works for typical input fails the people with long names, other alphabets or a screen reader. Writing them down once, with expected results someone else can check, turns a quick look before a release into a repeatable check.

What they do not cover#

These are generic cases. They do not know your app's rules, its other ways in, or its edge cases, so they are not full coverage. Read each expected result against how your app is meant to behave: some apps deliberately differ, and that is a decision to confirm, not a failure.

Questions#

Do these cover every form case?#

No. They are a starting point; adapt them to your app.

Can I edit them?#

Yes. Download the spreadsheet or the Markdown and change anything.

Is this free?#

Yes, with no account. Use the cases in your own plans and tools.

Can these run automatically?#

Not from this page; they are written for a person to follow. Each one is specific enough to automate later with the test tool your team uses.