lab-input-maksktl created by GitHub Classroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
github-classroom[bot] b246ca8115
GitHub Classroom Feedback
2 years ago
.github GitHub Classroom Feedback 2 years ago
tests Initial commit 2 years ago
.gitignore Initial commit 2 years ago
README.md Initial commit 2 years ago
openapi.json Initial commit 2 years ago

README.md

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

  • 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 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: 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

  • Swagger documentation and client (API doc)

Swagger screenshots

Services

image

Spec service

image

Price service

image

Example. Spec for i.ivanov@innopolis.university

image

Example. Price for i.ivanov@innopolis.university

image

Example. Error indication. (-1 for the price)

image