Management of requirements in python
Python Batchfile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

pyReq management of requirements in python language


EXTRACTION of REQUIREMENTS from WORD DOCUMENTS See examples after Installation and run demo chapter

Installation and run demo

  1. Linux Ubuntu

  2. Windows : NOT TESTED !!

c:\Python27\python.exe install

  • enjoy !

    cd scripts


Examples can be used for :

  1. Parsing requirements via regexp from pdf files
python3 ./ ../in/docExample.pdf "(RQT_[0-9]{4})(.*)" ../work/docExample.json

will extract requirements of docExample.pdf via a regular expression in docExample.json
  1. Adding attributes to requirements (TargetMilestone, Maturity)
 python3 ./ ../in/reqListSprints.xlsx ../work/docExample.json

 will add attributes of requirements from reqListSprints.xlsx to docExample.json
  1. Traceability from requirement to others requirements (ex: testcase)
 python3 ./ ../in/reqListCoverage.xlsx ../work/docExample.json

 will provides traceability between requirements from reqListCoverage.xlsx to docExample.json
  1. Sorting requirements
 python3 ./ ../work/docExample.json ../out/reqListStatusKO.xlsx

 will extract requirements which have tests failed from docExample.json to reqListStatusKO.xlsx
  1. Exporting requirements to testlink tool
 python3 ./ ../work/docExample.json ../out/testlinkInput.csv

 will export a testlink csv file from docExample.json

Directories goal

  • doc: minimalist schema trying to explain how it works
  • in : input files (pdf), xlsx (input): your input(s)
  • out : result of an extraction : dont modify it
  • work: permanent requirements storage (like a database) in json format
  • scripts: python scripts (see doc in doc file)


Req are stored in Json file from python

  • extract requirements from pdf to json

  • allows to write in Json file from xlsx (excel) file a list of requirements + attribute and covered requirements

  • + a list of requirements can get back for this list of requirements the covered req and the correspondings attributes