From the course: API Test Automation with SoapUI

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Mocking with SoapUI

Mocking with SoapUI

- [Instructor] Mocking can be a very powerful tool for testing and SoapUI gives us an easy way to create mocks. So let's take a look at this, we'll just create a new project and in the url here we'll say http://localhost:8080/test and we'll hit okay on this, so this creates a local service for us and then to add a mock to this we can just right click on it and generate a mock service, we use the default name, okay, and it immediately starts it up for us, so it's created this mock service, it started it up for us, but we can see something interesting here. It's running on port 8089, so it's always a good idea to check the port, make sure that it is what you specified, what you thought it was. I probably have something running on port 8080 already and so it's using port 8089, so we can edit the service here. So we'll go to the service endpoint, and we'll just edit this to be 8089 so that our endpoint will use that. And then let's go look back at our rest mock service. So we have this…

Contents