Closed rob-metalinkage closed 6 months ago
I've implemented this functionality:
tests.yaml
as a list, using a ref
property for the location of the test resource, and optionally an output-filename
and/or require-fail
.I've also added .yml and .yaml files to the validation pipeline, as if they were JSON. And fixed some code that was being too lenient when parsing JSON examples (I was using the YAML parser for this, so trailing commas and missing quotes were being accepted as valid JSON, which they shouldn't).
Traditional tests/*
and examples should keep on working as before (please let me know if they don't).
Use Case: (e.g. SOSA) - a specification defines a set of failure test cases - (potentially with SHACL rules, but may be simply examples violating specification clauses)
If we use these in examples.yaml the validation logic fails - failures do not respect expected fail test
suggestion: Allow an optional tests.yaml that supports failure testing - could be snippets-fail: or something since we may not be able to rely on file naming.
tests/* should still automatically test.