API Testing · Middle · Question 61 of 75
How should a test handle values generated by the server, like IDs and timestamps?
- 1Expect exactly the same ID every time the test runs
- 2Ignore them completely, since they change
- 3Check their format and use them, not compare to fixed values
Show the answer
Correct answer: Check their format and use them, not compare to fixed values
Explanation
Assert an ID is a UUID or positive integer and a timestamp is recent and valid, then use them in later requests.