Skip to content

Commit 5b4a1ee

Browse files
fix: set test case variation on url
Add the data variation to the url if it is not empty.
1 parent 59be020 commit 5b4a1ee

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,13 @@ runs:
297297
testName=$(echo "$testCase" | jq -r '.Name')
298298
testCaseId=$(echo "$testCase" | jq -r '.TestCaseId')
299299
testStatus=$(echo "$testCase" | jq -r '.Status')
300-
testCaseLink="${baseUrl}${{ inputs.projectKey }}/testexecution-results/$testSetRunId/$testCaseId"
300+
testCaseVariationId=$(echo "$testCase" | jq -r '.DataVariationIdentifier')
301+
if [ "$testCaseVariationId" != "" ] && [ "$testCaseVariationId" != "null" ]; then
302+
testName="$testName (Variation: $testCaseVariationId)"
303+
testCaseLink="${baseUrl}${{ inputs.projectKey }}/testexecution-results/$testSetRunId/$testCaseId?variation=$testCaseVariationId"
304+
else
305+
testCaseLink="${baseUrl}${{ inputs.projectKey }}/testexecution-results/$testSetRunId/$testCaseId"
306+
fi
301307
testResultsTable+=$'\n'"| [$testName]($testCaseLink) | $(if [ "$testStatus" == "Passed" ]; then echo "✅ Passed"; else echo "❌ Failed"; fi) |"
302308
done <<< $(echo "$testSetRun" | jq -c '.TestCaseExecutions[]')
303309

0 commit comments

Comments
 (0)