From 1e10854038796f211cefd171d368f537a3d68cee Mon Sep 17 00:00:00 2001 From: John Newbery Date: Thu, 14 Sep 2017 11:16:20 -0400 Subject: [tests] [docs] update README for new test naming scheme --- test/functional/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/functional/README.md') diff --git a/test/functional/README.md b/test/functional/README.md index 2558bd017d..f352837858 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -27,6 +27,20 @@ don't have test cases for. `set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of the subclass, then locally-defined helper methods, then the `run_test()` method. +#### Naming guidelines + +- Name the test `_test.py`, where area can be one of the following: + - `feature` for tests for full features that aren't wallet/mining/mempool, eg `feature_rbf.py` + - `interface` for tests for other interfaces (REST, ZMQ, etc), eg `interface_rest.py` + - `mempool` for tests for mempool behaviour, eg `mempool_reorg.py` + - `mining` for tests for mining features, eg `mining_prioritisetransaction.py` + - `p2p` for tests that explicitly test the p2p interface, eg `p2p_disconnect_ban.py` + - `rpc` for tests for individual RPC methods or features, eg `rpc_listtransactions.py` + - `wallet` for tests for wallet features, eg `wallet_keypool.py` +- use an underscore to separate words + - 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` +- Don't use the redundant work `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py` + #### General test-writing advice - Set `self.num_nodes` to the minimum number of nodes necessary for the test. -- cgit v1.2.3 From 7250b4e5630ec6e440652855876ba83b0365a15a Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 30 Nov 2017 19:51:32 +1000 Subject: [tests] README.md nit fixes --- test/functional/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/README.md') diff --git a/test/functional/README.md b/test/functional/README.md index f352837858..8d2cd02345 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -39,7 +39,7 @@ don't have test cases for. - `wallet` for tests for wallet features, eg `wallet_keypool.py` - use an underscore to separate words - 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` -- Don't use the redundant work `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py` +- Don't use the redundant word `test` in the name, eg `interface_zmq.py`, not `interface_zmq_test.py` #### General test-writing advice @@ -87,7 +87,7 @@ start the networking thread. (Continue with the test logic in your existing thread.) - Can be used to write tests where specific P2P protocol behavior is tested. -Examples tests are `p2p-accept-block.py`, `p2p-compactblocks.py`. +Examples tests are `p2p-acceptblock.py`, `p2p-compactblocks.py`. #### Comptool -- cgit v1.2.3