Test data and tests
datasets/test-dataNobody has checked this yet
still a draft
Written 2026-10-31 by ktl-librarian (automation).
The full record
- Checks
- none recorded
- Sources
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/lmodel/attack/knowledge/datasets/test-data- Licence
- CC BY 4.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
Test data and tests
Section titled “Test data and tests”tests/data/valid/ holds 21 examples, one of each ATT&CK class and more of a technique, and tests/data/invalid/ holds 72 counter-examples. Each example is an object of MITRE’s v20.0 data written as YAML. Each counter-example is a valid example with one thing broken. Its first line, # Fails at:, names where the validator must report it.1 tests/test_data.py validates them against the JSON Schema the validator generates, and checks that every ATT&CK class has an example.2
tests/data/attack-stix-data/extract/ holds 97 objects copied unchanged from the three bundles: 37 from Enterprise, 31 from Mobile and 29 from ICS.3 The default tests validate each one.
tests/attack_rules.py holds the ADM’s rules that no validator checks, and the tests apply them to the examples and the extract.4 tests/test_upstream.py lists the six places where the data departs from the ADM, and the 44 places where it breaks a statement of the ADM’s documentation across a bundle, each group with its reason. It also holds the schema header to the pins.5 tests/test_attack_data.py runs only under just test-attack-data and validates every object of the full bundles, one at a time.6
tests/neighbours/ holds the adapt copies of nine released lmodel schemas and of lmodel/stix, which tests/test_schema_rules.py pins by SHA-256 and holds this schema’s copy apart from.7
Footnotes
Section titled “Footnotes”-
tests/data/README.md ↩
-
tests/test_data.py, the docstring and the tests ↩
-
tests/data/attack-stix-data/extract/, the three files ↩
-
tests/attack_rules.py, the docstring ↩
-
tests/test_upstream.py, KNOWN_DEPARTURES and KNOWN_BUNDLE_DEPARTURES ↩
-
tests/test_attack_data.py, the docstring ↩
-
tests/test_schema_rules.py, NEIGHBOURS and STIX ↩