sentinel-qa 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -0
- package/package.json +10 -2
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/ahn283/sentinel-qa/main/img/sentinel_qa.png" alt="Sentinel QA" width="480" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>MCP server for AI-powered QA automation — run Playwright & Maestro tests, validate analytics events, and generate reports.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/sentinel-qa"><img src="https://img.shields.io/npm/v/sentinel-qa.svg" alt="npm version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/sentinel-qa"><img src="https://img.shields.io/npm/dm/sentinel-qa.svg" alt="npm downloads" /></a>
|
|
12
|
+
<img src="https://img.shields.io/node/v/sentinel-qa.svg" alt="node version" />
|
|
13
|
+
<a href="https://github.com/ahn283/sentinel-qa/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/sentinel-qa.svg" alt="license" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
> sentinel-qa contains no LLM calls. It is purely test execution infrastructure designed to be driven by an AI agent like [pilot-ai](https://github.com/eodin/pilot-ai).
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pilot-ai (LLM) ──stdio──> sentinel-qa (MCP Server)
|
|
24
|
+
├── Playwright (web E2E tests)
|
|
25
|
+
├── Maestro (Flutter E2E tests)
|
|
26
|
+
├── Data Log QA (analytics event validation)
|
|
27
|
+
├── Quarantine (test reliability management)
|
|
28
|
+
└── Markdown Reports
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Install
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
|
|
38
|
+
# Run MCP server
|
|
39
|
+
node packages/mcp-server/dist/index.js
|
|
40
|
+
|
|
41
|
+
# Or via npx (after npm publish)
|
|
42
|
+
npx sentinel-qa
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Configure in your MCP client
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"sentinel-qa": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["sentinel-qa"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## MCP Tools
|
|
59
|
+
|
|
60
|
+
| Tool | Description |
|
|
61
|
+
|------|-------------|
|
|
62
|
+
| `list_apps` | List registered apps from registry |
|
|
63
|
+
| `get_selectors` | Get UI selector mappings for an app |
|
|
64
|
+
| `save_tests` | Save test cases (code) for an app |
|
|
65
|
+
| `run_tests` | Execute tests via Playwright/Maestro with optional analytics validation |
|
|
66
|
+
| `get_report` | Get the latest Markdown test report |
|
|
67
|
+
|
|
68
|
+
### Example Flow
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
1. list_apps() → See available apps
|
|
72
|
+
2. get_selectors("my-app") → Get UI selectors for code generation
|
|
73
|
+
3. save_tests(...) → Save generated test code
|
|
74
|
+
4. run_tests("my-app", platform: "web", validate_events: true)
|
|
75
|
+
→ Run Playwright tests + validate analytics
|
|
76
|
+
5. get_report("my-app") → Get Markdown report
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Features
|
|
80
|
+
|
|
81
|
+
### Playwright Web Testing
|
|
82
|
+
- Write-to-temp-file execution pattern (no eval)
|
|
83
|
+
- Code validation blocks dangerous APIs (eval, fs, child_process, etc.)
|
|
84
|
+
- Headless by default, configurable timeout
|
|
85
|
+
- JSON result parsing with screenshot capture on failure
|
|
86
|
+
|
|
87
|
+
### Data Log QA
|
|
88
|
+
- Define expected analytics events in YAML (`registry/event-specs/`)
|
|
89
|
+
- Validate captured events against spec: missing, unexpected, param errors
|
|
90
|
+
- Supports GA4, Firebase, Amplitude, Mixpanel URL patterns
|
|
91
|
+
- Event validation results included in Markdown reports
|
|
92
|
+
|
|
93
|
+
### Quarantine System
|
|
94
|
+
- Tracks test reliability over last 5 runs
|
|
95
|
+
- Auto-promotes: 5/5 pass → `stable`
|
|
96
|
+
- Auto-quarantines: 3-4/5 pass → `quarantine`
|
|
97
|
+
- Auto-rejects: 0-2/5 pass → `rejected`
|
|
98
|
+
- Rejected tests excluded from runs; quarantined tests opt-in via `include_quarantine`
|
|
99
|
+
|
|
100
|
+
### Markdown Reports
|
|
101
|
+
- Auto-generated on each test run
|
|
102
|
+
- Stored at `reports/<app_id>/<timestamp>/report.md`
|
|
103
|
+
- Includes summary, test details, failures, and event validation results
|
|
104
|
+
- Raw JSON also saved for programmatic access
|
|
105
|
+
|
|
106
|
+
## Project Structure
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
sentinel-qa/
|
|
110
|
+
packages/
|
|
111
|
+
mcp-server/ # MCP server (entry point)
|
|
112
|
+
playwright-runner/ # Playwright web test runner
|
|
113
|
+
maestro-bridge/ # Maestro Flutter test bridge
|
|
114
|
+
registry/
|
|
115
|
+
apps.yaml # Registered apps
|
|
116
|
+
selectors/ # App UI selector mappings
|
|
117
|
+
event-specs/ # Analytics event specifications
|
|
118
|
+
reports/ # Generated test reports (gitignored)
|
|
119
|
+
tests/ # Test status tracking (gitignored)
|
|
120
|
+
scripts/
|
|
121
|
+
verify-mcp-flow.mjs # E2E verification script
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## App Registry
|
|
125
|
+
|
|
126
|
+
Register apps in `registry/apps.yaml`:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
apps:
|
|
130
|
+
- id: my-web-app
|
|
131
|
+
type: web
|
|
132
|
+
url: https://my-app.com
|
|
133
|
+
context:
|
|
134
|
+
selectors: ./selectors/my-web-app.yaml
|
|
135
|
+
event_spec: ./event-specs/my-web-app.yaml
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Development
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm install # Install dependencies
|
|
142
|
+
npm run build # Build all packages
|
|
143
|
+
npm run test # Run all tests
|
|
144
|
+
npm run lint # Lint all packages
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Verify MCP server
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
node scripts/verify-mcp-flow.mjs
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Environment Variables
|
|
154
|
+
|
|
155
|
+
| Variable | Description | Default |
|
|
156
|
+
|----------|-------------|---------|
|
|
157
|
+
| `SENTINEL_REGISTRY_DIR` | App registry directory | `registry/` |
|
|
158
|
+
| `SENTINEL_REPORTS_DIR` | Report output directory | `reports/` |
|
|
159
|
+
| `SENTINEL_TESTS_DIR` | Test status directory | `tests/` |
|
|
160
|
+
| `DEBUG` | Enable debug logging | (unset) |
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sentinel-qa",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "MCP server for AI-powered QA automation infrastructure",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sentinel-qa": "./dist/index.js"
|
|
8
8
|
},
|
|
9
|
-
"
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ahn283/sentinel-qa.git",
|
|
13
|
+
"directory": "packages/mcp-server"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/ahn283/sentinel-qa#readme",
|
|
16
|
+
"keywords": ["mcp", "qa", "testing", "playwright", "maestro", "e2e", "automation", "analytics", "sentinel"],
|
|
17
|
+
"files": ["dist", "README.md"],
|
|
10
18
|
"bundleDependencies": [
|
|
11
19
|
"@sentinel-qa/playwright-runner",
|
|
12
20
|
"@sentinel-qa/maestro-bridge"
|