https://github.com/tarscloud/tars-unittest
unit testcase of tars
https://github.com/tarscloud/tars-unittest
tars tars-foundation tars-test
Last synced: about 2 months ago
JSON representation
unit testcase of tars
- Host: GitHub
- URL: https://github.com/tarscloud/tars-unittest
- Owner: TarsCloud
- License: bsd-3-clause
- Created: 2019-01-16T11:12:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-08T10:45:20.000Z (over 3 years ago)
- Last Synced: 2025-04-22T19:19:15.358Z (about 2 months ago)
- Topics: tars, tars-foundation, tars-test
- Language: C++
- Homepage:
- Size: 238 KB
- Stars: 14
- Watchers: 9
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[点我查看中文版](README.zh.md)
## Description of Tars-Test
The development of Tars-Test(unit testcase of Tarscpp) is mainly based on the GoogleTest test framework. For details on GoogleTest, please see [Official Documentation] (https://github.com/abseil/googletest/blob/master/googletest/docs/primer.md) .
The current testcases have covered the basic scenario of the RPC service.### Dependent environment
Since Tars-Test is based on GoogleTest, you need to install GoogleTest and generate related files for coverage, as follows:```c
[sudo] yum install gtest-devel lcov
```
### instructions for use在tarscpp/build下编译:
```
cmake .. -DONLY_LIB=OFF
make -j8
make run-unittest
```### How to add one testcase
The test case code in the current project is mainly in the testcode folder, and subsequent files and test cases can be added as needed. New test cases can reuse existing OBJs, services, and applications. If you need to deploy new services or OBJs, you can add services to the protocol folder. Related code, the new server configuration file can be added to the conf folder.