This action enables you to run HCL OneTest API tests.
- Create a github repository
- Create a folder named ".github/workflows" in the root of the repository
- Create a .yml file with any name, inside the ".github/workflows" folder and you need to code as detailed below in that yml file
name: HCL OneTest API
on:
workflow_dispatch:
inputs:
configType:
description: 'Configuration Type'
required: true
productPath:
description: 'Product Path'
required: true
projectDir:
description: 'Project Directory'
required: true
projectName:
description: 'Project Name'
required: true
environment:
description: 'Environment'
required: true
tests:
description: 'Test(s) to run'
required: true
junitDir:
description: 'JunitDir'
required: false
jobs:
WebUI-Action:
runs-on: self-hosted
name: HCL OneTest API
steps:
- name: HCL OneTest API
uses: SonaHJ/APIAction@main
with:
configType: '${{ github.event.inputs.configType }}'
productPath: '${{ github.event.inputs.productPath }}'
projectDir: '${{ github.event.inputs.projectDir }}'
projectName: '${{ github.event.inputs.projectName }}'
environment: '${{ github.event.inputs.environment }}'
tests: '${{ github.event.inputs.tests }}'
junitDir: '${{ github.event.inputs.junitDir }}'
-
Push the new yml file into the main branch
-
The you will have to configure agent:
- Go to settings (Repo).
- Select action -> runner.
- Click Create self-hosted runner, follow the download and configure instructions.
-
Go to the Actions section in the repository and select the workflow.
-
Click the Run workflow dropdown and the list of input boxes get displayed.
Required Type of the test to execute
Required The fully qualified path to the HCL OneTest API application. This path must exist on the agent.
Required Fully qualified path to the HCL OneTest API project directory.
Required The name of the API test project.
Required The API Test environment to use for this execution.
Required Semicolon separated list of tests/suites to run.
Optional Specify the folder to export the JUnit reports to.