API Testing · Junior · Question 37 of 75
What do you test by sending "age": "twenty" instead of a number?
- 1That the API validates data types
- 2That the API translates text to numbers
- 3That the API ignores unknown fields
Show the answer
Correct answer: That the API validates data types
Explanation
Type checks catch bugs where strings are stored as numbers or crash the server. The expected answer is a 400 or 422 with a message.