Parking Cost Calculator App - Practice Test Automation
Reservation details
Parking Rates
Valet Parking
- 18€ per day
- 12€ for five hours or less
Short-Term (hourly) Parking
- 2.00€ first hour; 1.00€ each additional 1/2 hour
- 24.00€ daily maximum
Long-Term Garage Parking
- 2.00€ per hour
- 12.00€ daily maximum
- 72.00€ per week (7th day free)
Long-Term Surface Parking
- 2.00€ per hour
- 10.00€ daily maximum
- 60.00€ per week (7th day free)
Economy Lot Parking
- 2.00€ per hour
- 9.00€ daily maximum
- 54.00€ per week (7th day free)
Note:
A Lost Ticket Fee of 10.00€ will be assessed when the original parking
stub cannot be produced when exiting the parking facilities (does not
apply to Valet Parking).
The intention of this page demo is not create the best parking cost calculator in the world. We want the simplest parking cost calculator in the world so we can focus on Behavior Driven Development (BDD) and Test Driven Development (TDD) practice
You can use any BDD tool/lib to support the BDD process. A lib like Cucumber or SpecFlow can be a good option for this demo.
BDD Requirements
Imagine we were to design a parking cost calculator that calculates the price of parking tickets at the airport. There could be different parking sites like
- Valet Parking
- Short-Term Parking
- Long-Term Garage Parking
- Long-Term Surface Parking
- Economy Lot Parking
With each site having its own set of rules how a ticket price is calculated:
Valet Parking
- 18.00€ per day
- 12.00€ for five hours or less
Short-Term Parking
- 2.00€ first hour; 1.00€ each additional 1/2 hour
- 24.00€ daily maximum
Long-Term Garage Parking
- 2.00€ per hour
- 2.00€ daily maximum
- 72.00€ per week (7th day free)
Long-Term Surface Parking
- 2.00€ per hour
- 10.00€ daily maximum
- 60.00€ per week (7th day free)
Economy Lot Parking
- 2.00€ per hour
- 9.00€ daily maximum
- 54.00€ per week (7th day free)