You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmonero/tests
moneroexamples 1db298bc0b
fix: compilation with monero
5 years ago
..
res fix: compilation with monero 5 years ago
CMakeLists.txt xmregcore updated 5 years ago
JsonTx.cpp fix: compilation with monero 5 years ago
JsonTx.h fix: compilation with monero 5 years ago
README.md cmake ammendments 6 years ago
bcstatus_tests.cpp it compiles with xmregcore for now 5 years ago
helpers.h tests fixed 5 years ago
microcore_tests.cpp it compiles with xmregcore for now 5 years ago
mocks.h updated to monero master 5 years ago
mysql_tests.cpp get_num_outputs added 5 years ago
txsearch_tests.cpp Futher itegration of universal identifier 5 years ago

README.md

Testing openmonero

Googletest and googlemock frameworks are used for unit testing of openmonero. There is no need to install them, as they are provided with openmonero.

MySQL setup

Testing openmonero's operations on MySQL database are performed using actuall mysql database. For this purpose a testing database with some pre-populated data is used: openmonero_test. Thus before tests are run, make sure that openmonero_test database is initilized using openmonero/sql/openmonero_test.sql file, and database_test contains information on conneting to the test database in openmonero/config/config.json.

Compile and run openmonero tests

# go into build folder of openmonero
cd openmonero/build

# indicate that test should be build
cmake -DBUILD_TESTS=ON ..

# compile openmonero with tests
make

# run all tests
make test

# the above command will produce summary of test results (shown below).
# for verbose output, the following command can use used
# make test ARGS=-V

# individual tests executables can also be run. they are located in
# openmonero/build/tests

Example test output is:

mwo@arch:build$ make test
Running tests...
Test project /home/mwo/openmonero/build
    Start 1: mysql_tests
1/4 Test #1: mysql_tests ......................   Passed   60.64 sec
    Start 2: microcore_tests
2/4 Test #2: microcore_tests ..................   Passed    1.67 sec
    Start 3: bcstatus_tests
3/4 Test #3: bcstatus_tests ...................   Passed   25.39 sec
    Start 4: txsearch_tests
4/4 Test #4: txsearch_tests ...................   Passed    1.04 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) =  88.79 sec