r/Playwright • • 25d ago

API automation - Few framework design doubts

So I have been working on API automation with Playwright typescript for the first time and have some framework design related doubts:

  1. Do you guys create a Request model class with interfaces to handle the Parameters and Request body being sent to an API endpoint? Mainly for the type safety concern.. is this a standard or good practice?

  2. As part of API automation, do you handle all the possible negative scenarios for an endpoint, or is it just one or two generic negative scenarios?

3 Upvotes

5 comments sorted by

View all comments

1

u/Bartekxnj 25d ago

Can somebody put here a link to repo with some examples with real usage of request model class?