regulation-as-code
v1.4.1
Published
Regulation as Code
Downloads
58
Readme
regulation-as-code
Library that parses the necessary documentation and test files and generates reports out of them required for audit and review purposes.
It supports the following:
- requirements and quality attributes from markdown files
- requirements from cucumber feature files
- specs from xunit test reports
- specs from mocha test reports
Install
npm install regulation-as-code
Usage - command line
//show help
npx regulate --help
//generating JSON of manual annotated tests
npx regulate --srs=docs/srs.md --risk=docs/risks.md --test=docs/mocha-report.json --mo=manualtest-output.json
//generating Markdown with VNV Output and Risk Output
npx regulate --srs=docs/srs.md --risk=docs/risks.md --test=docs/mocha-report.json --vo=vnv-output.md --ro=risk-output.md
Usage - through code
import { writeRegulation } from 'regulation-as-code';
function write() {
writeRegulation('docs/srs.md', 'docs/risks.md', 'docs/mocha-report.json', 'vo.md', 'ro.md', 'mo.md');
}
Usage - github action
- uses: Byteflies/regulation-as-code@feat-add-regulate-github-action
name: Run regulation as code
id: regulate
with:
srs: docs/software_requirement_specification.md
risk: docs/risk_management.md
tests: xunit*.xml
- name: Upload Regulations report
uses: actions/upload-artifact@v3
with:
name: Regulations report
path: ${{ steps.regulate.outputs.output }}