Skip to content
Management of requirements in python
Python Batchfile
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

pyReq management of requirements in python language

Purpose can be used for :

  1. Parsing requirements via regexp from pdf files

    ./ ../in/docExample.pdf "(RQT_[0-9]{4})(.*)" ../work/docExample.json

    will extract requirements of docExample.pdf via a regular expression in docExample.json

  2. Adding attributes to requirements (TargetMilestone, Maturity)

    ./ ../in/reqListSprints.xlsx ../work/docExample.json

    will add attributes of requirements from reqListSprints.xlsx to docExample.json

  3. Traceability from requirement to others requirements (ex: testcase)

    ./ ../in/reqListCoverage.xlsx ../work/docExample.json

    will provides traceability between requirements from reqListCoverage.xlsx to docExample.json

  4. Sorting requirements

    ./ ../work/docExample.json ../out/reqListStatusKO.xlsx

    will extract requirements which have tests failed from docExample.json to reqListStatusKO.xlsx

  5. Exporting requirements to testlink tool

    ./ ../work/docExample.json ../out/testlinkInput.csv

    will export a testlink csv file from docExample.json

Installation and run demo

  1. Linux Ubuntu

    • install pdfminer (for pdf management):

      sudo apt-get install python-pdfminer

    • install openpyxl (for xlsx management):

      sudo apt-get install python-openpyxl

    • enjoy !

      cd scripts


  2. Windows

    c:\Python27\python.exe install

    • enjoy !

      cd scripts


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

more information in : doc/pyReq.pdf

Something went wrong with that request. Please try again.