January 10th, 2022 by Adam Sandman
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):
- You can simply add a custom Rich Text Description textbox to the Requirement artifact. That will appear underneath the main description.
- 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.
- You create a .Feature file in the documents section and link to the requirement. That way you get the automated Gherkin syntax highlighting.
- 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:
Now you want to add the acceptance criteria to the user story. Here's some different ways you can write the user story:
- Given I don't have app open when my phone is locked then I should receive a banner notification.
- 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.
- 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:
That will appear underneath the main description:
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.
Then you can enter in the Acceptance Criteria into this requirement as steps:
You can then link to the user story using the Associations feature:
You can also see the relationship in the 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:
That way you get the automated Gherkin BDD syntax highlighting:
You can now link this to the requirement as an attachment:
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:
Then the Test Coverage tab is used to link this test case to the original user story: