Configuring a run of a virtual service
When you have virtual service resources that are in the repositories added to your project, you must configure a run of the virtual service to start an instance of the virtual service on HCL OneTest™ Server or other remote Kubernetes clusters.
Before you begin
- Ensured that you are assigned a role as a Project Creator in the team space. See Managing members and their roles in a team space.
- Ensured that you are assigned a role as a Project Owner or Tester in the project. See Managing access to server projects.
- Created virtual services that use any of the supported transports for tests in your project.
- Completed the prerequisite tasks before you configure a run of the HTTP virtual services. See Prerequisites for running HTTP virtual services.
- Read the prerequisite information about virtualizing the Istio based services. See Prerequisites for running virtualized Istio based services in HCL OneTest Server.
- Read and completed the tasks mentioned in Considerations for using a remote Kubernetes cluster, if you want to use a remote Kubernetes cluster as a location to run the test.
About this task
- Virtual services that utilize the WebSphere® MQ transport.
- Virtual services that utilize the HTTP transport.
- Virtual services that virtualize the Istio based services. You can run virtual
services for the following types of requests received or sent by the Istio
service mesh:
- Requests received by services in the Istio service mesh.
- Requests sent from namespaces in the Istio service mesh to external services that are not in the Istio service mesh.
Procedure
-
Log in to HCL OneTest™ Server.
The team space that contains your project is displayed.
-
Open the project that contains the virtual service resources in the
test assets by clicking
.
The Overview page is displayed.
-
Click
in the navigation pane.
The Resources page is displayed.
-
Select the branch of the repository that
contains the virtual services that you want to run from the list in the
Branch field.
All virtual services in the selected branch are displayed on the Resources page.
-
Identify the virtual service by completing any of the following steps:
- Search for the virtual service by entering the name or the path of the virtual service in the repository in the Search field box.
- Create a filter query by using the New filter
option and complete the following steps:
- Create a rule with an appropriate operator.
- Select criteria such as Name,
Path, Instance
number, or Instance state.
Select the condition and enter the value for the criteria.
Apply the filter query.
The virtual services that match the filter criteria are displayed.
- Save the filter query for retrieving it from the saved filters list.
- Retrieve a saved filter by using the Open
filters icon by completing the following steps:Note: To open the filter query, you must have created and saved a filter query.
- Select the saved filter.
- Apply the filter.
The virtual services that match the filter criteria in the filter that is applied are displayed.
-
Click the Open action menu icon in the row of the identified virtual service, and then click
Execute icon .
The Execute virtual service dialog is displayed.
-
Select the version of the virtual service that is in the repository that you
want to start by performing any of the following actions:
- Expand the list in the Version field, find
the version of the test resources, and then select the
version.Use the following details about the version of the test resources that are displayed to identify the version that you want:
- Commit message.
- Tags labeled for the version committed.
- The user who committed the version to the repository.
- Relative time of the commit. For example, 2 hours ago or 3 days ago.
The list displays the versions of the test resources committed by all users to the branch in the repository. The versions are arranged with the latest version committed followed by the versions committed previously.
- Expand the list in the Version field, and
then search for the version that you want to select by entering a
partial or the complete commit message of that version.
The version that matches the search criteria is displayed and it is selected for the test run.
- Expand the list in the Version field, find
the version of the test resources, and then select the
version.
-
Select the environment that was used to bind the physical and logical resource
in the API project, in the ENVIRONMENT tab.
Important: The configuration that you set for the run in the Execute virtual service dialog is preserved when you run the same virtual service again. The configurations that you set are not available to other members when they want to run the virtual service. For example, if you selected an environment, the same environment is selected when you run the virtual service again.
-
Enter a label, if required.
A label that you enter for the test run that helps you to identify the virtual service instance on the Instances page. The label that you entered is displayed for the virtual service under the Labels column on the Instances page. After you have created a label, any member of the project can use that label.
-
Follow the instructions if you want to modify the configurations for the
behavior of the virtual service:
-
Follow the instructions, if the virtual service references datasets.
- You can use the dataset referenced in the asset.
- You can choose to override the dataset with another data source. If alternative data sources are available, select from the set of overrides available.
-
Follow the instructions if the virtual service requires a variable that must be
passed at run time.
-
Click Advanced to make the
following advanced configurations:
Note: You must separate the arguments or variables with a white space when you enter them in the same line or start each argument or variable on a new line.
The default value for the fields for the advanced settings is null or an empty field.
Notes:-
If you have configured some or all of the settings for the current run, and you do not want to continue with those settings, you can reset the settings by clicking Reset.
-
If you want to repeat a run and do not want to use the saved settings from a previous run, you can reset all the saved settings to their default values by clicking Reset.
-
-
Follow the instructions if you want to change the location of a
Kubernetes cluster for running the test:
Results
You have started a virtual service from the Resources page on HCL OneTest™ Server.
What to do next
- On the Resources page, the virtual services are displayed with the state as Running along with the number of instances that are running in the Active instances column.
- On the Resources page, you must click the Show in instances page icon in the row of the virtual service to view all the running instances of a particular virtual service on the Instances page.
- Go to the Instances page by clicking . You can view instances of all the virtual services that are running and are displayed with the state as Running under the State column. You can also view the requests that are received by the virtual service. The number of requests is displayed as number of hits when you hover the cursor over the text in the Activity column.
You can view the details, configuration settings, routing rules, usage statistics, or logs of a specific running instance of the virtual service. See Viewing configurations of running instances of virtual services.
You can modify the behavior or the logging level of a running instance of the virtual service that you started before running tests on them. See Modifying configurations of running instances of virtual services.
When you have completed testing the virtual service, you must stop the running virtual service. See Stopping virtual services.