Running HCL OneTest™ Server tests on the Jenkins server
After you install the HCL OneTest™ Server Jenkins plugin on the Jenkins server, you can run tests that are available in your HCL OneTest™ Server project on the Jenkins server.
Before you begin
- Added the tests that you created in the desktop clients for your application to the project on HCL OneTest™ Server.
- Installed the latest version of the HCL OneTest™ Server Jenkins plugin on the Jenkins server. See Installing the HCL OneTest™ Server Jenkins Plugin.
- Generated an offline user token from HCL OneTest™ Server. See Generating an offline token.
- Created a Jenkins free-style software project. See Building a software project in Jenkins.
Procedure
- Login to the Jenkins server, if you are not already logged in.
- Open your Jenkins free-style software project.
- Click Configure.
- Click the Build tab.
-
Click Add build step, and then click Run
HCL OneTest™ Server
test.
The Run HCL OneTest™ Server test pane is displayed.
- Provide details about the test run by referring to the following
table.
Field Description Name Enter a name for the Jenkins build step. Use Custom Trust Store Select the Use Custom Trust Store checkbox if you have used an internal CA certificate and have imported the certificate to the custom trust store.
You can then enter the file path of your trust store followed by the file name in the Custom Trust Store Path field.
You can select the Use Custom Password for the Trust Store checkbox if you have modified the trust store password. Enter the new password.Note: If you have not modified the trust store password, you can keep the Use Custom Password for the Trust Store checkbox unselected.Server URL Enter the URL of HCL OneTest™ Server. The format of the URL is as follows: https://hostname. Offline Token Enter the offline user token that you generated from HCL OneTest™ Server. Team Space Select the name of the team space from the Team Space drop-down list. The Team Space drop-down list displays the names of the team spaces if you are an Owner or a member of the team space. Project Select a project from the Project drop-down list. The Project drop-down list displays the projects that are available in the corresponding team space of HCL OneTest™ Server. Note: The Project drop-down list displays the projects where you are an Owner or a member of HCL OneTest™ Server. You must be an Owner or a Tester of the project that is available in the team spaces to run the tests from the Jenkins server.Branch
Select the branch from the Branch drop-down list. The Branch drop-down list displays the branches available in the corresponding project of HCL OneTest™ Server.Note: After you select the branch from the Branch drop-down list, if you want to change the URL, offline user token, or the project in the Build, then you must close the build step. Then you must click Add build step, select Run HCL OneTest™ Server test, and then enter the details.Asset Type Select the test asset type of the test that you want to run from the Asset Type drop-down list. The available asset types are as follows: - AFTSUITE
- COMPOUND
- VUSCHEDULE
- RATESCHEDULE
- APISUITE
Note: The test environment is mandatory if you select APISUITE as an asset type to run an API suite.Test Select the required test from the Tests drop-down list. The Tests drop-down list displays the available test assets from the corresponding branch in the selected project, test asset path, and the repository (that the test belongs to) from HCL OneTest™ Server based on the type of the test asset you selected from the Asset Type drop-down list.Note: After you select the test details from the Tests drop-down list, if you want to change the URL, offline user token, or the project in the Build, then you must close the build step. You must then click Add build step, select Run HCL OneTest™ Server test, and then enter the details.Test Environment This field is mandatory only if you are running an API suite test. Based on the asset type as APISUITE and test from the Tests list that you select, the Test Environment list displays the available test environments from HCL OneTest™ Server.Note: The following message is displayed when you select any other asset type apart from APISUITE in the Asset Type field: You can select Test Environment only if you are running tests of type APISUITE. - Click Save to save the build step.
- Optionally, you can run multiple tests sequentially in the same job by adding multiple build steps and provide details for the tests that you want to run.
- Provide details about the test run by referring to the following
table.
- Click Build Now from the left pane to run the test on the Jenkins server.
Results
What to do next
After the Jenkins build completes, you can view the test results. You can click the build number from the Build History pane on the Jenkins dashboard. You can then click Console Output to view a detailed log of the build from the console output.
Test Result
instances are displayed.The Reports information section displays the names of the report along with its corresponding URLs. The report URLs are the HCL OneTest™ Server URLs where the reports are stored. You can access the report URLs to view the test execution information at any point of time.
You can also view the test reports and logs of the test that was run on the Jenkins server from the Results page on HCL OneTest™ Server. See Test results and reports overview.