Service Virtualization

Note: The integration with Service Virtualization is not supported in this release of LoadRunner Enterprise.

This section provides an overview of how Micro Focus Service Virtualization (SV) integrates with LoadRunner Enterprise to use simulated services during your test run instead of loading actual services.

Service Virtualization overview

As part of your performance test, you may want to test applications that depend on other services which are a part of your business scenario. Instead of loading actual services, you can use simulated services in your test run. The virtualized services are a simulation of actual services.

Using simulated services in your test is helpful if using actual services involves an additional cost or requires the service of an application that is under development or inaccessible at the time when you run your performance test.

Example: Your business process might include a service that is in development or incurs a cost, such as processing a credit card through a third-party vendor. By using a virtual service, you can replace actual services with simulated services that mirror both the data model and the performance model.

For details on creating projects that contain virtualized services, see the Service Virtualization Help Center.

The workflow below explains how Service Virtualization integrates with LoadRunner Enterprise processes:

Back to top

View Service Virtualization graphs

The Micro Focus Service Virtualization monitors enable you to analyze the status and performance of the simulated services during the performance test run. For example, you can integrate a payment process service containing the following operations into your script:

Type Example Name Example Description
Service CreditServ Process online credit card payments
Operation CreditServ.PurchaseRequest Cardholder requests product/service
Operation CreditServ.AuthorizationRequest Merchant request authorization for payment
Operation CreditServ.AuthorizationApproval

Credit card company authorizes or denies payment

The online monitors measure the overall behavior of the service and each operation. The flowchart illustrates using a service and operations for credit card payment.

In addition to the Run-Time monitor graphs available in LoadRunner Enterprise, the following graphs are useful for working with and analyzing service virtualization integration.

You can view the following Run-Time monitor graphs during a test run:

Note: To get graph data from the Service Virtualization server, make sure it has the LoadRunner Enterprise system user (IUSR_METRO, unless changed by the System Identity Utility) added to the Service Virtualization server machine users, and add the user to the Performance Monitor Users group. For details, see Secure communication and system user.

Back to top

Service Virtualization locking

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

  • If your test includes a service that has been locked by another user, start run will fail and an error message will appear in the Test Runs module's event log for the specific run.
  • If your test is running and you update the test to include a service that has been locked by another user, the test will continuing running, however an error message will appear in the Online Screen's Messages tab as an error. There will also be an error notification in the Summary.

Back to top

Add virtualized services to performance tests

