add testing guideline

This commit is contained in:
Dao 2023-04-04 18:15:34 +08:00
parent 76f6a8208f
commit ff8e6448d3
3 changed files with 42 additions and 0 deletions

View File

@ -130,3 +130,7 @@ The config templates can be found in deploy/template. You should replace the fol
There are some way to deploy ByConity to physical machines:
- Deploy via docker [wrapper](https://github.com/ByConity/ByConity/tree/master/docker/executable_wrapper)
- Deploy using [package manager](https://github.com/ByConity/ByConity/tree/master/packages)
### Test ByConity in development enviroment
To test ByConity in development enviroment, follow this [guide](https://github.com/ByConity/ByConity/tree/master/Testing.md)

19
Testing.md Normal file
View File

@ -0,0 +1,19 @@
After finish building ByConity in development environment, in the build directory execute this command to run unit test
```
src/unit_tests_dbms --output-on-failure
```
You can run individual test case by passing in filter, for example
```
src/unit_tests_dbms --output-on-failure --gtest_filter='backgroundjob*'
```
To run CI test, after starting ByConity in development env, look at the below [script](https://github.com/ByConity/ByConity/tree/master/ci_scripts/run_ci_in_development_env.sh), edit it so that the enviroment variables in the script are correctly set. Then run it,
```
ci_scripts/run_ci_in_development_env.sh
```
You can run individual test case by following the instruction in the comments inside the script

View File

@ -0,0 +1,19 @@
#!/bin/bash
export BYCONITY_CONF_PATH=/etc/byconity
export BYCONITY_BIN=../build/programs
export TZ='Europe/Moscow'
export CLICKHOUSE_HOST='127.0.0.1'
export CLICKHOUSE_PORT_TCP=9010
export CLICKHOUSE_PORT_HTTP=8123
export CLICKHOUSE_PORT_HTTP_PROTO="http"
export CLICKHOUSE_CURL="curl"
export PATH=$BYCONITY_BIN:$PATH
export CLICKHOUSE_CONFIG=$BYCONITY_CONF_PATH/byconity-server.xml
$BYCONITY_BIN/../../tests/clickhouse-test --print-time --use-skip-list --order asc --test-runs 1 -q $BYCONITY_BIN/../../tests/queries --run cnch_stateless --b $BYCONITY_BIN/clickhouse
# To run single test case, for example uncomment the below line and comment the above line
#$BYCONITY_BIN/../../tests/clickhouse-test --print-time --use-skip-list --order asc --test-runs 1 -q $BYCONITY_BIN/../../tests/queries --run cnch_stateless --b $BYCONITY_BIN/clickhouse 11003_complex_hash_dictionary*