Home  >  Article  >  Backend Development  >  Reference Jira requirements in Go testing

Reference Jira requirements in Go testing

PHPz
PHPzforward
2024-02-10 13:21:17372browse

参考 Go 测试中的 Jira 要求

php Xiaobian Yuzi often encounters Jira's requirements during Go testing. Jira is a popular project management and issue tracking tool widely used among software development teams. During the testing process, using Jira can help the team better track and solve bugs and improve work efficiency. Understanding the requirements of Jira is crucial for testers as it involves the management of test plans, bug reports, test cases, etc. Referring to Jira requirements in Go testing can help testers better adapt to project needs and provide high-quality testing work.

Question content

  • We are using test automation in Go
  • We use XRay to manage tests in Jira
  • In our CI/CD pipeline, we run gotestsum to create the JUnit test output in the results.xml file
  • In our CI/CD pipeline we upload results.xml via the XRay API
  • https://docs.getxray.app/display/XRAY/v2.0#/Import/post-import-execution
  • Our test results are logged into Jira and visible

What I want to do is reference the functional requirements somewhere in the test definition in Go and have the test cases automatically linked in Jira so that they count as "coverage".

It looks like I should be able to insert the requirement ID into the JUnit output using the test log formatter, but I'm not sure how to convert it to an XRay payload and where it needs to be in the XRay payload.

Wondering if anyone else has successfully achieved this?

Workaround

I'm not familiar with gotestsum, but it seems you need to contribute to the project to be able to add comments to the JUnit reports 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 and add it as an attribute to the JUnit report.

We have contributed to some projects adding the possibility to link requirements to specific annotations of tests, please check the following examples:

The above is the detailed content of Reference Jira requirements in Go testing. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete