Run Simulations

This task describes how to run simulations using your virtual services.

Note:  

  • This task is part of a higher-level task. For details, see End-to-End Workflow.
  • To learn more about virtual services, see Simulation.
  • If a service is locked by another client, a message displays in the Virtual Service Editor. For details, see Service Locking.
  1. Prerequisites

    Create and configure virtual services.

  2. Reconfigure clients

    Reconfigure your client to use the virtual service endpoints in place of the real service endpoints. This is required in cases where Service Virtualization can only perform intrusive virtualization.

  3. Define simulation data

    You can define the data from scratch in the Data Model Editor. For task details, see Modify Virtual Service Behavior.

    Alternatively, you can define the data by recording real service behavior, as described in the next step.

  4. Learn real service behavior

    Record the behavior of the real service in order to see the actual requests and responses.

    Note: You can learn and simulate both one-way (request only) and two-way (request-response) communication within a single operation in your data model. This functionality is available for messaging protocols IBM® WebSphere® MQ, Oracle® AQ, JMS, and SAP IDoc.

    1. In the Virtual Service Editor, click Learn to record real service activity. The information is saved in the virtual service's data and performance models. For user interface details, see Virtual Service Editor.

      Alternatively, you can choose to save only some of the collected data. Click the Learn drop-down arrow to select a simulation model to which you want to save recorded data.

    2. Run the application communicating with the real service. Service calls are recorded.
    3. To view the learned data after recording, open the Data Model Editor and click the Learned Data rule. For user interface details, see Data Model Editor.
  5. Select simulation models

    In the Virtual Service Editor, select a data model and a performance model to use during simulation.

    To simulate the unavailability of a service, select the Offline performance model.

    You can also choose to use just one of the simulation models, by selecting None for either the data or performance model.

    • If you select a performance model only, the real service responds and only the performance is simulated.
    • If you select a data model only, response times are not affected, and only data is simulated.
  6. Simulate

    1. In the Virtual Service Editor, click Simulate to place the virtual service in Simulating mode. The virtual service is ready to respond to client requests . The real service does not receive any communication.
    2. Run your client application. The virtual service responds to requests, and returns responses based on its associated simulation models.
    3. When you want to complete the simulation session, click Stop to move the virtual service into Standby mode. Client requests are then answered by the real service.
  7. Monitor all services

    You can monitor virtual service activity in the following ways:

    Runtime View View and control all of the virtual services in your project. During a learning or simulation session, the Runtime View provides an overview of the communication through the virtual services. From the main menu, select View > Runtime View.
    Problem List View errors, warnings, and informational messages about events that occurred during the application or server run. From the main menu, select View > Problem List.
    Service Administration

    View and manage all services from configured servers, without opening individual projects. On the Start Page, click Service Administration.

    Alternatively, from the main menu, select View > Service Administration.

    Service Virtualization Management View and manage services from multiple Service Virtualization projects and servers in a web browser, without opening the projects. For details, see Service Virtualization Management.
  8. Review message logs

    To troubleshoot problems, view specific request and response data, or examine additional protocol data, you can review the message logs for your service. For detail, see Message Logging.

  9. Optional: Adjust simulation models

    You can make adjustments to the data and performance models associated with your virtual services. For example, if you are simulating a service based on learned data, you may need to customize some aspect of the virtual service behavior that is not addressed. For details, see Modify Virtual Service Behavior and Modify Virtual Service Performance.