[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-24ddc0f5d75046c5622901739e7c5dd533143b0c8e959d652212380cedb1ea36.svg)](https://classroom.github.com/a/k6Gf4phB) # InnoDrive - Problem The InnoDrive is a hypothetical autonomous driving car-sharing service that provides transportation means in the Kazan region created by the SQR graduates from Innopolis. The service proposes two types of cars __budget__ and __luxury__. The service offers flexible two tariff plans. With the “Minute” plan, the service charges its client by time per minute of use. The Service also proposes a “Fixed price” plan where the price is fixed at the reservation time when the route is chosen. If the driver deviates from the planned route for more than 10%, the tariff plan automatically switches to the “Minute” plan. The deviation is calculated as the difference in the distance or duration from the initially planned route. The “Fixed price” plan is available for budget cars only. The Innopolis city sponsors the mobility and offers a 10% discount to Innopolis residents. You are a member of the quality assurance team at InnoCar. You learned about input domain testing methods and would like to apply them to the billing application that charges the client when he or she completes the ride. > **Note:** the exact __tariffs__, __deviation %__ and __discount %__ will differ for your individual case see below. ## InnoDrive Service The InnoDrive app offers 2 services that can be accessed via the following URL https://innodrive.containers.cloud.ru: * `spec` - provides you with the specification for your individual problem * you_email is your IU e-mail address in all lowercase letters e.g. * `price` - calculate the price for a given ride. The possible input parameters are: * type={budget|luxury} * plan={fixed_price|minute} * distance=110 * planned_distance=100 * time=110 * planned_time=100 * inno_discount={yes|no} * the output is the price calculated according to the specification * In case of error, __406 Not Acceptable:__ is raised with the __Error code: Price == -1__ > **Note:** You can see the API and try the services at https://innodrive.containers.cloud.ru/docs > **Note:** Alternatively, the InnoDrive services are available at https://instructors.pg.innopolis.university/innodrive/ > > See the API documentation at https://instructors.pg.innopolis.university/innodrive/docs ## Practical Assignment Develop a comprehensive test suite to evaluate the system's functionality thoroughly. Afterwards, categorize each identified error in the list below, specifying whether it is a domain error (indicating failure to validate input within the acceptable range) or a computational error (indicating inaccuracies in outcome computation). > **Note:** Build you tests inside of `./tests/test_innodrive.py` [see the test file](./tests/test_innodrive.py) and __strictly__ follow the provided example. > **Note:** Ensure your test suite is designed to uncover all potential errors, not just those specific to your email scenario. **Email:** > **Note:** Make sure to replace the email with your Innopolis email ### 1. Domain Errors (4pt) Please replace each `no` with a `yes` for each parameter if it passes domain tests: * **Ride Type:** no * **Ride Plan:** no * **Distance:** no * **Inno Discount:** no * **Type Plan:** no * **Time:** no > **Note:** Type Plan here refers to checking the compatibility of ride type and ride plan ### 2. Computational Errors (4pt) Please replace each `no` with a `yes` for each parameter if it passes computational tests: * **Deviation:** no * **Discount Application:** no * **Discount Calc:** no * **Budget Min:** no * **Budget Km:** no * **Luxury Min:** no ### 3. Tests coverage (2pt) The effectiveness of your test suite will be assessed based on its ability to detect all the errors outlined previously. # Additional info * Service Open API [json](./openapi.json) * Swagger documentation and client ([API doc](https://innodrive.containers.cloud.ru/docs)) ## Swagger screenshots ### Services ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/a5efcc6b-7a7a-4fc6-b5d8-abbe66cad666) ### Spec service ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/ac9eae17-fb85-42a1-a3e8-713bd1f48338) ### Price service ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/c7bee4ab-6897-4b1f-8c44-ef848b5377f5) ### Example. Spec for i.ivanov@innopolis.university ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/324c17fe-0f38-437c-8346-85ecefa969c8) ### Example. Price for i.ivanov@innopolis.university ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/c945bff3-1f55-437e-bc56-e79b6336e707) ### Example. Error indication. (-1 for the price) ![image](https://github.com/QualityInUse/project-innodrive/assets/2123188/c1a56de0-9229-4686-8057-bac8402a5f67)