zcashd/qa/rpc-tests
Jack Grigg e15eaf0343 QA: Fix backporting bugs in httpbasics.py 2020-10-01 13:44:21 +01:00
..
golden Update golden test for heartwood network upgrade. 2020-05-07 19:12:24 -06:00
test_framework Auto merge of #2778 - syd0:add-python-assert, r=daira 2020-09-03 14:26:54 +00: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 test: Ignore timestamps in addressindex checks 2020-04-14 20:56:37 +12:00
bip65-cltv-p2p.py clean-up imports, keep string notation consistent, remove spacing 2020-02-09 08:15:43 -08:00
bipdersig-p2p.py update io module, fix py3 division, and string encoding 2020-02-09 08:15:43 -08:00
blockchain.py Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-09 08:23:57 -06:00
coinbase_funding_streams.py Fix pyflakes. 2020-07-02 16:54:49 -06: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
feature_logging.py fix test cases 2020-05-28 10:58:04 -03:00
feature_walletfile.py Fix typos 2020-09-25 10:49:57 +03:00
feature_zip221.py Remove unused imports. 2020-05-05 11:41:06 -06: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
framework.py remove unused import 2020-03-19 08:46:33 -03:00
fundrawtransaction.py clean-up imports, keep string notation consistent, remove spacing 2020-02-09 08:15:43 -08:00
getblocktemplate.py Update py2 env path, remove py2 assert 2020-02-09 08:14:21 -08:00
getblocktemplate_longpoll.py Add basic coverage reporting for RPC tests 2020-03-24 21:51:51 +13: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 QA: Fix backporting bugs in httpbasics.py 2020-10-01 13:44:21 +01: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 Updating remaining python3 conventions 2020-02-10 13:15:26 -08:00
listtransactions.py Remove unused import in qa/rpc-tests/listtransactions.py 2020-06-03 12:25:31 +01:00
maxblocksinflight.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
mempool_limit.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mempool_nu_activation.py Fix decimal 0 issues 2020-02-09 08:17:32 -08:00
mempool_reorg.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mempool_resurrect_test.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mempool_spendcoinbase.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mempool_tx_expiry.py remove space after new line 2020-03-07 09:26:25 -03:00
mergetoaddress_helper.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mergetoaddress_mixednotes.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mergetoaddress_sapling.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
mergetoaddress_sprout.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
merkle_blocks.py Auto merge of #4280 - oxarbitrage:issue2197, r=daira 2020-03-05 16:36:32 +00:00
mining_shielded_coinbase.py Implement zip-207 and zip-214. 2020-06-25 16:15:50 -06:00
multi_rpc.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
nodehandling.py clean-up imports, keep string notation consistent, remove spacing 2020-02-09 08:15:43 -08:00
p2p-acceptblock.py Updating remaining python3 conventions 2020-02-10 13:15:26 -08:00
p2p_node_bloom.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
p2p_nu_peer_management.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
p2p_txexpiringsoon.py update io module, fix py3 division, and string encoding 2020-02-09 08:15:43 -08:00
p2p_txexpiry_dos.py Update to py3, ISSUE with encoding 2020-02-09 08:15:43 -08:00
paymentdisclosure.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
post_heartwood_rollback.py Missing NU4->Canopy renames. 2020-05-29 10:02:50 +01:00
prioritisetransaction.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
proxy_test.py update to py3 conventions, preserve ipv6 patch 2020-02-09 08:14:21 -08:00
pruning.py Update ignored testScriptsExt to Python3 2020-02-09 08:14:21 -08:00
rawtransactions.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
receivedby.py update docs 2020-05-30 10:34:03 -03:00
regtest_signrawtransaction.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
reindex.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
remove_sprout_shielding.py Remove unused imports from remove_sprout_shielding RPC test. 2020-07-02 11:09:22 -06:00
reorg_limit.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
rest.py Fixed multiple typos 2020-09-23 00:07:48 +01:00
rewind_index.py Narrow down the test case. 2020-04-14 17:47:29 -06:00
rpcbind_test.py Add basic coverage reporting for RPC tests 2020-03-24 21:51:51 +13:00
sapling_rewind_check.py Remove unused imports. 2020-05-05 11:41:06 -06:00
script_test.py Updating remaining python3 conventions 2020-02-10 13:15:26 -08:00
shorter_block_times.py fix type issue 2020-02-09 08:15:43 -08:00
signrawtransaction_offline.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
signrawtransactions.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
smartfees.py Fixed multiple typos 2020-09-23 00:07:48 +01:00
spentindex.py Update to py3 conventions, update filter to return list 2020-02-09 08:14:21 -08:00
sprout_sapling_migration.py Update type to be decimal 2020-02-09 08:15:43 -08:00
timestampindex.py update to py3 conventions, update range to return list for py3 2020-02-09 08:14:21 -08:00
turnstile.py preserve test semantics 2020-03-18 22:49:44 -03:00
tx_expiry_helper.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
txn_doublespend.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
upgrade_golden.py Rename golden/nu4.tar.gz to canopy.tar.gz. 2020-05-29 01:30:30 +01:00
wallet.py Rename z_*_balance fields of getwalletinfo output to shielded_*_balance 2020-09-03 14:43:10 +01:00
wallet_1941.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_addresses.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_anchorfork.py flush wallet db (SetBestChain()) on clean shutdown 2020-07-20 20:04:48 -06:00
wallet_changeaddresses.py clean up conventions and whitespace 2020-02-09 08:44:23 -08:00
wallet_changeindicator.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_db_flush.py fix pyflakes CI errors 2020-07-02 14:32:48 -06:00
wallet_import_export.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_listnotes.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_listreceived.py remove additional not needed casts from py tests 2020-05-18 18:09:07 -03:00
wallet_nullifiers.py Auto merge of #4249 - oxarbitrage:issue_3724, r=str4d 2020-04-25 05:28:16 +00:00
wallet_overwintertx.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
wallet_persistence.py Store imported Sapling ExtFVKs in wallet database 2020-02-21 01:32:15 +00:00
wallet_sapling.py add expected address check to tests 2020-04-07 10:39:33 -03:00
wallet_sendmany_any_taddr.py wallet: Ignore coinbase UTXOs with z_sendmany ANY_TADDR 2020-09-22 17:45:09 +01:00
wallet_shieldcoinbase.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
wallet_shieldcoinbase_sapling.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
wallet_shieldcoinbase_sprout.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
wallet_shieldingcoinbase.py preserve test semantics 2020-03-18 22:49:44 -03:00
wallet_treestate.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
walletbackup.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
zapwallettxes.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
zcjoinsplit.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
zcjoinsplitdoublespend.py Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
zkey_import_export.py fix pyflakes errors 2020-02-09 08:18:00 -08:00
zmq_test.py fix pyflakes errors 2020-02-09 08:18:00 -08: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