Implement configurable Octane test fields in this GitHub Action.
Context:
- This action currently converts JUnit/XUnit results to Octane XML and sends them to Octane / ValueEdge.
- Today the generated XML hard-codes:
- Test_Level = "Unit Test"
- Test_Type = "Sanity"
- Framework = value derived from testingFramework
- I need to make Test_Level and Test_Type configurable from workflow inputs, while preserving backward compatibility.
Requirements:
- Add two new optional action inputs in action.yml:
- If these inputs are not provided, preserve the current behavior:
- Test_Level defaults to "Unit Test"
- Test_Type defaults to "Sanity"
- Apply the override in the action repo itself after XML conversion and before sending results to Octane.
- Do not change existing behavior for Framework.
- Keep the change minimal and focused.
- Update README.md with:
- new input descriptions
- example workflow usage
- Add or update tests to cover:
- default behavior when inputs are absent
- overridden values when inputs are present
Implementation guidance:
- Start from the action manifest and the code path that sends converted test results.
- The current conversion flow is in src/service/testResultsService.ts.
- The converted XML is produced by convertJUnitXMLToOctaneXML(...).
- Add a small helper that updates the XML payload before OctaneClient.sendTestResult(...) is called.
- Prefer a robust XML update approach over brittle raw string replacement if practical, but keep the implementation small.
- Keep all existing public behavior intact except for the new optional overrides.
- After the change, run the relevant test suite and show the diff summary.
Also provide an example consumer workflow snippet like:
with:
octaneUrl: ...
octaneSharedSpace: ...
octaneWorkspace: ...
octaneClientId: ...
octaneClientSecret: ...
gitHubToken: ...
serverBaseUrl: ...
pipelineNamePattern: '${workflow_name}'
unitTestResultsGlobPattern: 'results.xml'
testingFramework: 'robotFramework'
testLevel: 'System Test'
testType: 'Functional'
Implement configurable Octane test fields in this GitHub Action.
Context:
Requirements:
Implementation guidance:
Also provide an example consumer workflow snippet like:
with:
octaneUrl: ...
octaneSharedSpace: ...
octaneWorkspace: ...
octaneClientId: ...
octaneClientSecret: ...
gitHubToken: ...
serverBaseUrl: ...
pipelineNamePattern: '${workflow_name}'
unitTestResultsGlobPattern: 'results.xml'
testingFramework: 'robotFramework'
testLevel: 'System Test'
testType: 'Functional'