Class SpecTest
java.lang.Object
io.nosqlbench.nb.spectest.core.SpecTest
- All Implemented Interfaces:
Runnable
This is the entry point into a specification test. By default, all files
within the provided path are checked for the scanner patterns,
and all validators are run. This means:
- All provided paths which are markdown files will be scanned.
- All provided paths which are directories will be recursively scanned for contained markdown files.
- Every included markdown file will be scanned for matching element sequences.
- Every matching element sequence will be validated.
The details of each of these steps should be documented in the specific classes which implement the behavior. At a high level: Key concepts are:
- Specification Files - These are the markdown files and included sets of specification tuples. Specification tuples are sequences of content elements which are recognizable by a scanner as going together to form a multi-part specification and test.
- Scanners - A scanner is a pattern matcher specification, in the form of a set of predicate objects. These are tested against sequences of elements that are found within specification files. Each time a scanner matches a sequence of elements, a specification template is extracted and submitted to a set of validators.
- Specification Template - This is merely a set of content elements which represents a specific specification or example. When a specification template is found, it is extracted with some context metadata that makes it easy to identify and report (like the heading), as well as the content needed for a specification validator to confirm whether or not it passes a test for validity.
- Validators - A validator knows how to assert the validity of a specification template. It is essentially a set of test assertions against a specification template. There are default validators which do different types of validation based on the content type.
-
Method Summary
-
Method Details
-
matchingSpecFiles
-
run
-
builder
-