lundi 13 août 2018

Learning basics of API

I received an assignment from my professor to create few test cases for an API. It's my firs encounter with API, and I'm reading about it online, but maybe someone here will point me in the right direction and help me solve this?

There are two teams in a tennis competition facing each other. A team Leader goes to the "example.com" web-app and wants to access a schedule page that contains a list of rival team information.(dates and times of each game) Schedule page UI layer calls a service, which calls a database to access the proper team and schedule data to display.

Without any access to web-app try to think critically about how the UI interacts with a service API to correctly view, update, create, and remove schedule entries using the “TDD” process.

-Try to include a set of detailed test cases for each step of the workflow. Each case should explain the behavior between what the team leader might see and how the data is being retrieved from a back end service.

-Define expected request parameters and response codes for each HTTP method based on valid and invalid inputs.

-Describe negative testing considerations, failure scenarios, or breaking points for each step of the workflow.

Using the following data object for a team’s schedule entry, create test cases for each of these HTTP methods.

GET: On success, viewing a list of schedule entries returns a 200 OK status code

PUT: On success, updating a single schedule entry returns a 200 OK status code

POST: On success, creating a new schedule entry returns a 200 OK status code

DELETE: On success, removing a schedule entry returns a 204 status code with no data object.

{

MatchId: "987654",

sqlId: "98765",

date: "2018-01-01T19:00:00",

rival: "RivalTeam",

rivalId: "0012",

isHome: true,

gameType: 0,

categories: [ ]

}

HTTP response codes that you can use for the workflow:

500 - Internal Server Error 200 - OK 403 - Forbidden 404 - Not Found 401 - Unauthorized

Aucun commentaire:

Enregistrer un commentaire