Skip to content

Commit 690ce30

Browse files
Merge pull request #32 from Mikael-RnD/fix-test-case-variation
fix: set test case variation on url
2 parents 59be020 + 5b4a1ee commit 690ce30

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)