Skip to content

Instantly share code, notes, and snippets.

@enriquesanchezb
Last active April 2, 2019 16:58
Show Gist options
  • Save enriquesanchezb/cad8cd49e87e9f8dbc5114433e2c6446 to your computer and use it in GitHub Desktop.
Save enriquesanchezb/cad8cd49e87e9f8dbc5114433e2c6446 to your computer and use it in GitHub Desktop.
QAbify Challenge 2019

Here at QA we like to use different apps and technologies (such as bots) to integrate them in our tests. For this exercise, we will simulate the process of ordering a cab using a messaging client (i.e. Slack, Telegram ...)

We have developed a service to allow us knowing which taxis are in a given city, as well as the status and position of each one of them.

This service is deployed at http://130.211.103.134:4000/api/v1/, and exposes the following endpoints:

GET /taxis -> Returns all the taxis in the system
GET /taxis/<city>/ -> Returns all the free taxis in the city
GET /taxis/<city>/<taxi_id> -> Returns the information of a taxi

That last endpoint also allows you to reserve taxis for a while (random up to 10 seconds) using the following call:

POST /taxis/<city>/<taxi_id>
{state: hired}

If the requested taxi is available the service will respond 200 OK, and 403 FORBIDDEN if that's not the case.

Note: We know we have some issues related with the API. We would really appreciate if you find and report any of them to us!

What do you have to do?

You have to develop a bot for a messaging platform (Slack, Telegram ...) that allows a user to request THE NEAREST AVAILABLE TAXI TO A CONCRETE LOCATION.

Considerations

  • You can use Ruby, Python, Java, nodeJS, GO or Elixir.
  • You must define which commands will be used to request the taxi, and to validate that is has been correctly ordered.
  • It is important that the project includes a comprehensive test suite that validates any acceptance criteria you consider necessary. (NOTE: Our API is tested for us, we don't need you test it again but be sure you are testing YOUR code)
  • This suite must also provide consistent results (keep in mind that the service is public, and anyone can be using the API in any moment).
  • Keep it simple and clear when coding.
  • We value the originality in a solution.
  • Report all the issues you can find in our public API (as a folder/file into your solution)

If you have any doubt about the test code please contact recluitment and don't use the comments.

@enriquesanchezb
Copy link
Author

enriquesanchezb commented Apr 2, 2019

If you receives a 400, there are not any issue with the request. If you receive this kind of error maybe is because the request is not good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment