usnistgov / oscal-xslt

Open source XSLT for OSCAL display and processing
Other
6 stars 3 forks source link

Validation 'field test' harnesses for OSCAL #15

Open wendellpiez opened 6 months ago

wendellpiez commented 6 months ago

An OSCAL developer might wish to test OSCAL schemas (of whatever sort) against sets of documents known to be valid and invalid, for purposes of testing conformance to expectations of respective metaschema designers.

This will give us a basis for detecting and preventing problems such as reported in https://github.com/usnistgov/OSCAL/issues/1989.

I.e. for OSCAL catalog we want a library of catalogs and near-catalogs, along with a way to tell if a given schema validator (tool or schema) can tell the difference.

A pipeline could then be used to test an arbitrary XSD or JSON Schema against a test sample set, appropriately designed and linked with specifications.

Ultimately (not immediately) such a deployment should support:

Goals

Nb: This process must not fail under CI/CD, while any tests for its functionality or integrity can do so. Being able to set up and run this testing pipeline is a goal, and this includes being able to set it up under CI/CD. Doing so is not a goal, except for in service of OSCAL 1989 (and for demonstration).

Secondary goals

Considerations

This Issue is also in support of https://github.com/usnistgov/metaschema-xslt/issues/105; when that bug repair is done, the work done here should be able to confirm the correctness of its schema(s).

To do this in the XML stack we need XProc 3.0 for its JSON Schema support. This is a minus as well as a plus, as this will require a new processor (MorganaXProcIII). Documenting and scripting this is in scope for this Issue.