diff --git a/src/validations/constraints/unit-tests/unit_test_metaschema.xml b/src/validations/constraints/unit-tests/unit_test_metaschema.xml new file mode 100644 index 000000000..8317bdc65 --- /dev/null +++ b/src/validations/constraints/unit-tests/unit_test_metaschema.xml @@ -0,0 +1,93 @@ + + + OSCAL Unit Test Module + 1.0.0 + oscal-unit-tests + http://github.com/gsa/fedramp-automation/constraint/test + http://github.com/gsa/fedramp-automation/constraint/test + + Test Case Document + This is the root element of the FedRAMP Automation Test Suite format for collections of unit tests. + test-case + + + + + + + + + + + + + + Test Case Name + The name of the test case collection within a test cases file. + + + Test Case Description + The description of the test case collection within a test case file. + + + Test Case Content Path + A relative or absolute file path or HTTP URL to the OSCAL document instance for which the test runs. + + + Test content URL does not point to a valid file or HTTP resource. If the path is invalid, tests are not operable. Are you sure it's correct? + + + +

In this format, we often use relative paths that are not strictly conformant to the URI datatype in Metaschema.

+

There, we use the default implied as-type="string" and not as-type="uri".

+

However, this approach does work and the constraint passes successfully.

+

At this time, a violation where the test evaluates to `false()` throws a lower-level exception.

+

See metaschema-framework/metaschema-java#219 for details.

+
+
+ + Test Case Pipeline Action + The test case pipeline is a sequence of one or more actions to execute before the test runner executes the test suite. + + + + + + + + Test Case Expectation + This assembly defines the relevant constraint ID and the desired result when executing tests over the content. There MAY be one or more expectations. + + + + + + + Constraint ID for the Expectation + The @id attribute for a given constraint for which the test serves to match the expectation. + + + Expectation Result + The expected result type in SARIF format for the expectation. The expectation only supports specific values, defined in a constraint. + + + Use when the desired result of test execution without a constraint passing + Use when the desired result of test execution with a constraint violation + + + + + Pipeline Action + An action for a pipeline to perform before the test runner executes the test suite. This field only supports allowed values explicitly defined in the constraint. + + + An action declaration to perform profile resolution for a profile associated with expectation test case. + +

See the official FedRAMP's documentation on profile resolution for detailed information.

+
+
+
+
+