Running a Mock Service makes it available for you to test against. Running a Mock Service is a simple two step process:
- Run the Mock Service
- Connect your application to the running Mock Service
To run a Mock Service:
- Find your Mock Service on the Mock Services tab and click Run Mock Service.
The Status changes to Running, and the endpoint for the running Mock Service appears.
- Copy the endpoint for the Mock Service and redirect your application to point to the Mock Service instead of the real Service.
This configuration occurs on the application itself, not within Blazemeter, and how you do it depends on the application. It's often as simple as changing a value in an application properties file from the live service to the Mock Service endpoint. After you redirect your application, an application restart might be required.
Configure SSL Connection to Mock Service
BlazeMeter can configure HTTPS connections to Mock Services over TLS/SSL. When you run a Mock Service over HTTPS, verify that your application can connect to the Mock Service. You can connect your application using the SSL certificate that we provide.
When you deploy a Mock Service to a Cloud location, it uses a certificate signed by the Let's Encrypt certificate authority.
If the application or browser you're using to access a Service Mock does not trust certificates issued by Let's Encrypt, then you will need to configure it to trust the following certificates:
- Let’s Encrypt Authority X3 intermediate certificate
- DST Root CA X3 root certificate, which is used to cross-sign at the previous certificate
Refer to your application, language, or operating system documentation for details on how to import these certificates.
When you deploy a Mock Service to an on-premise location (OPL), the HTTPS endpoint is based on the IP address of the agent that deployed the Mock Service. No FDQN resolution occurs by default.
Use the following self-signed certificate to connect to a Mock Service deployed to a private location:
If you want to generate a hostname for the HTTPS endpoint, add an entry to your operating system's host file that lists the IP address followed by a host name that ends with mock.blazemeter.net.