Planning and prioritizing features in given-when-then with generative AI
Once your problem statement and intended outcome is well defined. You'll want to create and prioritize the features that will be included in the bicycle rental application.
This involves breaking down the user stories into smaller tasks and estimating the time and effort required to complete each task. Features should be prioritized based on their importance to the customer and their impact on the overall project.
Test-driven feature development is one the best ways to write and identify features for an application.
Given-When-Then is a testing framework that helps to write and organize automated tests by breaking them down into three distinct parts:
Given: The setup or precondition for the test.
When: The action or event being tested.
Then: The expected outcome or result of the test.
This approach helps to create more readable, reusable, and maintainable test cases by making them easier to understand and debug. In the same way this is used to write test cases, we will use it to write the basis of our features.
Example features of a bicycle rental application web app using Given-When-Then:
Feature | Given | When | Then |
---|---|---|---|
While the above provides a great starting place for the core features of our app, it needs further refinement. To refine these features further, we will turn them into user stories.
User Registration
A user is on the registration page
The user enters their details and submits the form
The user should be redirected to the login page
Search Bicycles
A user is on the homepage
The user enters a location and a date range to search for available bicycles
The user should see a list of available bicycles with details such as location, type, and price.
Rent Bicycle
A user has selected a bicycle to rent
The user enters the rental duration and completes the payment process
The user should receive a confirmation email with the rental details and instructions.
Return Bicycle
A user has rented a bicycle
The rental duration has ended, and the user returns the bicycle to the designated location
The user should receive a notification confirming the return and the rental charges should be deducted from their account.