ftw
ftw copied to clipboard
Add test coverage based on passed rules directory
As a security rules tester, I would like to have tests results coverage based on the tests and on the rules I am testing.
Requirements
- add an optional
--coverage
parameter, with a mandatory--rules
directory parameter that will contain rules. - rules will be read from
*.conf
files in that directory - a map will contain the rule identifiers as key
- for every test that starts with the ID of the rule, we add a counter or similar to the map
- after running all tests, we can display a summary of the map based on keys empty/with content.
Output
- summary of the tests run plus the coverage percentage based on the map