create TESTING
This commit is contained in:
30
README.md
30
README.md
@@ -70,8 +70,36 @@ cat /proc/meminfo | head
|
||||
```
|
||||
|
||||
```bash
|
||||
# htop / stats từ ngoài (không cần vào shell)
|
||||
sudo ./scripts/docker-htop.sh
|
||||
sudo ./scripts/docker-stats.sh
|
||||
```
|
||||
|
||||
## Test tự động
|
||||
|
||||
Chạy toàn bộ: unit C++ (GTest), API smoke (`curl`), pytest integration.
|
||||
|
||||
```bash
|
||||
cd /home/robotics/RD/Test3
|
||||
chmod +x scripts/run-tests.sh scripts/api-smoke.sh
|
||||
./scripts/run-tests.sh
|
||||
```
|
||||
|
||||
Chỉ unit test C++:
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DBUILD_TESTING=ON
|
||||
cmake --build build -j
|
||||
ctest --test-dir build --output-on-failure
|
||||
```
|
||||
|
||||
Chỉ API smoke (server đang chạy, dùng fixture `tests/fixtures/data/`):
|
||||
|
||||
```bash
|
||||
./build/lidar_manager_web 18080 www tests/fixtures/data/state.json &
|
||||
./scripts/api-smoke.sh http://127.0.0.1:18080
|
||||
```
|
||||
|
||||
Fixture mission id mặc định: `testmission00001` (`tests/fixtures/data/missions.json`).
|
||||
|
||||
CI: GitHub Actions workflow `.github/workflows/test.yml`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user