I really wanted to know how you guys do your API test? and can you please explain to me why you do that?
Right now i only know 2 ways of doing API test.
- You only need one plain Request Object, and you set the method, header, url, body, auth, send request, assertion, etc on test case.
- You create Request Object for each API, so your test case is only for Verify/assertion.
i am a little bit confused about which one is the best way to do it.
I opt for the 1st approach.
I use parametrization a lot, so in case something change (e.g the base url) i only have to update the variable in the test profile.
Or, I have to extend the test for one new customer, so i simply add a new test data for it, testcases remain same
And … I hate to have lot of objects, I am trying to keep my projects as simple as possible and the code to be reusable
Awesome! thank you for the brief explanation