Service Virtualization

To facilitate load testing of business processes, Controller integrates with Service Virtualization. Service Virtualization provides a framework for creating virtual services for testing your applications, especially when real services are limited or unavailable.

Integration with Service Virtualization

As part of your system-wide load test, you need to test all of the services that partake in your business process. Some business processes contain services that are not available. For example, your business process might include a service that is still in development or incurs a cost, such as processing a credit card through a third-party vendor.

Controller's integration with Service Virtualization enables LoadRunner Professional users to define services that are virtualized during test execution, so that the tested business process is performed as required.

By using a virtual service, you can load test and replace actual services with virtual services that mirror both the data model and the performance model:

Data model

The definition of the data that is sent by the service to the server and the expected response.

You can define several data models for one service.

Performance model The definition of the expected performance, such as response time, of the service.

The following flow illustrates how Service Virtualization integrates with LoadRunner Professional processes:

  1. Create a virtual service in Service Virtualization, including data and performance models. For example, create a virtual service that processes credit card payments. For details, see Prepare the environment.

  2. Record the business process into your VuGen script, including the actual service. For example, your process may include submitting a payment using a credit card service.

  3. Create a scenario to run the script in Controller.

  4. Configure Service Virtualization setup within Controller, so that the virtual service will replace the actual service. For details, see Add virtual services to a scenario.

  5. Run the load test. During runtime, you can manage and update the virtual service. For details, see Manage and monitor virtual services during the test.
  6. Monitor the behavior of the service. For details, see Service Virtualization monitors.

To learn more about Service Virtualization, see the Service Virtualization Help Center.

Back to top

Virtual Service locks

When your scenario contains virtualized services, these services are automatically locked and cannot be used by other users while the scenario is running. Virtualized services may locked by you or other users for editing, simulation, or deployment.

  • If your scenario includes a service that has been locked by another user, the run will fail and the scenario sends an error message to the Output pane.
  • If your scenario is running and you update the scenario to include a service that has been locked by another user, the scenario continues running and sends a warning message to the Output window.

Back to top

Virtual Service modes

The following modes apply to the virtual services.

Learning mode The virtual service works as a proxy to record and learn the behavior of a real service. The virtual service forwards the real communication between a client and a service. In this mode, any communication through the virtual service is added to the virtual service's simulation models. 
Standby mode The virtual service redirects requests to the real service, and redirects responses from the real service back to the client. The virtual service is not learning, and not simulating.
Simulating mode The virtual service responds to client requests according to learned behavior. This is the main use of the virtual service, and the mode you use for testing purposes.

Back to top

See also: