Skip to content

Commit 1e10854

Browse files
committed
[tests] [docs] update README for new test naming scheme
1 parent 5a9da37 commit 1e10854

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/functional/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ don't have test cases for.
2727
`set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of
2828
the subclass, then locally-defined helper methods, then the `run_test()` method.
2929

30+
#### Naming guidelines
31+
32+
- Name the test `<area>_test.py`, where area can be one of the following:
33+
- `feature` for tests for full features that aren't wallet/mining/mempool, eg `feature_rbf.py`
34+
- `interface` for tests for other interfaces (REST, ZMQ, etc), eg `interface_rest.py`
35+
- `mempool` for tests for mempool behaviour, eg `mempool_reorg.py`
36+
- `mining` for tests for mining features, eg `mining_prioritisetransaction.py`
37+
- `p2p` for tests that explicitly test the p2p interface, eg `p2p_disconnect_ban.py`
38+
- `rpc` for tests for individual RPC methods or features, eg `rpc_listtransactions.py`
39+
- `wallet` for tests for wallet features, eg `wallet_keypool.py`
40+
- use an underscore to separate words
41+
- exception: for tests for specific RPCs or command line options which don't include underscores, name the test after the exact RPC or argument name, eg `rpc_decodescript.py`, not `rpc_decode_script.py`
42+
- Don't use the redundant work `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py`
43+
3044
#### General test-writing advice
3145

3246
- Set `self.num_nodes` to the minimum number of nodes necessary for the test.

0 commit comments

Comments
 (0)