Skip to content
Snippets Groups Projects
Commit 0c6d33a1 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'dk-readme' into 'master'

Fixed readme file

See merge request !7
parents 99a03782 752b4835
No related branches found
No related tags found
1 merge request!7Fixed readme file
* Abstract: * This repository contains tests for API. All API tests are currently **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 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 have flat list of the tests and start their subsets separatly by hived and
hivemind CI processes. hivemind CI processes.
= Usage: # Usage:
== Usage with `hived`: ## Installing pyrest test framework
=== Python API tests: ### 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) Runnable with `ctest` (TODO)
=== PyRest API tests:
### PyRest API tests:
Node address is defined inside bash script. Node address is defined inside bash script.
a) API tests with `equal` comparator (using strict equal on query result and pattern): a) API tests with `equal` comparator (using strict equal on query result and pattern):
`./run_api_tests.sh equal` `./run_api_tests.sh equal`
b) API tests with `contain` comparator (check if result contain pattern): b) API tests with `contain` comparator (check if result contain pattern):
`./run_api_tests.sh contain` `./run_api_tests.sh contain`
== Usage with `hivemind`: ## Usage with `hivemind`:
=== Python API tests: ### Python API tests:
Runnable with `ctest` (TODO) Runnable with `ctest` (TODO)
=== PyRest API tests: ## PyRest API tests:
In tests directory we have two bash scripts `run_api_tests.sh` and `run_api_benchmarks.sh`. In tests directory we have two bash scripts:
Examples of running scripts: * `run_api_tests.sh` - for running api tests,
a) API tests with `equal` comparator (using strict equal on query result and pattern): * `run_api_benchmarks.sh` - for running benchmarks
`./run_api_tests.sh https://api.hive.blog equal`
b) API tests with `contain` comparator (check if result contain pattern): Examples of running tests:
`./run_api_tests.sh https://api.hive.blog contain`
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:
c) Benchmarks:
`./run_api_benchmarks.sh https://api.hive.blog` `./run_api_benchmarks.sh https://api.hive.blog`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment