Skip to content

Testing Task: All API endpoints should be tested for invalid and malformed JSON #13

@pagan8

Description

@pagan8

Task:

Test all endpoints (see README for list) with incomplete, out of order and invalid JSON request data.

Example:

/report

expects:

{
"beer_id": 123,
"establishment_id": 345,
"device_guid": "6b981317-1c2d-4219-ad79-7235013ad597"
}

Testing should include:

incomplete - do not send all parameters, test leaving out each parameter in turn, and in pairs (eg. leaving out beer and establishments)

out of order - put establishment_id before beer_id and beer_id after device_guid

invalid - put invalid data such as very long strings, strings for integers (so beer_id = "Ricky likes to brew beer")

Also test by sending the wrong headers (eg. instead of application/json send text/html)

see the README file for curl syntax for testing.

For each test case you complete, put it in the comments:

(a) the curl command you ran
(b) the result you received
(c) any output from the brew.js (if you ran it locally for test)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions