diff --git a/agent_docs/e2e_tests.md b/agent_docs/e2e_tests.md index 37b3e8942..c25b7777b 100644 --- a/agent_docs/e2e_tests.md +++ b/agent_docs/e2e_tests.md @@ -2,6 +2,8 @@ This document applies only to E2E functional tests under `cardano_node_tests/tests/`. Unit tests for the framework itself live under `framework_tests/` and are plain pytest tests. +Never add unit tests for code under `cardano_node_tests/tests/`, including test-specific helpers and fixtures. Validate changes to that code through E2E functional tests instead. + The guidelines apply to writing new tests and also to larger changes of existing tests (refactoring, extending, moving tests or fixtures). When changing an existing test, bring the parts you touch in line with these guidelines, but don't rewrite unrelated code just to comply. Organize tests in classes that group related functionality. diff --git a/agent_docs/running_tests.md b/agent_docs/running_tests.md index 88303b478..b019e37a6 100644 --- a/agent_docs/running_tests.md +++ b/agent_docs/running_tests.md @@ -8,6 +8,8 @@ Unit tests cover the testing framework itself (`framework_tests/` plus doctests ./.venv/bin/pytest --doctest-modules framework_tests cardano_node_tests/utils/ ``` +Never add unit tests for code under `cardano_node_tests/tests/`, including test-specific helpers and fixtures, even if the unit tests would live in `framework_tests/`. Validate that code through E2E functional tests instead. + ## E2E Functional Tests E2E functional tests (everything under `cardano_node_tests/tests/`) run against a local testnet cluster. The tests are using pytest. Always use the `ai_run.sh` wrapper script to run the `pytest` command.