The task describes how to configure virtual services to run when designing a performance test.

  1. Prerequisites

    • You can start adding projects that contain virtualization services to your performance test from the Performance Test Designer at any point in the design process, but we recommend adding projects after you have added relevant scripts to the test.

    • Create your virtualized services in Service Virtualization Designer. For details on creating projects that contain virtualized services, see the Service Virtualization Help Center.

    • In VuGen, create or record a script. Upload the script either from VuGen or from within LoadRunner Enterprise. For details on uploading VuGen scripts to LoadRunner Enterprise, see VuGen scripts.

    Note when using a secured SV server (HTTPS): Make sure the CA certificate which signed the SV server certificate is installed on the LoadRunner Enterprise server and on the host which will be used as the Controller to the Trusted Root Certificate Authorities store of the computer account.

  2. Configure service virtualization

    Open Performance Test Designer. In the Groups and Workload view, select Advanced > Service Virtualization. The Service Virtualization dialog box opens.

    This dialog box enables you to add projects, remove projects, and check the deployment of services.

  3. Add projects and services

    To add projects and their corresponding services, click Add Services and search and select the relevant project containing the simulated services you want to run with your performance test.

    • Project Archive. Enables you to select a project file. Project files have a .vproja extension.

    • Running Server. Enables you to select services from a currently running SV server (only HTTP is supported).

    • Messages. Displays messages about the project file, such as error messages.

  4. Select the services to simulate

    Expand a project. Select Service Name and Simulate for each virtualized service you want to run, and provide the relevant data model and performance model information.

  5. Check service deployment

    Click the Check Deployment button to determine if the services are deployed correctly on the SV server specified in the URL. Under Messages, click More Details. The Deployment Check Results dialog box opens.

    The deployment check verifies that a service with the same ID exists on the specified server.

    Deployed

    Indicates whether the service is deployed correctly on the specified server.

    • Status is unknown. Click Deploy Check to check the status.

    • Successfully deployed.

    • Unsuccessfully deployed.

    Note: The virtualized service must be deployed on the simulation server to be able to configure the service and run it as part of your performance test in LoadRunner Enterprise.

    Project Name

    Displays the name of the project containing the virtualization service.

    Service Name

    Displays the name of the virtualization service.

    Check details

    Displays the results of the check.

    Note: The virtualized service must be deployed on the simulation server to be able to configure the service and run it as part of your performance test in LoadRunner Enterprise.

  6. Enter credentials for monitoring the SV server

    Click the Server Credentials button to open the Server Credentials dialog box, enabling you to configure SV server credentials used for monitoring the SV servers and virtual services deployed on them.

    • Server Url. Displays the URL for the server. The address of the SV server on which the selected service is deployed is in the format:

      http:<server>:6080/management - for standalone SV servers

      http:<server>:7080/management - for embedded SV servers (available only if the SV Designer is open)

      Note: Note when using a secured SV server (HTTPS): Make sure the CA certificate which signed the SV server certificate is installed on the LoadRunner Enterprise server and on the host which will be used as the Controller to the Trusted Root Certificate Authorities store of the computer account.

    • User. Displays the URL for the server.

    • Password. Displays the password for the server. To edit, click the server URL to display the User and Password text boxes.

    Note: This dialog box only lists the servers that are defined in the Services Virtualization dialog box's Simulation Server column.

  7. You can also perform the following actions:

    • Unlock. Unlocks a locked service.

    • Undeploy. Undeploys a selected service.

    • Delete. Removes a select project or service from the list.

      Note: Performance tests that are currently running the virtualized services in the deleted project keep running the virtualized services; Deleting the project unlocks the corresponding services so others can edit them.

  8. After creating a virtual service, it is added to the list of virtualized services with the following information:

    UI Element
    Description
    Service Name

    The name of the virtual service to use during performance test execution.

    Simulate

    When checked, includes the virtual service when executing the performance test. When cleared, the service switches to pass-through mode by the test.

    Data Model

    The data model to associate with the virtual service.

    Performance Model

    The performance model to associate with the virtual service.

    Deployed

    An indicator showing the deployment status of the virtual service. For details, see Check Deployment.

    Service Log

    Opens the Virtual Service Logs dialog box, enabling you to view the log of a selected service for the recurring entries. The log displays the time of the last occurrence.

    Messages (Unique)

    The number of messages and unique messages passed through the virtual service during the current simulation session.

    Messages

    Displays messages about the virtual services, such as:

    Last Deployment Check. Date on which the last deployment check occurred.

    More details. Opens the Deployment Check Results dialog box, enabling you to determine if the services are deployed correctly on the SV server specified in the URL. For details, see Check Deployment.

Back to top

Notes and limitations

If you make changes to the services virtualization configuration during runtime, both the original and modified configurations are saved in the wlrun.log file on the Load Testing Server (LTS) machine.

For developers: Pointing calls to virtual services in the application under test cover two major scenarios:

  • Application components that use the service are embedded in the code or in a configuration file. In this case, you will need to update the code in the application under test or update the configuration file to point to the new URL.

    Example:  

    .NET Desktop application uses a web service, and the URL is set using a constant: stringURL = http://microfocus.com

    Service or back end component uses the web service and the URL is configured in the app.config file.

  • Service is consumed by accessing UDDI or some other registry component(Systinet) and the URL is retrieved at runtime. In this case, you will need to update the end point URL in UDDI/Systinet.

Back to top