Xuse User Guide: CSV import export

For flexibility, portability/tool integration and general ease of use, Xuse supports the importing and exporting of requirements in CSV (comma seperated values) format. Potential uses of this feature include (but are not limited to) the following:

  • Initial import of requirements from an existing Spreadsheet.
  • Import of requirements from an existing requirements tool/database that has CSV export capability.
  • Export of requirements from Xuse for offline editing and addition of requirements in a spreadsheet. This would typically followed by subsequent (re-)import back into Xuse.
  • Export of Xuse requirements for import into other tools that can handle CSV format - e.g. test tools.

Note: theses features are only available in Xuse version 01.00.x or later

CSV import

The CSV import command imports a CSV file and creates a Xuse compatible XML equivalent. The CSV import function only allows the creation of a complete requirements document specifically it does not allow merge, append or other similar import functions.

The import file name defaults to PROJECT_DIR/src/requirements/requirements-import.csv and the result is saved to PROJECT_DIR/src/requirements/requirements-import.xml, however the default value can be overridden by specifying the appropriate properties.

Note: the import function will overwrite the file specified by the xuse.requirements.import.result property. Please make sure you have backed up (or version controlled) your work prior to running this command.

CSV Export

The CSV export command exports the project requirements into a CSV file. This may be for the purpose of offline analysis, editing, sharing or tool integration.

CSV Format

The table below describes the format of the CSV file. In all cases the column order is not important. The most important thing is that the columns are labelled correctly. For CSV import this is used in the mapping process; column labels should be on the first (header) row of the CSV file. For further details of the purpose of each field please see the requirements guide.

Note: to escape text please use normal " (quotation) marks. If you wish to use quotation marks within the text to be imported these should be escaped using a preceding quotation mark e.g "". Thus a line of CSV might look like:

RQ3,"Title with, a comma", "Description with a ""quote""", ...

An example CSV file can be downloaded here...

Column Card.* Mapping Comments
ID 1 xuse:req/@id Unique identifier for the requirement
REQ_VERSION 1 xuse:req/@version The version number for this requirement
TITLE 0..1 xuse:req/xuse:title The requirement title
DESCRIPTION 1 xuse:req/xuse:description The requirement description
CREATION_DATE 0..1 xuse:req/@creation-date Must be in YYYY-MM-DD format.
MODIFICATION_DATE 0..1 xuse:req/@modification-date. Must be in YYYY-MM-DD format.
PACKAGE 0..1 xuse:req/xuse:classification/xuse:package
STATUS 1 xuse:req/xuse:classification/xuse:status One of:
  • proposed
  • agreed
  • onhold
  • rejected
  • partially-implemented
  • implemented
TYPE 1 xuse:req/xuse:classification/xuse:type One of:
  • functional
  • non-functional
  • constraint
  • architectural
  • technical
  • inverse
STRENGTH 1 xuse:req/@strength One of:
  • shall
  • should
  • may
FEATURE 0..1 xuse:req/xuse:classification/xuse:type/@is-feature One of:
  • yes
  • no (default)
ANNOTATION 0..1 xuse:req/xuse:annotation/xuse:description
ANNOTATION_AUTHOR 0..1 xuse:req/xuse:annotation/xuse:author
ANNOTATION_AUDIENCE 0..1 xuse:req/xuse:annotation/xuse:intended-audience
ANNOTATION_DATE 0..1 xuse:req/xuse:annotation/xuse:creation-date Must be in YYYY-MM-DD format.
PARENT 1 xuse:req/xuse:parent/@refId Leave blank for each row where not appropriate.
RELATED_REQ 0..n xuse:req/xuse:req-ref/@refId Leave blank for each row where not appropriate.
STAKEHOLDER 0..n xuse:req/xuse:stakeholder-ref/@refId Leave blank for rows where it is not relevant.
TAX-<classifier> 0..n xuse:req/xuse:classification/xuse:taxonomy[@classifier=<classifier>] Allows custom taxonomy. Classifiers must be unique.

* - represents the number of columns expected in the import file.