Running a Virtual Service

Running a virtual service makes it available for you to test against. Running a virtual service is a simple two step process:

  1. Run the Virtual Service
  2. Connect your application to the running virtual service

Run a Transaction-based Virtual Service

  1. Find your virtual service on the Service Virtualization tab and click Run.
    running_MS.png
    The Status changes to Running, and the endpoint for the running virtual service appears.
  2. Copy the endpoint for the virtual service and redirect your application to point to the virtual service instead of the real Service.
    Do not refer to a Kubernetes-based virtual service by its plain IP address.
  3. You implement the redirect configuration in your application, not within BlazeMeter. How you do it depends on your application. It's often as simple as changing a value in an application properties file from the live service address to the virtual service endpoint.
  4. After you redirect your application to the virtual service, an application restart may be required.

The user and date when the virtual service was Created and Updated are indicated here for your reference. After you have run a virtual service at least once, no matter with which status (running, failed, stopped, configuring), the details view also indicates the Version of the image.

If you are not updating images automatically and you are reporting an issue, and BlazeMeter Support asks you for the virtual service image version where you are seeing the issue, look up the version number here.

Filter Virtual Services by Status

In the Virtual Services tab, you can filter the transactions based on their status. The filer helps in cases where there are many virtual services defined. By using this filter option, it is easy to display a subset of virtual services based on a certain status. For example, you can display only virtual services that are running or stopped.
ms-status.png

Bulk Run Virtual Services

You can bulk run virtual services from the Virtual Services tab or from the Asset Catalog tab.

  1. Click the Service Virtualization tab.
  2. Click Virtual Services at the top of the page.
    mock_services_tab.png
  3. Find your virtual services on the Service Virtualization tab.
  4. Select the checkbox next to each virtual service that you want to run.
  5. Select the Run Virtual Services button next to the virtual service.
    bulk_run.png

If one of the services is already running when you apply the bulk action, the Run Virtual Services button is disabled. The converse is true, if one of the services is in the stopped state, bulk stop is disabled. Additionally, you can also delete virtual services in bulk.
bulk_stop.png

Bulk actions are limited to deploying 25 virtual services at a time.

Configure SSL Connection to Virtual Services

BlazeMeter can configure HTTPS connections to virtual services over TLS/SSL. When you run a virtual service over HTTPS, verify that your application can connect to the virtual service. You can connect your application using the SSL certificate that we provide.

Cloud Deployment

When you deploy a virtual 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 virtual service 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.

Private Location Deployment

When you deploy a virtual service to a Private Location, the HTTPS endpoint is based on the IP address of the agent that deployed the virtual service. No FDQN resolution occurs by default.

Use the following self-signed certificate to connect to a virtual service deployed to a private location:

-----BEGIN CERTIFICATE-----
MIIC4jCCAcqgAwIBAgIEXSSpbDANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBUq
Lm1vY2suYmxhemVtZXRlci5uZXQwHhcNMTkwNzA5MTQ0OTE2WhcNNDYxMTIzMTQ0
OTE2WjAgMR4wHAYDVQQDDBUqLm1vY2suYmxhemVtZXRlci5uZXQwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCoePRBvFbV5We4CmR/68AddxloEeH3oLeg
ylZpZuPbQt0kEg93mYo4j1xvrTThS4gqCWg1bg7eh4pvVeNTUvTZf/BvCq4RGohG
dfodFzHSuSNMVAhCrMmlUi+T3M4nrBjCj41ZgDB7bijMSbYhb5oOAqXHxLSNCgO/
3UDlUwdbyTzlag0p5iu8spI6IoS6XtWR44h8Jm+WOkBSp7PIc8SMQC2xj5DWHrxx
NlTTj9dC099jvvsR4ncelYNwQGEM5xj6HqTFdD6NGYkyV7r2egjl25uBbruC+M7k
1k4k5BgzuR4g/M1D9y0Yw1ezUvYMaT5g4aCSU5RV3ha4IBJaItZTAgMBAAGjJDAi
MCAGA1UdEQQZMBeCFSoubW9jay5ibGF6ZW1ldGVyLm5ldDANBgkqhkiG9w0BAQsF
AAOCAQEARRPDOPPHQgZCmNqamVcC4rjuG6Q5uDrOejg9uoI2iYHa4ScD8WZxKUy/
7FTzYMBkBSb6NbhEJfIP/D7PL+MWG115080LM01WDdYN8Avjqx4ZlmyQyAwTsdKt
hkGErTVqwiBjuDxjNosFi/0w1XeYIRdZ41iE5x9wqy0qio9pVyc30rwAimIbFFDc
aKtLTEom3yAhj4vpBojN35YyEY6jnTkpQBcd4bnarwtqYvTbqiSIbMJivmTHl88e
eWsSBE53G/u2aDPOyx+Lg24Rqh6I+ssgRVmNDZIc4Vj8cvEeTmihMVY6DTpwPls5
yuLi+DPQq6qM479piqLVP7LPV5vs/A==
-----END CERTIFICATE-----

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.

Example:

10.1.1.100 testmock.mock.blazemeter.net