4.9 KiB
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. i.ivanov@innopolis.university
-
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.pysee the test file 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: i.ivanov@innopolis.university
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: yes
-
Distance: yes
-
Inno Discount: no
-
Type Plan: no
-
Time: yes
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: yes
-
Budget Km: yes
-
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.