13 years ago
Steps to creating Mock for Spring RestTemplate?
Hi,
Assume i have used RestTemplate API which invoke a client URL and returns a response
I need to create a Mock piece of code in the test case for the RestTemplate API and call the actual implementation, so that the mock object will gets triggered instead of trying for the URL which doesn't available.
Ex: restTemplate.postForObject("www.abc.com", empRequest, Employee.class);
Could you please let me know how to create a mock piece of code for the server via SOAP UI and incorporate the same in the test case?
I couldn't find a suitable steps or examples to achieve the same.
Please let me know your suggestions, comments or ideas if any.
Thanks,
Kathir
Assume i have used RestTemplate API which invoke a client URL and returns a response
I need to create a Mock piece of code in the test case for the RestTemplate API and call the actual implementation, so that the mock object will gets triggered instead of trying for the URL which doesn't available.
Ex: restTemplate.postForObject("www.abc.com", empRequest, Employee.class);
Could you please let me know how to create a mock piece of code for the server via SOAP UI and incorporate the same in the test case?
I couldn't find a suitable steps or examples to achieve the same.
Please let me know your suggestions, comments or ideas if any.
Thanks,
Kathir