I am new to API Testing and do not understand mocking responses from API calls so any help would be appreciated.
I have searched for the information online and nothing much is available, it seems except for the mock-server documentation which I am not able to understand much.
I am trying to use Mock-Server to mock the api responses for Get/Put/Post requests for API Testing while the Devs are working on the api developemnet and I do not know how to store the received response in a variable.
What I need to do is to send a request (Get/Post) and receive a response (Body/Header/StatusCode) in a variable so that I can use it for further use (assertions etc)
Anybody having experience around how to use mock-server and can provide an example would be a good help.
I am using Maven/Java/TestNG