From 9f7b947bbe75ee42f89d471bccb7f95efd50e504 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sat, 22 Oct 2016 18:45:26 +0100 Subject: [PATCH 1/2] Update unit-tests documentation. closes #1530 Signed-off-by: Daira Hopwood --- doc/unit-tests.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/doc/unit-tests.md b/doc/unit-tests.md index 687040623..f10ed9cf7 100644 --- a/doc/unit-tests.md +++ b/doc/unit-tests.md @@ -1,20 +1,16 @@ -*** Warning: This document has not been updated for Zcash and may be inaccurate. *** +Compiling/running automated tests +--------------------------------- -Compiling/running unit tests ------------------------------------- - -Unit tests will be automatically compiled if dependencies were met in configure +Automated tests will be automatically compiled if dependencies were met in configure and tests weren't explicitly disabled. -After configuring, they can be run with 'make check'. +There are two scripts for running tests: -To run the bitcoind tests manually, launch src/test/test_bitcoin . +* ``qa/zcash/full-test-suite.sh``, to run the main test suite +* ``qa/pull-tester/rpc-tests.sh``, to run the RPC tests. -To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing -.cpp files in the test/ directory or add new .cpp files that -implement new BOOST_AUTO_TEST_SUITE sections. +The main test suite uses two different testing frameworks. Tests using the Boost +framework are under ``src/test/``, and tests using the Google Test/Google Mock +framework are under ``src/gtest/``. The latter is preferred for new Zcash unit tests. -To run the bitcoin-qt tests manually, launch src/qt/test/test_bitcoin-qt - -To add more bitcoin-qt tests, add them to the `src/qt/test/` directory and -the `src/qt/test/test_main.cpp` file. +RPC tests are implemented in Python under the ``qa/rpc-tests/`` directory. From 6316cc2b481238141a92d5be63377b2649c10e91 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sat, 22 Oct 2016 18:56:43 +0100 Subject: [PATCH 2/2] Address @str4d's comments on unit-tests doc. ref #1530 Signed-off-by: Daira Hopwood --- doc/unit-tests.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/unit-tests.md b/doc/unit-tests.md index f10ed9cf7..97dcd701e 100644 --- a/doc/unit-tests.md +++ b/doc/unit-tests.md @@ -10,7 +10,8 @@ There are two scripts for running tests: * ``qa/pull-tester/rpc-tests.sh``, to run the RPC tests. The main test suite uses two different testing frameworks. Tests using the Boost -framework are under ``src/test/``, and tests using the Google Test/Google Mock -framework are under ``src/gtest/``. The latter is preferred for new Zcash unit tests. +framework are under ``src/test/``; tests using the Google Test/Google Mock +framework are under ``src/gtest/`` and ``src/wallet/gtest/``. The latter framework +is preferred for new Zcash unit tests. RPC tests are implemented in Python under the ``qa/rpc-tests/`` directory.