lundi 12 mars 2018

How to Write test case for Rest Services with out using Server?

I am using TestNG for write test case. I want to write a test case for my Rest API. and my server is not up. means no one is giving me a response.

I have URL which I can hit. I know the response also what should come as a response when I hit the URL.

It is possible using directly hit the API, fetch the response and then from the response fetch the body and check it whether it is true or not.

But I don't want that way means my server is not.

Is this any way to mock the Rest Service and Implement that?

Aucun commentaire:

Enregistrer un commentaire