Complete end-to-end automated testing framework for Zed's ArkTS LSP extension, achieving 100% automation with zero manual steps.
┌─────────────────────────────────────────┐
│ E2E Automation (e2e-automated-test.sh) │
└───────────────┬─────────────────────────┘
│
┌───────────┼───────────┬─────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌──────────────┐
│ Zed │ │ SDK │ │Extension│ │ LSP Testing │
│Install │ │Install │ │ Install │ │ (Real Zed) │
└────────┘ └────────┘ └────────┘ └──────────────┘
│
▼
┌────────────────────────┐
│ LSP Protocol Testing │
│ (stdio/JSON-RPC) │
└────────────────────────┘
- Auto-detects OS (Linux/macOS)
- Uses platform-specific package managers
- Verifies installation
- Builds extension with Cargo
- Auto-detects extension directory
- Generates manifest and configuration
- Creates lightweight mock OpenHarmony SDK
- Generates TypeScript/ArkTS type definitions
- No large downloads required
- Real Zed CLI only - no simulation
- Launches actual Zed editor via command line
- Monitors log files for extension activity
- Detects: extension loading, LSP startup, protocol messages
- Requires real Zed installation
- Direct LSP testing via stdio/JSON-RPC
- Tests: initialize, definition, references, completion
- No GUI required
- Programmatic validation with exit codes
- Authentic testing: Uses actual Zed editor, not simulation
- Log analysis: Monitors real Zed logs for extension behavior
- CI support: Uses xvfb in headless CI environments
- Confidence: Tests production environment
- Bypass GUI: No UI automation complexity
- Protocol-based: LSP uses stdio JSON-RPC (programmatically testable)
- Fast: Direct communication without UI overhead
- Portable: Works in any environment
./scripts/e2e-automated-test.sh./scripts/auto-install-zed.sh # Install Zed
./scripts/install-mock-ohos-sdk.sh # Install SDK
./scripts/auto-install-local-extension.sh # Install extension
./scripts/test-zed-real.sh # Real Zed integration test
./scripts/test-lsp-automated.sh # LSP protocol testGitHub Actions workflow (.github/workflows/e2e-automated.yml):
- Uses xvfb for headless Zed
- Runs all automation steps
- Uploads test results as artifacts
- Exit code based validation
{
"summary": {
"total": 4,
"passed": 4,
"failed": 0
},
"tests": {
"initialize": { "status": "passed" },
"definition": { "status": "passed" },
"references": { "status": "passed" },
"completion": { "status": "passed" }
}
}- Zed editor (required for integration tests)
- Node.js 18+
- Rust/Cargo (for building extension)
- xvfb (for CI/headless environments)
- Linux:
~/.local/share/zed/logs/Zed.log - macOS:
~/Library/Logs/Zed/Zed.log