This is an evolution of Test Driven Development that focuses on the app functionality requirements more than implementation details. There are different interpretations of what this might mean, but I have found value in these tenets:
The video that talks more in depth about behavior driven development, as well as walks through the app example below, can be found at the following link:
https://www.youtube.com/watch?v=pOUk65RtNYM
To showcase this process, we will create an app that does the following:
- Has an endpoint called
/teammates
that supports GET and POST only- The POST endpoint creates a new teammate object and stores it in AWS DynamoDB
- The POST endpoint supports a body that with a
first_name
,last_name
, andage
.first_name
must not be empty.last_name
must not be empty.age
must be a number between 18 and 99.
- The GET endpoint returns an object with a list of
teammates
containing all created teammates.- Teammate will have the fields:
first_name
last_name
preferred_name
age
- The list will return alphabetically by
first_name
- Teammate will have the fields:
- When creating a teammate, consume an API at
https://preferredname.com
that will give you any preferred names for the first name sent in. Preserve the preferred name if it exists.
There is a branch named completed
that will have a working example of what this exercise could look like when completed.