zcashd/qa/rpc-tests
mdr0id e241df647f Update cmp to py3 functions, update map return to list for py3 2020-02-09 08:14:21 -08:00
..
test_framework Update rpc-test/test_framework to Py3 convention,modules,encoding 2020-02-09 08:14:21 -08:00
.gitignore Python-based regression tests 2014-02-28 15:24:31 -05:00
README.md Fix some typos in rpc-tests readme 2018-08-05 21:51:35 -07:00
addressindex.py insightexplorer: formatting, pyflakes cleanups 2019-08-09 15:27:52 -06:00
bip65-cltv-p2p.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
bipdersig-p2p.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
blockchain.py Update python3 env path, remove python 2.7 assert 2020-02-09 08:14:21 -08:00
decodescript.py Update hexlify for encoding, update to py3 io module 2020-02-09 08:14:21 -08:00
disablewallet.py Update py3 env path, remove py2 assert 2020-02-09 08:14:21 -08:00
finalsaplingroot.py Update py2 conventions to py3, remove py2 env and assert 2020-02-09 08:14:21 -08:00
forknotify.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
fundrawtransaction.py Update py2 conventions to py3, update Decimal calls 2020-02-09 08:14:21 -08:00
getblocktemplate.py Update py2 env path, remove py2 assert 2020-02-09 08:14:21 -08:00
getblocktemplate_longpoll.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
getblocktemplate_proposals.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
getchaintips.py Update py2 env path, remove py2 assert 2020-02-09 08:14:21 -08:00
getrawtransaction_insight.py Update py2 env path, remove py2 assert, update filter to return list for py3 2020-02-09 08:14:21 -08:00
hardforkdetection.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
httpbasics.py Update py2 env path, remove py2 assert, update http module and assert encoding 2020-02-09 08:14:21 -08:00
invalidateblock.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
invalidblockrequest.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
key_import_export.py Update cmp to py3 functions, update map return to list for py3 2020-02-09 08:14:21 -08:00
keypool.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
listtransactions.py Add p2sh option to importaddress to import redeemScripts 2019-11-14 14:48:21 +00:00
maxblocksinflight.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
mempool_limit.py Remove dots and underscores from parameter names 2019-10-21 09:20:17 -06:00
mempool_nu_activation.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mempool_reorg.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mempool_resurrect_test.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
mempool_spendcoinbase.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
mempool_tx_expiry.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mergetoaddress_helper.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
mergetoaddress_mixednotes.py remove zmergetoaddress from experimental state in rpc-tests 2019-11-06 10:57:10 -03:00
mergetoaddress_sapling.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mergetoaddress_sprout.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
merkle_blocks.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
multi_rpc.py [doc] Fix markdown 2019-12-17 12:18:50 -06:00
nodehandling.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
p2p-acceptblock.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
p2p_node_bloom.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
p2p_nu_peer_management.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
p2p_txexpiringsoon.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
p2p_txexpiry_dos.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
paymentdisclosure.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
prioritisetransaction.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
proton_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
proxy_test.py Update `import *` to unblock pyflakes from failing 2019-12-02 11:38:33 -08:00
pruning.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
rawtransactions.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
receivedby.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
regtest_signrawtransaction.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
reindex.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
reorg_limit.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
rest.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
rewind_index.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
rpcbind_test.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
script_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
shorter_block_times.py test: Remove genesis-block Sapling activation from shorter_block_times 2019-12-18 15:06:54 -06:00
signrawtransaction_offline.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
signrawtransactions.py Test setting an expiry height of 0. 2019-09-26 20:43:52 +01:00
smartfees.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
spentindex.py insightexplorer: formatting, pyflakes cleanups 2019-08-09 15:27:52 -06:00
sprout_sapling_migration.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
timestampindex.py add timestampindex related RPC getblockhashes 2019-08-08 14:35:07 -06:00
turnstile.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
tx_expiry_helper.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
txn_doublespend.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet.py Auto merge of #4252 - str4d:wallet-interface-refactor, r=str4d 2019-12-18 22:48:26 +00:00
wallet_1941.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
wallet_addresses.py Fix typo 2019-11-12 12:51:45 +02:00
wallet_anchorfork.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
wallet_changeaddresses.py Update to stop random race error from assert 2019-12-02 17:39:00 -08:00
wallet_changeindicator.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_import_export.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_listnotes.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_listreceived.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_nullifiers.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_overwintertx.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_persistence.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_sapling.py Return address and type of imported key in z_importkey 2020-01-22 14:41:02 -03:00
wallet_shieldcoinbase.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
wallet_shieldcoinbase_sapling.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
wallet_shieldcoinbase_sprout.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
wallet_shieldingcoinbase.py test: Add missing sync_all point 2019-12-18 15:06:54 -06:00
wallet_treestate.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
walletbackup.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
zapwallettxes.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
zcjoinsplit.py test: Add sync_all points after block generation to RPC tests 2019-12-18 15:06:54 -06:00
zcjoinsplitdoublespend.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
zkey_import_export.py Return address and type of imported key in z_importkey 2020-01-22 14:41:02 -03:00
zmq_test.py test: Reverse hashtx and hashblock ordering at start of ZMQ RPC test 2019-12-18 15:06:54 -06:00

README.md

Regression tests of RPC interface

test_framework/test_framework.py

Base class for RPC regression tests.

test_framework/util.py

Generally useful functions.

Notes

You can run a single test by calling qa/pull-tester/rpc-tests.sh <testname>.

Run all possible tests with qa/pull-tester/rpc-tests.sh -extended.

Possible options:

-h, --help       show this help message and exit
  --nocleanup      Leave zcashds and test.* datadir on exit or error
  --noshutdown     Don't stop bitcoinds after the test execution
  --srcdir=SRCDIR  Source directory containing zcashd/zcash-cli (default:
                   ../../src)
  --tmpdir=TMPDIR  Root directory for datadirs
  --tracerpc       Print out all RPC calls as they are made

If you set the environment variable PYTHON_DEBUG=1 you will get some debug output (example: PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.sh wallet).

A 200-block -regtest blockchain and wallets for four nodes is created the first time a regression test is run and is stored in the cache/ directory. Each node has the miner subsidy from 25 mature blocks (25*10=250 ZEC) in its wallet.

After the first run, the cache/ blockchain and wallets are copied into a temporary directory and used as the initial test state.

If you get into a bad state, you should be able to recover with:

rm -rf cache
killall zcashd