Skip to content

Commit 98f668f

Browse files
committed
docs: document parallel test guidance
1 parent df8b218 commit 98f668f

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
- Before committing, run `just lint`.
1717
- `just lint`: run pre-commit hooks across the repo.
1818
- `just test`: run the pytest suite.
19+
- `just test-xdist`: run the pytest suite in parallel.
1920
- `just test-cov`: run tests with coverage for `mitreattack`.
21+
- `just test-cov-xdist`: run tests with coverage in parallel.
2022
- `just build`: build distributions with `uv build`.
2123
- Without `just`, run the same tools through `uv run ...`.
2224

@@ -32,6 +34,10 @@
3234
- Framework: `pytest` (with `pytest-cov` for coverage checks).
3335
- Place tests under `tests/` and name files/functions `test_*.py` / `test_*`.
3436
- Add or update tests for behavior changes, especially around STIX parsing and changelog/diff output paths.
37+
- Tests that need real ATT&CK STIX data should use the shared STIX fixtures instead of downloading or
38+
preparing bundles directly.
39+
- Parallel runs warm the shared STIX cache before workers start; update `DEFAULT_ATTACK_STIX_PREP` in
40+
`tests/conftest.py` if a new xdist-backed test needs another ATT&CK release.
3541
- Run `just test` locally before opening a PR; use `just test-cov` for larger changes.
3642

3743
## Commit & Pull Request Guidelines

docs/CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,17 @@ Run `just` with no arguments to see all available commands. Here are the most co
5252
```bash
5353
just lint # Run pre-commit hooks (ruff format) on all files
5454
just test # Run tests
55+
just test-xdist # Run tests in parallel
5556
just test-cov # Run tests with coverage report
57+
just test-cov-xdist # Run tests with coverage in parallel
5658
just build # Build the package
5759
```
5860

61+
Tests that need real ATT&CK STIX data should use the shared STIX fixtures instead of downloading or
62+
preparing bundles directly. Parallel test runs warm the shared STIX cache before workers start; if a
63+
new xdist-backed test needs an additional ATT&CK release, update the cache warmup list in
64+
`tests/conftest.py`.
65+
5966
### Pull Requests
6067

6168
When making a pull request, please make sure to:

0 commit comments

Comments
 (0)