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.
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:
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|
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.
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.
The task describes how to configure virtual services to run when designing a performance test.
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.
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.
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.
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.
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.
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.
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.
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.
After creating a virtual service, it is added to the list of virtualized services with the following information:
The name of the virtual service to use during performance test execution.
When checked, includes the virtual service when executing the performance test. When cleared, the service switches to pass-through mode by the test.
The data model to associate with the virtual service.
The performance model to associate with the virtual service.
An indicator showing the deployment status of the virtual service. For details, see Check Deployment.
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.
The number of messages and unique messages passed through the virtual service during the current simulation session.
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.
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.
.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.