Last active
October 22, 2021 12:24
-
-
Save ferdyh/b76d01cedb6c03c953004a35e2888b35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat run_results.json| jq --raw-output '.results | map("<testcase name=\"" + (.unique_id|gsub("\\.[a-z0-9]{10}$"; "")|rtrimstr(".")) + "\" time=\"" + (.execution_time|tostring) + "\"" + if (.status != "pass") then "><failure message=\"" + .message + "\" /></testcase>" else "/>" end)' | jq -r '.[]' | (echo "<testsuites><testsuite>" && cat && echo "</testsuite></testsuites>") > test-results.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment