Skip to content

Implement configurable Octane test fields in this GitHub Action. #2

Description

@sanjeethnayak

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:

  1. Add two new optional action inputs in action.yml:
    • testLevel
    • testType
  2. If these inputs are not provided, preserve the current behavior:
    • Test_Level defaults to "Unit Test"
    • Test_Type defaults to "Sanity"
  3. Apply the override in the action repo itself after XML conversion and before sending results to Octane.
  4. Do not change existing behavior for Framework.
  5. Keep the change minimal and focused.
  6. Update README.md with:
    • new input descriptions
    • example workflow usage
  7. 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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions