Skip to content
Snippets Groups Projects
ABW's avatar
Andrzej Lisak authored
Changed how error cases are handled (when error is unexpected or expected error is not there whole response is dumped) - some required regeneration of original patterns
Some patterns for tests that still don't work regenerated to fix key order
Updated comments for problematic tests (research results)
Some new bridge_api tests marked as passing
Order partially fixed in patterns for tests where that order depends on pending payout
deb524ed
History

Abstract: This repository contains tests for API. All API tests are currently grouped for these served by hived and these served by hivemind. The goal is to have flat list of the tests and start their subsets separatly by hived and hivemind CI processes.

Usage:

Installing pyrest test framework

By pip3

pip3 install pyresttest

From sources

git clone https://github.com/svanoort/pyresttest.git
cd pyresttest
python3 setupt.py build
python3 setup.py install --user

Remarks

If you are not installing by pip3 make sure that you have installed pyyaml, future, pycurl in your system. Also you will need developer libs for libcurl4-openssl, libssl (for Ubuntu libcurl4-openssl-dev and libssl-dev)

Usage with hived:

Python API tests:

Runnable with ctest (TODO)

PyRest API tests:

Node address is defined inside bash script.

a) API tests with equal comparator (using strict equal on query result and pattern): ./run_api_tests.sh equal

b) API tests with contain comparator (check if result contain pattern): ./run_api_tests.sh contain

Usage with hivemind:

Python API tests:

Runnable with ctest (TODO)

PyRest API tests:

In tests directory we have two bash scripts:

  • run_api_tests.sh - for running api tests,
  • run_api_benchmarks.sh - for running benchmarks

Examples of running tests:

a) API tests in directory full_sync with equal comparator (using strict equal on query result and pattern): ./run_api_tests.sh https://api.hive.blog full_sync equal

b) API tests in directory full_sync with contain comparator (check if result contain pattern): ./run_api_tests.sh https://api.hive.blog full_sync contain

Examples of running benchmarks:

./run_api_benchmarks.sh https://api.hive.blog