Skip to content

Commit 713801c

Browse files
feat: add projectKey input for Test Manager
Add input projectKey to enable running tests as transient test cases in Test Manager according to UiPath [docs](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/testing-a-packagerunning-a-test-set-in-test-manager#usage-examples%E2%80%8B) Closes #24
1 parent d2ca9a8 commit 713801c

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

action.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ inputs:
3030
retryCount:
3131
description: 'Number of retries for failed test cases (by default, no retry is set).'
3232
required: false
33+
projectKey:
34+
description: 'Project key in Test Manager. (Required if using Test Manager parameters)'
35+
required: false
3336
outputs:
3437
testExecutionLinks:
3538
description: 'Outputs a comma-separated list of Orchestrator links for viewing test results'
@@ -101,17 +104,28 @@ runs:
101104
folderId=$(echo "$responseBody" | jq -r '.value[0].Id')
102105
echo "folderId=$folderId" >> $GITHUB_OUTPUT
103106
104-
- id: set_retry_count
105-
name: Set retry count
107+
- id: set_additional_parameters
108+
name: Set additional parameters
106109
shell: bash
107110
run: |
111+
retryCountParam=""
112+
projectKeyParam=""
108113
if [ -z "${{ inputs.retryCount }}" ]; then
109114
echo "No retry count provided. Defaulting to 0."
110115
else
111-
echo "retryCount=--retryCount ${{ inputs.retryCount }}" >> $GITHUB_OUTPUT
116+
retryCountParam="--retryCount ${{ inputs.retryCount }}"
112117
echo "Retry count set to ${{ inputs.retryCount }}"
113118
fi
114119
120+
if [ -z "${{ inputs.projectKey }}" ]; then
121+
echo "No Test Manager project key provided."
122+
else
123+
projectKeyParam="--projectKey ${{ inputs.projectKey }}"
124+
echo "Project key set to ${{ inputs.projectKey }}"
125+
fi
126+
127+
echo "additionalParameters=$retryCountParam $projectKeyParam" >> $GITHUB_OUTPUT
128+
115129
- id: run_tests
116130
name: Test
117131
shell: bash
@@ -160,7 +174,7 @@ runs:
160174
--result_path "$testResultFilePath" \
161175
--language en-US \
162176
--traceLevel "Warning" \
163-
${{ steps.set_retry_count.outputs.retryCount }}
177+
${{ steps.set_additional_parameters.outputs.additionalParameters }}
164178
165179
if [ $? -ne 0 ]; then
166180
testsFailed=1

0 commit comments

Comments
 (0)