Configuring the Freestyle project
You must configure a Freestyle project to add a build step, and then run tests that are available in your HCL OneTest™ Server project from Jenkins.
Before you begin
You must have completed the following tasks:
-
Installed the HCL OneTest™ Server Jenkins plugin on the Jenkins server. See Installing the HCL OneTest Server Jenkins Plugin.
-
Created a Jenkins Freestyle project.
-
Generated an offline user token from HCL OneTest™ Server. See Managing access to HCL OneTest Server.
Procedure
- Open your Jenkins Freestyle project from the list, and then click Configure.
- Click the Build tab, and then click Add build step.
- Select the Run HCL OneTest Server test option from the drop-down list.
-
Provide the details about the test run for the fields in 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.
Select the Use Custom Password for the Trust Store checkbox if you have modified the trust store password, and then enter the new password in the Custom Trust Store Password field.Note: If you have not modified the trust store password, you must clear the Use Custom Password for the Trust Store checkbox.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 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 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 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 that you want to run from the Asset Type drop-down list.
The available options for the Asset Type field are as follows:- AFT Suite
- API Suite
- Compound Test
- Rate Schedule
- VU Schedule
Notes:-
You cannot run the following test assets from the Jenkins server:
- API test
- Functional test
- HCL AppScan CodeSweep
- JMeter Test
- JUnit Test
- Performance test
- Postman resources
-
The Test Environment field is mandatory if you select APISUITE as an asset type to run an API suite.
Test Select the required test from the drop-down list.
The Tests drop-down list displays the available test assets from the corresponding branch in the following format:
Project_name [Path: the path of the test assets] [Repo: URL of the Git repository that the test belongs to]
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 step, 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 select Asset Type as APISUITE.
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.
Note: You can run multiple tests sequentially in the same job by adding multiple build steps and providing details for the tests that you want to run. - Click Save to save the build step.