test:add test type

This commit is contained in:
happyguoxy 2025-01-16 16:01:17 +08:00
parent b2ac2d51c5
commit d92870e681
1 changed files with 33 additions and 12 deletions

View File

@ -61,7 +61,7 @@ In `tests` directory, there are different types of tests for TDengine. Below is
### How to run tests?
To run the CI tests, please run following commands:
If this is the first time to run all the CI tests, it is recommended to add the test branch, please run like following commands:
```bash
cd tests
@ -70,14 +70,21 @@ cd tests
### How to add new cases?
[Placeholder]
[You can add sim test case under tests/script, python test case under tests/system-test or tests/army. When the case passes in the test branch, add the case to the cases.task file under tests/parallel_test, and then merge the pr into main branch to run in the future CI.]
### 3.1.1 Unit Test
Unit test script is the smallest testable part and developed for some function, method or class of TDengine.
#### How to run tests?
### How to run single test case?
```bash
cd debug/build/bin
./osTimeTests
```
### How to run all unit test cases?
```bash
cd tests/unit-test/
@ -87,21 +94,28 @@ bash test.sh -e 0
#### How to add new cases?
Copy from the old version, need updates:
You can add sim test case under tests/script, python test case under tests/system-test or tests/army. When the case passes in the test branch, add the case to the cases.task file under tests/parallel_test, and then merge the pr into main branch to run in the future CI.
## 3.1.2 System Test
Python test script includes all of the functions of TDengine OSS, so some test case maybe fail cause the function only
work for TDengine Enterprise Edition.
### How to run tests?
### How to run single test case?
```bash
cd tests/system-test
python3 ./test.py -f 2-query/floor.py
```
### How to add new cases?
### How to run all system test cases?
```bash
cd tests
./run_all_ci_cases.sh -t python # all python cases
```
### How to add new case?
[Placeholder]
@ -109,7 +123,7 @@ python3 ./test.py -f 2-query/floor.py
In the early stage of TDengine development, test cases are run by an internal test framework called TSIM, which is developed in C++.
### How to run tests?
### How to run single test case?
To run the legacy test cases, please execute the following commands:
@ -118,7 +132,14 @@ cd tests/script
./test.sh -f tsim/db/basic1.sim
```
### How to add new cases?
### How to run all legacy test cases?
```bash
cd tests
./run_all_ci_cases.sh -t legacy # all legacy cases
```
### How to add new case?
[Placeholder]
@ -127,14 +148,14 @@ cd tests/script
Smoke test script is known as sanity testing to ensure that the critical functionalities of TDengine.
### How to run tests?
### How to run test?
```bash
cd /root/TDengine/packaging/smokeTest
./test_smoking_selfhost.sh
```
### How to add new cases?
### How to add new case?
[Placeholder]
@ -142,10 +163,10 @@ cd /root/TDengine/packaging/smokeTest
[Desciprtion]
### How to run tests?
### How to run test?
[Placeholder]
### How to add new cases?
### How to add new case?
[Placeholder]