Amr Ellafy
Amr Ellafy

Reputation: 740

WCF client unit test/integration test

I generated a proxy client to a SOAP web service. I would like to test the request envelop without actually calling the service at the other end (actual endpoint) for now, i wrap my tests in try/catch block as It will timeout. is they a way fake the endpoint as I'm only testing the request body?

Upvotes: 0

Views: 230

Answers (1)

Konrad Kokosa
Konrad Kokosa

Reputation: 16898

Use New MockService option from within SoapUI. Here are detailed steps:

  1. Create a new SoapUI project
  2. As a Initial WSDL provide url of you local service (with ?wsdl added) or WSDL of external service
  3. Right click generated endpoint and select Generate MockService option. Select appropriate path and port.
  4. You can edit default response that will be used.

Upvotes: 1

Related Questions