Logo: Relish

  1. Sign in

Project: Shop

view available slots for an assessment centre

As an administrator
I want to view available slots for an assessment centre
So that I can book an appointment for a claimant

A Bad Example

Scenarios show the behaviour of the service by showing examples. They are behaviour driven not procedural.

A bad example for BDD / Specification by Example would be:

Given I am logged in
And I am at the homepage
And I view the worklist
And I select a claimaint to book an appointment for
When I choose to book an appointment
Then I see the appointment calendar
And only available slots are displayed

The above is procedural - it has no example - it just expresses navigation through the system and some of the acceptance criteria in a funny way.

This may be useful to drive UI tests through selenium so has a place...but it's not BDD / Specification by Example...

A Good Example

I like to state the acceptance criteria at the beginning - which are also my scenario's (a bit like a Table of Contents)

Acceptance Criteria:

  • Can view available slots for different types of appointment
  • Can view available slots for different assessment centres
  • Can view available slots taking into consideration other bookings (no double booking)
  • Can view available slots and allow double double booking for an appointment type

NOTES:

  • Background statement are run before every scenario - they are useful for setting up test data....
  • Examples need to be explanatory, not exhaustive.
  • Scenarios should test one thing only - go with the golden rule - 1 scenario = 1 test...
  • It's good practice to include text in quotes so you know it's meant to be a paramter...if you don't do this in a statement then it won't be treated like a parameter so be consistent in the tables.
Background
Given
the following assessment centre
AC Days Times
"Five Ways" "Mon, Fri" "14:00 - 16:00"
"Tresco" "Tue, Thu" "14:00 - 16:00"
And
the following HCPs
HCP Days Times Skills
"Fred Smith" "Mon, Fri" "15:00 - 17:00" "Neuro"
"Dave Bloggs" "Thu, Fri" "14:00 - 16:00" ""
And
these HCPs are assigned to "Five Ways"
HCP
"Fred Smith"
"Dave Bloggs"
And
these HCPs are assigned to "Tresco"
HCP
"Dave Bloggs"
Scenarios
Can view available slots for different types of appointment
When
I view the "Five Ways" availability for "01/12/2017" to "07/12/2017"
Then
I see the following slots for "Five Ways" assessment centre
Date Time Duration Type
"01/12/2017" 14:00 60 "Standard"
"01/12/2017" 15:00 60 "Standard"
"01/12/2017" 15:00 60 "Neuro"
"04/12/2017" 15:00 60 "Neuro"
Can view available slots for different assessment centres
When
I view the "Tresco" avaliability for "01/12/2017" to "07/12/2017"
Then
I see the following slots for "Tresco" assessment centre
Date Time Duration Type
"07/12/2017" 14:00 60 "Standard"
"07/12/2017" 15:00 60 "Standard"
Can view available slots taking into consideration other bookings (no double booking)
And
the following appointments have already been made at "Five Ways"
Date Time Duration Type Claimant
"01/12/2017" 15:00 60 "Standard" "Sue Townsend"
"01/12/2017" 15:00 60 "Neuro" "Shirley Valentine"
When
I view the "Five Ways" availability for "01/12/2017" to "07/12/2017"
Then
I see the following slots for "Five Ways" assessment centre
Date Time Duration Type
"01/12/2017" 14:00 60 "Standard"
"04/12/2017" 15:00 60 "Neuro"
Can view available slots and allow double double booking for an appointment type
And
the following appointments have already been made at "Five Ways"
Date Time Duration Type Claimant
"01/12/2017" 15:00 60 "Standard" "Sue Townsend"
"01/12/2017" 15:00 60 "Neuro" "Shirley Valentine"
And
"Standard" appointments allow you to over book each HCP by 1
When
I view the "Five Ways" availability for "01/12/2017" to "07/12/2017"
Then
I see the following slots for "Five Ways" assessment centre
Date Time Duration Type
"01/12/2017" 14:00 60 "Standard"
"01/12/2017" 14:00 60 "Standard"
"01/12/2017" 15:00 60 "Standard"
"04/12/2017" 15:00 60 "Neuro"

Last published over 4 years ago by mjchave82.