2026-04-08 16:35:25 +08:00
|
|
|
# Testing Guide
|
|
|
|
|
|
|
|
|
|
## Flutter
|
|
|
|
|
|
|
|
|
|
Run unit and widget tests:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
flutter test
|
|
|
|
|
```
|
|
|
|
|
|
2026-04-11 10:31:15 +08:00
|
|
|
Run integration tests when the `integration_test` directory exists and contains integration test files:
|
2026-04-08 16:35:25 +08:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
flutter test integration_test
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Patrol
|
|
|
|
|
|
|
|
|
|
Run Patrol tests:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
patrol test
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Go
|
|
|
|
|
|
|
|
|
|
Run Go unit tests:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-04-09 11:19:40 +08:00
|
|
|
cd ../xworkmate-bridge
|
2026-04-08 16:35:25 +08:00
|
|
|
go test ./...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## CI Coverage
|
|
|
|
|
|
2026-04-11 10:31:15 +08:00
|
|
|
- Pull requests in `xworkmate-app` use the `verify` stage as a static-analysis gate and always run `flutter analyze`.
|
2026-05-13 16:45:54 +08:00
|
|
|
- Static analysis also runs `scripts/check-no-app-ffi.sh` so app packaging cannot reintroduce the retired Codex FFI copy/embed path.
|
2026-04-12 15:42:15 +08:00
|
|
|
- Widget, integration, and Patrol suites are owned by their dedicated commands and release validation flows, not by the lightweight `verify` gate.
|
2026-04-11 10:31:15 +08:00
|
|
|
- Pushes to `main`, version tags, and manual workflow runs publish build artifacts and update the GitHub Release entry for that release mode.
|
2026-04-09 11:19:40 +08:00
|
|
|
- `xworkmate-bridge` Go tests run in the companion repository.
|
2026-04-08 16:35:25 +08:00
|
|
|
- `release/*` branches run Patrol tests in addition to the PR chain.
|