TestFinch

Functional test template

A functional test template with worked examples: one row per behaviour, each tied to its requirement.

Functional tests check that each feature does what its requirement says, one behaviour per row, including what should happen when input is wrong. Link each row to the requirement it covers. Examples are for an example online shop; replace them with your own app's.

Download .xlsxDownload .csvDownload .md

6 examples and 25 blank rows, with a How to use tab in the .xlsx

Functional: 6 worked examples
IDRequirementTitlePreconditionsStepsExpected resultPriorityStatus
FUN-01Users can save items to a wishlistSave an itemSigned in
  1. Open a product
  2. Select Save to wishlist
The button changes to Saved, and the item appears in the wishlist.HighPassed
FUN-02Users can save items to a wishlistRemove an itemAn item in the wishlist
  1. Open the wishlist
  2. Select Remove on the item
The item disappears from the wishlist.MediumPassed
FUN-03Users can save items to a wishlistSaving needs an accountSigned out
  1. Open a product
  2. Select Save to wishlist
The sign in page opens, and after sign in the item is saved.MediumFailed
FUN-04Quantities from 1 to 10 per itemThe lowest quantityA product in the cart
  1. Set the quantity to 1
The quantity is 1 and the total is the unit price.MediumPassed
FUN-05Quantities from 1 to 10 per itemAbove the highest quantityA product in the cart
  1. Type 11 in the quantity box
The box shows a message that the most is 10, and the total does not change.HighPassed
FUN-06Quantities from 1 to 10 per itemZero is refusedA product in the cart
  1. Type 0 in the quantity box
A message asks for at least 1, or the item is removed after a confirmation.MediumNot run

FlowQA's agent explores your site and writes cases like this one as tests, keeping each only once it has passed twice and failed on a deliberately broken page. Free to start.

Try FlowQA free

The manual case

SMK-02 A registered user can sign in

  1. Open Sign in
  2. Enter a test account's email and password
  3. Select Sign in

Expected: the account page opens with the user's name.

The FlowQA test

account/sign-in

  1. navigate "/sign-in"
  2. fill "Email" with "mia@acme.example"
  3. fill "Password" with "••••••••"
  4. tap button "Sign in"
  5. assert url matches "/account"
  6. assert text "Mia Chen" is visible

An illustration with sample data.

A functional test checks that a feature does what its requirement says, one behaviour per row, including what should happen when the input is wrong. A functional test case template is the sheet those rows go in, with each row tied to the requirement it covers. The table above is that template with six worked examples for an example online shop, and you can download it as an Excel workbook, a CSV file or Markdown.

How to use it#

  1. Read the examples above. Each row quotes the requirement it covers, so a requirement with no rows stands out.
  2. Select Download .xlsx for a workbook with a How to use tab, the examples and 25 blank rows, or Download .csv to import the rows into another tool.
  3. Copy each requirement into the Requirement column, then write a row for every behaviour it describes, the refusals included.
  4. Run the rows when the feature is built and again when it changes, and set Status as you go.

What each column means#

Column What goes in it
ID A short, unique reference, so a result or a bug can point at this row.
Requirement The requirement, story or acceptance criterion the row covers, so gaps in coverage show.
Title A short name for the check, readable in a list.
Preconditions What must be true before the first step: who is signed in, what data exists, which page is open.
Steps What to do, one numbered action per line, written so someone new to the app can follow them.
Expected result What should happen if the app works. Write something you can see or check, not 'works correctly'.
Priority How much it matters if this fails: High, Medium or Low. Run High first when time is short.
Status The result of the last run: Not run, Passed, Failed or Blocked.

From a requirement to rows#

The examples take two requirements and turn each into several rows. "Users can save items to a wishlist" becomes saving an item, removing it, and what happens when someone signed out tries to save one. "Quantities from 1 to 10 per item" becomes the lowest quantity, a number above the highest, and zero. Write one row at each limit and one row past it before you write rows for the middle. One example row failed: saving an item while signed out, the case the requirement says least about.

Writing good rows#

Keep one behaviour per row, so a failure points at one thing. Write expected results you can check, such as "the button changes to Saved", never "works correctly". When a requirement is unclear, write the row anyway and ask.

Functional testing vs integration testing#

A functional test checks one feature against its own requirement: the wishlist saves an item. An integration test checks a hand-off between systems: the shop takes a payment and the payment provider records the same amount. A feature can pass every functional row and still fail where it meets another system. A feature that calls a payment, email or stock service needs rows in the integration test template as well. Types of software tests places both beside smoke, regression and end-to-end tests.

Questions#

What is a functional test case template?#

A sheet with one row per behaviour of a feature, with columns for the requirement, the preconditions, the steps, the expected result, a priority and a status. The template on this page has eight columns and six filled rows.

What should a functional testing template include?#

The requirement each row covers, steps a newcomer can follow, an expected result that can be seen on the page, and rows for wrong input as well as the normal path.

How many rows does a requirement need?#

At least one for the normal path and one for each way it can be refused or reach a limit.

Is the template free?#

Yes. Download it without an account and use it in your own plans and tools.

Will these examples fit my app?#

No. They are for an example online shop. Replace them with your own requirements and keep the columns.