This chapter describes how to associate requirements with files so that the a Parasoft traceability report can show static analysis violations and build reviews within the context of the analyzed source files. 

The following workflow describes how to enable requirements traceability for a specific build ID. You must repeat the steps for each additional build ID you want to view requirements traceability information for.

  1. Create requirements (e.g., Jira stories) in the requirements tracking system. 
  2. Create a CSV file that maps the source code files for your project to the requirement IDs generated by your ALM system, e.g.:

    FileAssociated Requirement ID




    reqA, reqB, reqC

    The file may be prepared manually by team members or it can be automated with a script. For example, the script could scan the source control repository for requirements markers added by developers and generates the CSV file accordingly.

  3. Add the file-to-requirement association information to the DTP database by checking the source code files into source control and running your Parasoft tool. The tool execution must be run under the specific build ID and project (see the documentation for the tool for instructions on how to specify this metadata).
  4. Run the CSV-scanning script shipped in the <DTP_INSTALL>/grs/extras/traceability directory with the following arguments:

    groovy fileReqAssoc.groovy -csv <CSV_FILE_NAME> -build <BUILD_ID> -dtp <DTP_HOST_INC_PROTOCOL> -user <DTP_USERNAME> -password <DTP_PASSWORD>

After the script finishes, the traceability data for the specific filter ID and build ID will be stored in the database. The data can now be viewed using one of the following methods: