zcashd/qa/rpc-tests
Eirik Ogilvie-Wigley 102dafdf89 Update block subsidy halving for zip208 2019-07-29 13:44:53 -06:00
..
test_framework Rename vjoinsplit to vJoinSplit 2019-06-16 19:13:49 +03:00
.gitignore
README.md
bip65-cltv-p2p.py
bipdersig-p2p.py
blockchain.py
decodescript.py
disablewallet.py
finalsaplingroot.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
forknotify.py
fundrawtransaction.py
getblocktemplate.py
getblocktemplate_longpoll.py
getblocktemplate_proposals.py
getchaintips.py
getrawtransaction_insight.py add spentindex to getrawtransaction RPC results 2019-06-11 10:29:51 -06:00
hardforkdetection.py
httpbasics.py
invalidateblock.py
invalidblockrequest.py
key_import_export.py
keypool.py
listtransactions.py
maxblocksinflight.py
mempool_nu_activation.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
mempool_reorg.py
mempool_resurrect_test.py
mempool_spendcoinbase.py
mempool_tx_expiry.py
mempool_tx_input_limit.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
mergetoaddress_helper.py Fix z_mergetoaddress sending from ANY_SPROUT/ANY_SAPLING when the wallet contains both note types 2019-06-10 13:21:25 -06:00
mergetoaddress_mixednotes.py Fix z_mergetoaddress sending from ANY_SPROUT/ANY_SAPLING when the wallet contains both note types 2019-06-10 13:21:25 -06:00
mergetoaddress_sapling.py
mergetoaddress_sprout.py
merkle_blocks.py
nodehandling.py
p2p-acceptblock.py
p2p_node_bloom.py
p2p_nu_peer_management.py
p2p_txexpiringsoon.py
p2p_txexpiry_dos.py
paymentdisclosure.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
prioritisetransaction.py
proton_test.py
proxy_test.py
pruning.py
rawtransactions.py
receivedby.py
regtest_signrawtransaction.py
reindex.py
reorg_limit.py
rest.py
rewind_index.py
rpcbind_test.py
script_test.py
shorter_block_times.py Update block subsidy halving for zip208 2019-07-29 13:44:53 -06:00
signrawtransaction_offline.py test: Fetch coinbase address from coinbase UTXOs 2019-03-06 09:03:51 +13:00
signrawtransactions.py
smartfees.py
sprout_sapling_migration.py Fix LogPrint statements 2019-05-10 17:25:30 -06:00
turnstile.py Add qa test for experimental feature: -developersetpoolsizezero 2019-04-23 15:05:15 -07:00
tx_expiry_helper.py
txn_doublespend.py
wallet.py
wallet_1941.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_addresses.py
wallet_anchorfork.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_changeindicator.py
wallet_import_export.py
wallet_listnotes.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_listreceived.py
wallet_nullifiers.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_overwintertx.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_persistence.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_protectcoinbase.py Check for full failure message in test case 2019-04-26 19:01:23 -06:00
wallet_sapling.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
wallet_shieldcoinbase.py test: Fetch coinbase address from coinbase UTXOs 2019-03-06 09:03:51 +13:00
wallet_shieldcoinbase_sapling.py
wallet_shieldcoinbase_sprout.py
wallet_treestate.py test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
walletbackup.py
zapwallettxes.py
zcjoinsplit.py
zcjoinsplitdoublespend.py
zkey_import_export.py
zmq_test.py

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