Self-hosted runner mock
Self-hosted Runner Mock is an advanced feature that allows teams to provide mock services within internal or private networks. This solution is particularly useful for scenarios where mock services need to be available within a controlled network environment. Here's a detailed explanation of Runner Mock and how to set it up:
:::highlight purple
Different plans allow for different numbers of Runner Mock executions. For specific details, please refer to Apidog pricing.
:::
Setting up runner mock
1. Deploying the runner
The team admin could follow this instruction to deploy the self-hosted runner.
2. Adding a runner mock environment
To set up a Runner Mock environment in your project:
Navigate to the project environments popup.
Access the local Mock environment and copy the URL of the default service's local Mock.
Create a new Runner Mock environment:
- Paste the copied URL into the default service URL field of the new Runner Mock environment.
- Replace the IP with the actual IP or domain name of the server hosting the Runner.
- Change the port number to 4524.
Save the newly created Runner Mock environment.
3. Using the Runner Mock Environment
To use the Runner Mock:
When making an API request, select the newly created Runner Mock environment from the environment dropdown.
Send the request as usual.
The mock result will be returned from the Runner server within your network.