Of the unique needs of a requirements and test management system when working in the Defense industry, specifically when designing, building, and testing mission systems, is the ability to link individual test steps to the requirements. Since v5 of SpiraTest, this has been possible inside the Spira user interface, however many customers have been looking for a way to map test steps to requirements in bulk using Excel.


When designing and developing mission systems for the Defense industry, you need to show traceability for the individual test steps being executed, back to the underlying requirements. This is in contrast to other types of system, where traceability between the requirements and the overall test case is usually sufficient.

To address this specific need, we added support for linking test steps to requirements.  However our current Excel Add-In for importing requirements and test cases into Spira, only supports linking the requirements to test cases, not individual test steps. So you had to associate everything inside the UI, which could be laborious if you were loading in existing tests and requirements from Excel.

Using Rapise to Import Test Step Traceability

So, to give you a way to load in your requirements - test step association in bulk, we used the existing Spira REST API and the Spreadsheet and API automation capabilities of Rapise to provide a solution for loading in your requirements and test step associations:

The sample Rapise project is available on our GitHub repository, and the complete source code is also attached to this article as a zipfile. Simply download the zipfile, extract to a local folder and open the .sstest file in Rapise. The code in the Link Requirements to Test Steps with Excel.user.js file should be modified to have the correct SpiraTest URL, login, password and project ID:

//Put your custom functions and variables in this file
var username = 'administrator';
var apiKey = '{25070416-723F-4FF1-8B38-A810C7EF1BA6}';
var projectId = 1;    /* Sample: LIS */

//Documentation on Inflectra website

function Init()
    //Set the correct URL
    Session.SetUrl('http://api.inflectra.com/Spira', 'http://doctor/SpiraTeam');

Once you have done that, simply populate the spreadsheet with the Requirements IDs and Test Steps IDs, click Execute and the data will be loaded into SpiraTest:


Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 10/18/2018
  • Article ID: KB396
  • Views: 138