Pages Navigation Menu

Coding is much easier than you think

SOAP UI – Run Mock Services

SOAP UI – Run Mock Services

 

 

 

Now you have created a mock service for your project using the previous tutorial. Let’s see how to run the services in SOAPUI.

But before that as said, you need to hard-code your response to run your mockservices. Let’s see how to hard-code your mockservice response.

Step 1: To hard-code your mockservice operation click on mock service and this opens the editor as shown in the image below.

mock service editor

 

Step 2: Click on the operation name in the mockservice editor and again the response name in the operation window to hardcode the response.

Operation editor

Step 3: The response editor window is shown below. Hard-code the tag values to run the mock service.

response editor

 

Note: You have to know the output prior to hard-code the response.

Thus the output is hard-coded as shown below.

hardcoded response

 

Run your mock services:

Follow the steps to run your mockservice.

Step 1: Click on the Mockservice name and in the editor window click onRun testsuite (run icon) to run the mockservice in SOAPUI.

run_mock service

 

Step 2: Now mockservice runs successfully on the port as shown below.

Mock Service run success

Now using the endpoint of the mockservice you can run your request.

  • sany

    Instead of hardcoding the mock response value how to make it as dynamic value