What I want to do is, somewhere in the test definition in Go, make a reference to a feature requirement and have the test case linked automatically in Jira so that it counts as 'coverage'.
It looks like I should be able to insert the Requirement ID into the JUnit output using a test log formatter, but I am not sure how to transform this into the XRay payload and where it need to go in the XRay payload .
Wondering if anyone else has managed to achieve this?
I'm not familiar with gotestsum but it seems that you will need to contribute to the project in order to be able to add annotations to the JUnit report generated here: https://github.com/gotestyourself/gotestsum/blob/main/internal/junitxml/report.go so that you can specify a Test or Requirement in an annotation that will be added as a property in the JUnit report.
We already have contributed to some projects to add the possibility to have specific annotations to link requirements to tests, check the below examples: