... | ... | @@ -80,15 +80,23 @@ $ hive server --steemd-url '{"default":"http://127.0.0.1:8090"}' --database-url |
|
|
5. Leave `hivemind` server working
|
|
|
|
|
|
# Running tavern tests
|
|
|
Enter `hivemind` source directory and run tests using `run_tests.sh` script
|
|
|
Tavern tests are located in `<hivemind-src>/tests/tests_api/hivemind/tavern` directory. It is a set of `yaml` files with accompanying `pat.json` files. Test is defined in `yaml` file, its expected result is defined in `pat.json` file. Call with parameters defined in `yaml` file is made to `hivemind` instance, and the result is compared with `pat.json`. Test fails when differences between pattern and response is detected. In that case an `out.json` file is created for manual inspection by the user.
|
|
|
|
|
|
To run `tavern` tests enter `hivemind` source directory and run tests using `run_tests.sh` script
|
|
|
```bash
|
|
|
$ cd /tmp/hivemind
|
|
|
$ scripts/run_tests.sh 127.0.0.1 8080
|
|
|
```
|
|
|
|
|
|
Where `127.0.0.1` is hivemind instance IP, and `8080` is hivemind instance port.
|
|
|
|
|
|
# Running benchmarks
|
|
|
Enter `hivemind` source directory and run benchmarks using `ci_start_api_benchmarks.sh` script
|
|
|
Benchmarks are based on requests defined in tavern test `yaml` files. Each request is called `n` times, execution times are gathered and then basend on that data the mean/min/max values are calculated. The benchmak test produce `tavern_benchmarks_report.html` with summary. In this summary calls with execution time greater than 1s are marked in red.
|
|
|
|
|
|
To run benchmarks enter `hivemind` source directory and run benchmarks using `ci_start_api_benchmarks.sh` script
|
|
|
```bash
|
|
|
$ cd /tmp/hivemind
|
|
|
$ scripts/ci_start_api_benchmarks.sh 127.0.0.1 8080 3
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
Where `127.0.0.1` is hivemind instance IP, and `8080` is hivemind instance port. `3` is the number of iterations for benchmarks. |
|
|
\ No newline at end of file |