Best Practices for Handling Acceptance Criteria

January 10th, 2022 by inflectra

We had a customer ask us what was the recommended way to manage the Acceptance Criteria of requirements in a project. There are actually several different ways you can handle acceptance criteria depending on your exact process (and preference):

  1. You can simply add a custom Rich Text Description textbox to the Requirement artifact. That will appear underneath the main description.
  2. You can use a requirement of type Acceptance criteria and make it a 'Has Steps' type so that you could enter the acceptance checklist as steps.
  3. You create a .Feature file in the documents section and link to the requirement. That way you get the automated Gherkin syntax highlighting.
  4. You can use a test case of type Acceptance Criteria and use the test steps.

We discuss each of these options below:

Overview

First, imagine you have the following user story that you want to write acceptance criteria for:

As a writer, I want to receive notifications when others add comments so that I am up-to-date.

In Spira you will represent this as a requirement of type user story:

user story in Spira

Now you want to add the acceptance criteria to the user story. Here's some different ways you can write the user story:

  1. Given I don't have app open when my phone is locked then I should receive a banner notification.
  2. Given I have the app open when I am writing on the doc then the bell icon should update to show unread notifications with count.
  3. Given a user was mentioned in a comment using @ mention when the mentioned user is reading the comments then a flash message should show up on the same comment thread with a message notifying about the new comment.

1. Custom Rich Text Property

The simplest option is to just add a custom Rich Text property to the User Story requirement artifact:

requirements custom property dialog box

That will appear underneath the main description:

requirements page with acceptance criteria text box

2. Requirement Type with Steps

Another option would be to use a separate requirement to store the acceptance criteria. You can use a requirement of type Acceptance Criteria and make it a 'Has Steps' type so that you could enter the acceptance checklist as steps.

requirements types

Then you can enter in the Acceptance Criteria into this requirement  as steps:

acceptance criteria steps

You can then link to the user story using the Associations feature:

requirement associations between user story and acceptance criteria

You can also see the relationship in the mind-map view:

requirements mind map view

3. Gherkin BDD Feature File

Another option is to create a .Feature file in the Documents section and link to the requirement as an Attachment:

add new feature file

That way you get the automated Gherkin BDD syntax highlighting:

BDD feature file with highlighting

You can now link this to the requirement as an attachment:

associate Gherkin file with user story

3. Test Case Type with Steps

Finally, you can use a test case of type Acceptance Criteria and use the test steps to reflect the acceptance criteria:

test case as acceptance criteria

Then the Test Coverage tab is used to link this test case to the original user story:

test case as acceptance criteria

acceptance criteria requirements test cases best practices

Spira Helps You Deliver Better Software, Faster.

Get Started with Spira for Free

And if you have any questions, please email or call us at +1 (202) 558-6885

Free Trial