This action enables you to run HCL OneTest API tests.
- Create a github repository
- Create a folder named ".github" in the root of the repository
- Create a folder named "workflows" inside the ".github" folder.
- Create a .yml file with any name , inside the "workflow" folder and you need to code as following example in that yml file
name: HCL OneTest API
on:
workflow_dispatch:
inputs:
selectedConfigType:
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:
selectedConfigType: '${{ github.event.inputs.selectedConfigType }}'
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 }}'
- Replace the example input values with your details.
- Push it into the main branch
- 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.
To configure agent:
- Go to settings (Repo).
- Select action -> runner.
- Click Create self-hosted runner, follow the download and configure instruction
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.
Semicolon separated list of tests/suites to run.
Specify the folder to export the JUnit reports to.