Integration with HCL OneTest™ API
You can use HCL OneTest™ API extension to run API tests from HCL OneTest™ Performance. You can either import the projects from HCL OneTest™ API or manage them from HCL OneTest™ Performance by establishing the connection between the products. You can also create a schedule or compound test to run the tests by using the Agents.
Before you begin
You must have completed the following tasks:
-
Installed HCL OneTest™ API Extension for HCL OneTest™ API.
-
Installed HCL OneTest™ Performance Agent and HCL OneTest™ API Agent to run tests remotely. When you install HCL OneTest™ API Agent, you must have selected the This Agent will only run probes option.
-
Defined the environment variable INTEGRATION_TESTER_AGENT_HOME on each location where the Agent is installed, and have pointed to the root installation directory of HCL OneTest™ API Agent.
Note: The environment variables INTEGRATION_TESTER_HOME and INTEGRATION_TESTER_AGENT_HOME are automatically created when you install HCL OneTest™ API 10.2.2 or later.
Setting environment variable
You must set the environment variable INTEGRATION_TESTER_AGENT_HOME and point it to the HCL OneTest™ API Agent installation directory if you are using HCL OneTest™ API 10.2.1 or earlier.
-
Run the following command to set the environment variable on Windows:
INTEGRATION_TESTER_AGENT_HOME = C:\Program Files\HCL\HCLProducts\Agent
-
Run the following commands to set the environment variable on Linux:
INTEGRATION_TESTER_AGENT_HOME=/opt/HCL/HOT-API-Agent export INTEGRATION_TESTER_AGENT_HOME echo $INTEGRATION_TESTER_AGENT_HOME
If the environment variable is not set, the compound or schedule test run fails with an error message as depicted in the following image:
Connecting to an existing API project
- In HCL OneTest™ Performance, right-click on the Test Navigator, select and click Next.
- In the wizard page, click Browse and select the root folder that
contains the project.
If the path contains a project, its name should automatically appear in Project Name and the Finish button should be enabled.
- In When project is connected, you have to perform one of the
following actions:
- Click Do nothing to only import the project.
- Click Open Create Rate Schedule wizard to select the test, create a Rate Schedule, and add the test to it.
- Click Open Create VU Schedule wizard to select the test, create a VU Schedule, and add the test to it.
- Click Open Create Compound Test Wizard to select the test,
create a Compound test, and add the test to the Compound test. For more details, see
Creating a compound test and Adding tests into a compound test.
For example: select the Open Create VU Schedule wizard action and click Next.
The Create Rate Schedule for Integration Tester or Create VU Schedule for HCL OneTest API wizard displays the list of tests contained in your project.
- Select one or more tests and click Next.
- In Schedule File Name and Location wizard, select a schedule in an existing project, or create it from this window. You just need to enter a name for the new schedule and click Finish. The procedure is the same for the compound test.
-
The Test Navigator displays the projects:
- The HCL OneTest™ API project you are connected to, or that you imported, with the tests.
- The HCL OneTest™ Performance project containing the schedule or compound test. If HCL OneTest™ API is installed, Connected is indicated near the name of the project in the Test Navigator. The Schedule or compound test automatically opens in the dedicated editor.
Setting HCL OneTest™ API preferences
- In HCL OneTest™ Performance, click .
- Click Browse and set the installation path to HCL OneTest™ API execution file. On Windows, the default location would be C:\Program Files\HCL\IntegrationTester.exe.
- Click Apply and OK.
Opening HCL OneTest™ API resources from the Test Navigator
- Once the preferences are set, you can open an HCL OneTest™ API project.
- In the Test Navigator, open the project root node and children
nodes, and at any level, right-click and select Open in HCL OneTest API
Workbench.
If HCL OneTest™ API is automatically detected, the workspace opens for the selected resources.
If HCL OneTest™ API is not detected, a dialog opens on a Preference page where you need to verify the path to the execution file.
-
Warning: HCL OneTest™ API cannot open more than one project at a time. If you have another project open, you will get an error. In that case, close HCL OneTest™ API and try to open the project again.
Importing HCL OneTest™ API project
If both the products are not installed on the same machine, you can import an HCL OneTest™ API project in your workspace. Another reason for the import is when you have HCL OneTest™ API installed but you do not want to connect to the HCL OneTest™ API project. In that case, the project is duplicated, any updates in one product workspace will not be reflected in the other product's workspace.
- To import an HCL OneTest™ API project:
- Right-click on the Test Navigator, choose Import and select Existing project into workspace.
- Choose Select root directory or Select archive
file; select a project to import and click Finish.
The selected project appears in the Test Navigator and the compound test or schedule editor automatically opens.
Modifying HCL OneTest™ API environments in HCL OneTest™ Performance
In the schedule or compound test, you can select HCL OneTest™ API tests and change the environment of each test. The environments are set in HCL OneTest™ API, you can only change the selection from the edited schedule or compound test.
- Open the schedule or compound editor and select a test.
- In the HCL OneTest™ API details, you can browse and change the properties of the selected test. The Test path, the Environments and Decription are automatically updated accordingly.
- To select another environment for the Integration Tester test, use the dropdown menu.
Alternatively, you can change the environment selection for a test for a collection of tests:
- Right-click on the tree at any level under a node in the schedule or compound test and select Replace HCL OneTest API Environments.
- In the Set Invocation Tester Environments wizard, the first page displays the list of projects that use the selected environment and the number of tests from project that use this environment in the schedule or compound test.
- Select another used environment in the dropdown list. Click Finish. The new choice applies to the selected node and its children.
Next step is to create a compound test or schedule in HCL OneTest™ Performance to run the Integration tests.
You can add a dataset mapper in the compound test or schedule for tests that are using multiple tags. See Adding Dataset Mapper to map tags in the HCL OneTest™ API tests with the variable values of HCL OneTest™ Performance.