Cypress · Middle · Question 68 of 77

Why should tests avoid depending on the exact order of API items?

Show the answer

Correct answer: Order may differ between runs unless the API guarantees it

Explanation

Assert on items by content or sort explicitly. Otherwise tests fail when the backend returns the same items in another order.

Further reading

Problem with a question

Cypress · Middle · question 68

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz