Skip to main content

Module requirements

Module requirements 

Source
Expand description

A site’s requirements, checked against its tests: the requirements system extension. A page of type constraint is a requirement a test can check; a test points at it by its id — the id of the page’s front matter — which the site’s own pattern reads out of its test files. A constraint no test points at is a problem, and so is a test pointing at no constraint. Each suite’s run command prints its results as JUnit XML, which junit reads; the command itself is run by the binary.

A requirement belongs to a part: a page in <part>/requirements/ is a requirement of the part whose folder that is, and of every part below it. listing is what the Requirements widget shows on a part’s page, and save keeps the last run’s results in .devpage/, so the widget can say whether each constraint is met.

Structs§

Case
One test of a JUnit report.
Pointer
A test pointing at a constraint: the id it names and where it does.
Requirements
A site’s requirements as configured: its test suites.
Results
One run of a site’s tests, as kept: when, and each constraint’s tests.
Suite
One suite of tests, ready to be searched.
Tested
A test pointing at a constraint, and how it did.

Enums§

Outcome
How one test pointing at a constraint did in a run.

Functions§

junit
The tests of a JUnit report: every testcase, failed when it holds a failure or an error. text is whatever a command printed: several reports one after another, as a command running several test binaries prints them, with anything else between them — a build’s own output — passed over.
listing
What the Requirements widget shows on page, a page of the site in base whose document is named document: a Markdown list of the requirements of the page’s part — the pages in the requirements folder beside it — each a link, then — and whether it is met by the last run kept, or its kind when no test checks it; then, for each part above that has requirements, an item naming the part with its requirements listed under it. After the list, the time of the run, when one is kept.
problems
What is wrong between a site’s constraints and its tests, without running one: a constraint with no id, a constraint no test points at, a test pointing at no constraint, and two constraints with one id. Nothing for a document with no requirements.
results
What a run of document’s tests, ended at checked, shows of each of its constraints: the tests pointing at it, each with how it did in cases. The test a pointer names is the first of the report’s tests named after it in its file — the test the pointer is written on.
run_problems
What a suite’s run shows is wrong, from what its command printed and how it exited: each failed test, that it printed no report at all, or that it failed though its report names no failed test. The problems are the document file’s.
save
Keeps results as document’s last run, in the served folder’s .devpage/ — made, with the .gitignore that keeps git away from it, when it isn’t there.