Playwright · Senior · Question 40 of 77

When is it reasonable to seed data directly in the database?

Show the answer

Correct answer: When no API exists and the schema is stable and owned

Explanation

Direct SQL is fast but couples tests to the schema and can skip business logic. Public or test APIs are usually safer.

Further reading

Problem with a question

Playwright · Senior · question 40

Test yourself

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

Take this quiz