Testing with HCL OneTest™ API
Starting from V9.5.0, you can use HCL OneTest™ API extension to execute Integration tests. In HCL OneTest™ UI, you can either import the projects from HCL OneTest™ API or manage them from HCL OneTest™ UI by establishing the connection between the products. In HCL OneTest™ UI, you can create a schedule or compound test to run the tests by using the Agents.
Before you begin
To be able to work with Integration tests, you must install HCL OneTest™ UI Extension for HCL OneTest™ API.
You also need a HCL OneTest™ Performance agent or a HCL OneTest™ API agent to execute the tests remotely. When installing HCL OneTest™ API agent, it is recommended to choose This Agent will only run probes option.
Moreover, if you update Integration tests in HCL OneTest™ UI and want to apply the updates back to HCL OneTest™ API, you must install HCL OneTest™ API and define the path to its installation directory to set the connection.
- Both the products are installed and you connect to the Integration project, or you open the Integration resource directly from Test Navigator view and you work directly with the sources files.
- HCL OneTest™ API is
not installed and you import the projects in the HCL OneTest™ UI workspace. Note: The imported tests must be edited in HCL OneTest™ API. Similarly, the compounds tests must be edited in HCL OneTest™ UI.
- To execute imported Integration tests, the HCL OneTest™ API agent must be installed. The environment variable INTEGRATION_TESTER_AGENT_HOME must be defined on each location where the agent is installed, and must point to the root directory of the HCL OneTest™ API agent installation.
Connecting to an existing Integration project
- In HCL OneTest™ UI, 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:
Setting HCL OneTest™ API preferences
- In HCL OneTest™ UI, click .
- Click Browse and set the installation path to HCL OneTest™ API execution file. On Windows, the default location would be C:\Program Files\IBM\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 editor automatically opens.
Modifying HCL OneTest™ API environments in Web UI Test perspective
In the 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 compound test.
- Open the 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 Description 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 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 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 in HCL OneTest™ UI to run the Integration tests Creating a compound test.
You can add a dataset mapper in the compound test 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™ UI.