Run Virtual Lab from Designer

You can use Service Virtualization Designer to create an SV Lab and run virtual services.

Tip: For a walk-though demo of the steps described in this topic, go to the hello-world-designer demo, which is located in the <installation folder>\demo.

To set up and run a virtual lab from Service Virtualization Designer:

  1. Enable the SV Lab feature in the Early Access section (Tools > Options > Early Access > Lab > Lab.

  2. (Optional) Add a service interface for use when creating a new Service Model.

    1. Select File > New > Lab > Service Interface.
    2. Enter the Service Interface Name and select the Parent Class.
  3. Create a service model, which describes the behavior of a service. For details, see Service Models.

    1. Create or open a virtualization project.

    2. Select File > New > Lab > Service Model and enter a Service Model Name.

    3. Select an appropriate service interface depending on your real service type. If you added your own service interface, as described in Run Virtual Lab from Designer, the service interface will be listed here.

      Functions for the service model are annotated with @sv.scenario. You can now create functions for your various service behaviors.

      @sv.scenario
      exampleScenario() {
          //your service behavior here
      }
  4. Create an application model to serve as the entry point to your virtual environment, which is composed of virtual services. For more details, see Application Models.

    1. Select File > New > Lab > Application Model and enter an Application Name.

    2. Click Next and optionally select the services to be used by the Application Model.

    3. Click Finish. You can now import the Service Model to the Application Model.

      import {ServiceModel} from "ServiceModel.js"
    4. Application models contain scenarios that serve as a reference point for Service Model scenarios, for example:

       @sv.applicationScenario
       exampleScenario() {
           //service-scenario-call();
       }
  5. Verify the lab configuration. For details, see Verify Virtual Lab Configuration from Designer.

  6. Run the lab from Designer.

    1. In the Virtualization Explorer, double-click the lab to view the lab details.

    2. Set the Lab Server URL, which points to your running lab environment. To obtain the URL, do one of the following:

      • Contact your Service Virtualization administrator.
      • Set up and run your own environment using LabServer binaries, which are stored by default in: C:\Program Files\Micro Focus\Service Virtualization Designer\LabServer\bin
    3. Click the Compile Module button to compile all of the sources you created.

    4. Click the Start Lab button to start running the Lab and load the required sources.

Back to top

See also: