jsnapy
jsnapy copied to clipboard
Feature Request: Test Classification
Type: Feature Request Name: Test Classification Submitter: Diogo Montagner [email protected] Description:
Each test should contain a classification. It could be something like: Critical, Very Important, Important and General. The values could be pre-defined or customised by the customer.
@dmontagner Can you provide a use case with example?
As per my understanding, are you looking for something like below?
critical_interfaces_terse:
- command: show interfaces terse
- item:
xpath: //physical-interface
major_interfaces_terse:
- command: show version
- item:
...
Now while running we can specify which test case need to be run (by default all) jsnapy --check pre post --level critical -f xxx.yml
or how about
interfaces_terse:
- category: critical
- command: show interfaces terse
- item:
xpath: //physical-interface
interfaces_terse:
- category: major
- command: show version
- item:
@ydnath Your suggestion is inline with what I was thinking.
Adding a little bit more on this:
The categories could be either configured within the same file where the tests are being defined or in the jsnapy.conf file (same file where we define the path for the files).
Ideally, when running the snapcheck where we the pass/fail for each test case, we could have an option (optional or turned on by default) to present a summary of how many tests passed and failed per category.
Something like:
Critical: X passed / Y failed Major..: Z passed / W failed ....