Merge pull request #29590 from taosdata/docs/chr1-readme

ci:modify test readme
This commit is contained in:
haoranchen 2025-01-16 19:11:55 +08:00 committed by GitHub
commit c944dcb343
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 10 deletions

View File

@ -138,6 +138,7 @@ git clone https://github.com/taosdata/TDengine.git
cd TDengine cd TDengine
``` ```
> **NOTE:** > **NOTE:**
> TDengine Connectors can be found in following repositories: [JDBC Connector](https://github.com/taosdata/taos-connector-jdbc), [Go Connector](https://github.com/taosdata/driver-go), [Python Connector](https://github.com/taosdata/taos-connector-python), [Node.js Connector](https://github.com/taosdata/taos-connector-node), [C# Connector](https://github.com/taosdata/taos-connector-dotnet), [Rust Connector](https://github.com/taosdata/taos-connector-rust). > TDengine Connectors can be found in following repositories: [JDBC Connector](https://github.com/taosdata/taos-connector-jdbc), [Go Connector](https://github.com/taosdata/driver-go), [Python Connector](https://github.com/taosdata/taos-connector-python), [Node.js Connector](https://github.com/taosdata/taos-connector-node), [C# Connector](https://github.com/taosdata/taos-connector-dotnet), [Rust Connector](https://github.com/taosdata/taos-connector-rust).
@ -147,7 +148,7 @@ cd TDengine
At the moment, TDengine server supports running on Linux/Windows/MacOS systems. Any application can also choose the RESTful interface provided by taosAdapter to connect the taosd service. TDengine supports X64/ARM64 CPU, and it will support MIPS64, Alpha64, ARM32, RISC-V and other CPU architectures in the future. Right now we don't support build with cross-compiling environment. At the moment, TDengine server supports running on Linux/Windows/MacOS systems. Any application can also choose the RESTful interface provided by taosAdapter to connect the taosd service. TDengine supports X64/ARM64 CPU, and it will support MIPS64, Alpha64, ARM32, RISC-V and other CPU architectures in the future. Right now we don't support build with cross-compiling environment.
You can choose to install through source code, [container](https://docs.tdengine.com/get-started/docker/), [installation package](https://docs.tdengine.com/get-started/package/) or [Kubernetes](https://docs.tdengine.com/deployment/k8s/). This quick guide only applies to install from source. You can choose to install through source code, [container](https://docs.tdengine.com/get-started/deploy-in-docker/), [installation package](https://docs.tdengine.com/get-started/deploy-from-package/) or [Kubernetes](https://docs.tdengine.com/operations-and-maintenance/deploy-your-cluster/#kubernetes-deployment). This quick guide only applies to install from source.
TDengine provide a few useful tools such as taosBenchmark (was named taosdemo) and taosdump. They were part of TDengine. By default, TDengine compiling does not include taosTools. You can use `cmake .. -DBUILD_TOOLS=true` to make them be compiled with TDengine. TDengine provide a few useful tools such as taosBenchmark (was named taosdemo) and taosdump. They were part of TDengine. By default, TDengine compiling does not include taosTools. You can use `cmake .. -DBUILD_TOOLS=true` to make them be compiled with TDengine.

View File

@ -12,7 +12,9 @@
# 1. Introduction # 1. Introduction
This manual is intended to provide users with comprehensive guidance to help them verify the TDengine function efficiently. The document is divided into three main sections: introduction, prerequisites and testing guide. This manual is intended to provide users with comprehensive guidance to help them verify the TDengine function efficiently.
The document is divided into three main sections: introduction, prerequisites and testing guide.
> [!NOTE] > [!NOTE]
> The below commands and test scripts are verified on linux (Ubuntu 18.04、20.04、22.04) locally. > The below commands and test scripts are verified on linux (Ubuntu 18.04、20.04、22.04) locally.
@ -71,7 +73,7 @@ cd tests/unit-test/
bash test.sh -e 0 bash test.sh -e 0
``` ```
#### How to add new cases? {#test-id} #### How to add new cases?
<details> <details>
@ -85,15 +87,17 @@ In the test directory corresponding to the target function module, create test f
##### 2. Update build configuration ##### 2. Update build configuration
Modify the CMakeLists.txt file in this directory to ensure that the new test files are properly included in the compilation process. See the source\os\test\CMakeLists.txt file for configuration examples. Modify the CMakeLists.txt file in this directory to ensure that the new test files are properly included in the compilation process. See the `source/os/test/CMakeLists.txt` file for configuration examples.
##### 3. Compile test code ##### 3. Compile test code
In the root directory of the project, create a compilation directory (e.g., debug), switch to the directory and run CMake commands (e.g., cmake .. -DBUILD_TEST=1) to generate a compilation file, and then run a compilation command (e.g. make) to complete the compilation of the test code. In the root directory of the project, create a compilation directory (e.g., debug), switch to the directory and run CMake commands (e.g., `cmake .. -DBUILD_TEST=1`) to generate a compilation file,
and then run a compilation command (e.g. make) to complete the compilation of the test code.
##### 4. Execute the test program ##### 4. Execute the test program
Find the executable file in the compiled directory(e.g. TDengine/debug/build/bin/) and run it. Find the executable file in the compiled directory(e.g. `TDengine/debug/build/bin/`) and run it.
##### 5. Integrate into CI tests ##### 5. Integrate into CI tests
@ -110,7 +114,7 @@ work for TDengine Enterprise Edition.
```bash ```bash
cd tests/system-test cd tests/system-test
python3 ./test.py -f 2-query/floor.py python3 ./test.py -f 2-query/avg.py
``` ```
### How to run all system test cases? ### How to run all system test cases?
@ -127,6 +131,7 @@ cd tests
<summary>Detailed steps to add new system test case</summary> <summary>Detailed steps to add new system test case</summary>
The Python test framework is developed by TDengine teams, and test.py is the test case execution and monitoring of the entry program, Use `python3 ./test.py -h` to view more features. The Python test framework is developed by TDengine teams, and test.py is the test case execution and monitoring of the entry program, Use `python3 ./test.py -h` to view more features.
you can refer below steps to add one test case: you can refer below steps to add one test case:
##### 1.Create a test case file and develop the test cases ##### 1.Create a test case file and develop the test cases
@ -135,7 +140,10 @@ Create a file in `tests/system-test` containing each functional directory and re
##### 2.Execute the test case ##### 2.Execute the test case
Ensure the test case execution is successful.
``` bash
cd tests/system-test & python3 ./test.py -f 0-others/test_case_template.py cd tests/system-test & python3 ./test.py -f 0-others/test_case_template.py
```
##### 3.Integrate into CI tests ##### 3.Integrate into CI tests
@ -173,7 +181,7 @@ cd tests
### How to add new case? ### How to add new case?
> [!NOTE] > [!NOTE]
> TSIM test framwork is replaced by system test currently, suggest to add new test scripts to system test, you can refer [System Test](#312-system-test) for detail steps. > TSIM test framwork is replaced by system test currently, suggest to add new test scripts to system test, you can refer [System Test](#32-system-test) for detail steps.
## 3.4 Smoke Test ## 3.4 Smoke Test
@ -204,11 +212,14 @@ python3 auto_crash_gen.py
### How to add new case? ### How to add new case?
Add a function, such as TaskCreateNewFunction, to pytest/crash_gen/crash_gen_main.py. Add a function, such as TaskCreateNewFunction, to pytest/crash_gen/crash_gen_main.py.
Integrate TaskCreateNewFunction into the balance_pickTaskType function in crash_gen_main.py. Integrate TaskCreateNewFunction into the balance_pickTaskType function in crash_gen_main.py.
## 3.6 CI Test ## 3.6 CI Test
CI testing (Continuous Integration testing), is an important practice in software development that aims to automate frequent integration of code into a shared codebase, build and test it to ensure code quality and stability. TDengine CI testing includes three part of test cases: unit test、system test and legacy test CI testing (Continuous Integration testing), is an important practice in software development that aims to automate frequent integration of code into a shared codebase, build and test it to ensure code quality and stability.
TDengine CI testing includes three part of test cases: unit test、system test and legacy test
### How to run all CI test cases? ### How to run all CI test cases?