Before you begin
You must have installed and configured HCL OneTest Server and
HCL OneTest API
10.0. HCL OneTest API 10.0 must
be configured to use Git source control management.
In HCL OneTest API 10.0, you
must have a project that is checked into a Git repository and that includes a test suite that relies
on a stub as part of the local scenario configuration.
If you are a new user, you must first sign up with HCL OneTest Server by
completing a form that specifies user information such as an email, user name and password, then you
can log in by using that information. For more information about login and new user sign up, see
Administering security.
About this task
A suite that references a local stub must be changed to reference a remote stub so that the suite
runs on HCL OneTest Server.
Therefore, in HCL OneTest API 10.0, you
change a local stub to a remote stub, test that the suite runs successfully, and push the change
into a Git repository.
Then, in HCL OneTest Server, you
create a project and configure it to access a Git repository that contains HCL OneTest API suites,
add WebSphere MQ user
libraries, run the suites, and see the results.
Procedure
- Publish the stub to HCL Quality Server. See Publishing stubs.

The stub is published to HCL Quality Server as shown
on the Environments dashboard.

- Edit the suite scenario by opening the Scenario Editor.

- Change the stub reference from local to remote. See Scenario reference settings.

As HCL OneTest API is
integrated with Git, the change is flagged in the Test Factory.
- Deliver the change to your Git repository.

- Run the suite and check that the stub runs remotely on HCL Quality Server.

Now you are ready to create a HCL OneTest Server project.
- Log in by entering HCL OneTest Server URL in a
browser. For example, https://<fully-qualified-dns-name>:443. The Home page is
displayed where you create your project.
- Create a public project, which is the default. Enter a name and description for the project.

- Add the Git repository that contains HCL OneTest API
suites:
- From the Repositories tab, add the Git repository URI, which in this
example uses SSH authentication.
- To provide credentials, click the Expand icon
and enter the required SSH key. This example also uses a passphrase. 
Your existing repository is downloaded to HCL OneTest Server so that
it can be accessed.
The suites use a WebSphere MQ transport
and require WebSphere MQ library
files (JAR files) to run on HCL OneTest Server. Before
you run the suites, you must make WebSphere MQ library
files (JAR files) available to HCL OneTest Server.
- Copy WebSphere MQ library
files (JAR files) from the location that you configured in HCL OneTest API Library
Manager to the host system where you installed HCL OneTest Server and make
sure that location ends with UserLibs/WMQ. For example
./opt/<anywhere_on_host>/UserLibs/WMQ

- Run the following Docker command to map a volume containing WebSphere MQ library
files between your local file system and the Docker containers where HCL OneTest Server
runs.
docker run --rm -v /opt/<anywhere_on_host>/UserLibs:/ulsrc -v userlibs:/uldest alpine:latest cp -r /ulsrc/. /uldest/UserLibs
For more information about the transports and their library files that must be copied, see Running tests.
- Open the Execution page to see a list of test assets in the repository. This example includes
two suites. If you had many test assets in the repository, you could use the search option to filter
the list. Run the
test suite by clicking the Run icon
. 
- On the Schedule page, you can choose to run the test suite now, which is the default or
schedule it to run later. In this example, schedule it to run now and click
Execute to start the run.

- Open the Progress page to see the status of the suite as it runs.

The suite run completes successfully and this confirms that WebSphere MQ user
libraries were found by HCL OneTest Server.

- Open the Results page to see the suite results.

You can see the results were successful.
- This example includes a results database that was configured for the server project.
Click Functional Report to see the result details in HCL Quality Server.

Next, run the suite that references a remote stub.
- Open the Execution page again and run the stub suite.

- On the Schedule page, choose to run the test suite now and click Execute
to start the run.
- Watch the stub status in HCL Quality Server by using
the Environments dashboard. The suite starts the stub on HCL Quality Server, runs the
test and then stops the stub. The suite run completes successfully. The stub change that you made in the Scenario
Editor from local to remote worked. You can view the results.

- Open the Results page to see the suite results.

- This example includes a results database that was configured for HCL OneTest API project.
Click Functional Report to see the result details in HCL Quality Server.
