I'm trying to figure out how to provide an easy-to-manage requirements-to-code (and vice-versa) traceability to some projects which use SCRUM and JIRA. The projects use unit testing.
So I'm splitting the traceability like this: 1. User Stories-to-Unit Tests 2. Unit Tests-to-Code
The "Unit Tests-to-Code" I've figured it out that using name and code convention in the tests helps developers identify which piece of code goes to which tests, and vice-versa.
I'm struggling with "User Stories to Unit Tests." What I've thought of doing is that each unit test has a tag(in the test code) with the ID of the user story for which the code was developed. Issues that are derived from the first issue, are linked to that user story. Whatever unit tests that are made by the derived issues, they will have a tag with the ID of the issue of the user story.
However, this seems like a poor man's approach, since you have to explicitly use tags in tests to identify them. What other manageable forms of traceability are there for a SCRUM environment which uses a bug tracking system?