mobile-automator 0.23.8
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/LICENSE +17 -0
- package/README.md +167 -0
- package/bin/mauto-session-daemon.js +101 -0
- package/bin/mauto.js +13 -0
- package/package.json +49 -0
- package/src/assertion/evaluator.js +285 -0
- package/src/cli.js +1722 -0
- package/src/config/coerce.js +97 -0
- package/src/config/manager.js +75 -0
- package/src/config/schema.js +124 -0
- package/src/device/action-catalog.js +99 -0
- package/src/device/bridge.js +139 -0
- package/src/device/connection.js +65 -0
- package/src/device/device-model.js +59 -0
- package/src/device/device-resolver.js +34 -0
- package/src/device/element-model.js +82 -0
- package/src/device/mobile-mcp-client.js +163 -0
- package/src/device/resolve-connection.js +156 -0
- package/src/device/selection.js +80 -0
- package/src/device/semantic-press/index.js +38 -0
- package/src/device/semantic-press/labels.js +39 -0
- package/src/device/semantic-press/resolver.js +100 -0
- package/src/device/session-client.js +173 -0
- package/src/device/session-daemon.js +526 -0
- package/src/device/session-paths.js +80 -0
- package/src/device/session-protocol.js +60 -0
- package/src/device/session-spawn.js +67 -0
- package/src/device/tool-args.js +14 -0
- package/src/guide/content/execute.agnostic.md +207 -0
- package/src/guide/content/execute.aware.md +281 -0
- package/src/guide/content/execute.invariants.md +4 -0
- package/src/guide/content/generate.agnostic.md +236 -0
- package/src/guide/content/generate.aware.md +327 -0
- package/src/guide/content/generate.invariants.md +5 -0
- package/src/guide/content/setup.agnostic.md +63 -0
- package/src/guide/content/setup.aware.md +91 -0
- package/src/guide/content/setup.invariants.md +3 -0
- package/src/guide/emitter.js +137 -0
- package/src/guide/placeholders.js +132 -0
- package/src/init/adapters.js +162 -0
- package/src/init/skill-meta.js +31 -0
- package/src/init/skill-renderer.js +60 -0
- package/src/mcp/prompts.js +55 -0
- package/src/mcp/server.js +55 -0
- package/src/memory/entries.js +61 -0
- package/src/memory/history.js +86 -0
- package/src/memory/lock.js +5 -0
- package/src/memory/paths.js +47 -0
- package/src/memory/store.js +230 -0
- package/src/output/envelope.js +106 -0
- package/src/result/capability-catalog.js +144 -0
- package/src/result/flags.js +52 -0
- package/src/result/store.js +273 -0
- package/src/scenario/validator.js +30 -0
- package/src/schemas/config_schema.json +68 -0
- package/src/schemas/format-error.js +19 -0
- package/src/schemas/result_schema.json +211 -0
- package/src/schemas/scenario_schema.json +587 -0
- package/src/setup/scaffold.js +53 -0
- package/src/util/atomic.js +41 -0
- package/src/util/lock.js +85 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Mobile QA Test Run Result",
|
|
4
|
+
"description": "Schema for test execution result files generated by the mobile-automator-executor skill.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["run_id", "scenario_id", "metadata", "status", "total_assertions", "passed_assertions", "failed_assertions", "duration_seconds", "steps_executed", "assertion_results", "summary"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"run_id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^run_\\d{8}_\\d{6}$",
|
|
11
|
+
"description": "Unique run identifier in format run_YYYYMMDD_HHMMSS"
|
|
12
|
+
},
|
|
13
|
+
"schema_version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "2.0",
|
|
16
|
+
"description": "Version of the scenario schema used for this test run."
|
|
17
|
+
},
|
|
18
|
+
"scenario_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "ID of the scenario that was executed"
|
|
21
|
+
},
|
|
22
|
+
"metadata": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["app_version", "device_model", "api_level", "environment", "timestamp"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"app_version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "App version at time of execution"
|
|
29
|
+
},
|
|
30
|
+
"device_model": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Device used for execution"
|
|
33
|
+
},
|
|
34
|
+
"api_level": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Android API level or iOS version"
|
|
37
|
+
},
|
|
38
|
+
"environment": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Target environment (e.g., 'production', 'staging')"
|
|
41
|
+
},
|
|
42
|
+
"timestamp": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "date-time",
|
|
45
|
+
"description": "ISO-8601 datetime of execution"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"status": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["passed", "failed", "error"],
|
|
52
|
+
"description": "Overall result status"
|
|
53
|
+
},
|
|
54
|
+
"total_assertions": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 0
|
|
57
|
+
},
|
|
58
|
+
"passed_assertions": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0
|
|
61
|
+
},
|
|
62
|
+
"failed_assertions": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 0
|
|
65
|
+
},
|
|
66
|
+
"duration_seconds": {
|
|
67
|
+
"type": "number",
|
|
68
|
+
"minimum": 0,
|
|
69
|
+
"description": "Total execution time in seconds"
|
|
70
|
+
},
|
|
71
|
+
"captured_variables": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"description": "Variables captured during test execution via capture_value steps. Keys are variable names declared in the scenario's 'variables' block.",
|
|
74
|
+
"additionalProperties": {
|
|
75
|
+
"type": ["string", "number", "boolean", "null"]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"steps_executed": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["step_id", "status"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"step_id": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Step identifier. Snake_case string (e.g., 'tap_login')."
|
|
87
|
+
},
|
|
88
|
+
"status": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": ["passed", "failed", "skipped", "error"]
|
|
91
|
+
},
|
|
92
|
+
"screenshot": {
|
|
93
|
+
"type": ["string", "null"],
|
|
94
|
+
"description": "Path to captured screenshot for this step"
|
|
95
|
+
},
|
|
96
|
+
"error_message": {
|
|
97
|
+
"type": ["string", "null"],
|
|
98
|
+
"description": "Error details if step failed"
|
|
99
|
+
},
|
|
100
|
+
"retried": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"default": false,
|
|
103
|
+
"description": "Whether this step was retried due to suspected flakiness"
|
|
104
|
+
},
|
|
105
|
+
"retry_count": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 0,
|
|
108
|
+
"description": "Number of retry attempts made for this step (0 = no retries)"
|
|
109
|
+
},
|
|
110
|
+
"step_duration_ms": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 0,
|
|
113
|
+
"description": "Actual time taken to execute this step in milliseconds"
|
|
114
|
+
},
|
|
115
|
+
"condition_evaluated": {
|
|
116
|
+
"type": ["boolean", "null"],
|
|
117
|
+
"description": "Result of the step's condition evaluation. null if no condition was set."
|
|
118
|
+
},
|
|
119
|
+
"sub_steps_executed": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"description": "Execution results for nested sub-steps (if this step had sub_steps)",
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": ["step_id", "status"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"step_id": { "type": "string" },
|
|
127
|
+
"status": { "type": "string", "enum": ["passed", "failed", "skipped", "error"] },
|
|
128
|
+
"screenshot": { "type": ["string", "null"] },
|
|
129
|
+
"error_message": { "type": ["string", "null"] }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"observations": {
|
|
134
|
+
"type": ["string", "null"],
|
|
135
|
+
"description": "DEPRECATED — use the run-level `observations` array, which is typed. Retained for result files written before typed observations; no writer populates it."
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"assertion_results": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["assertion_id", "status", "message"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"assertion_id": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "Assertion identifier. Snake_case string (e.g., 'assert_login_success')."
|
|
149
|
+
},
|
|
150
|
+
"status": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"enum": ["passed", "failed"]
|
|
153
|
+
},
|
|
154
|
+
"expected": {
|
|
155
|
+
"type": ["string", "null"],
|
|
156
|
+
"description": "What was expected"
|
|
157
|
+
},
|
|
158
|
+
"actual": {
|
|
159
|
+
"type": ["string", "null"],
|
|
160
|
+
"description": "What was actually found"
|
|
161
|
+
},
|
|
162
|
+
"reference_screenshot": {
|
|
163
|
+
"type": ["string", "null"],
|
|
164
|
+
"description": "Path to reference baseline screenshot"
|
|
165
|
+
},
|
|
166
|
+
"actual_screenshot": {
|
|
167
|
+
"type": ["string", "null"],
|
|
168
|
+
"description": "Path to screenshot captured during execution"
|
|
169
|
+
},
|
|
170
|
+
"similarity_score": {
|
|
171
|
+
"type": ["number", "null"],
|
|
172
|
+
"minimum": 0.0,
|
|
173
|
+
"maximum": 1.0,
|
|
174
|
+
"description": "Similarity score for screenshot_match assertions"
|
|
175
|
+
},
|
|
176
|
+
"message": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "Human-readable result description"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"observations": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"properties": {
|
|
188
|
+
"type": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"enum": ["regression", "flakiness", "state_context"],
|
|
191
|
+
"description": "Observer trait that generated this observation"
|
|
192
|
+
},
|
|
193
|
+
"step_id": {
|
|
194
|
+
"type": ["string", "null"],
|
|
195
|
+
"description": "Related step, if applicable."
|
|
196
|
+
},
|
|
197
|
+
"message": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Observation detail"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": ["type", "message"]
|
|
203
|
+
},
|
|
204
|
+
"description": "Observations from observer traits (regression spotter, flakiness detector, state detective)"
|
|
205
|
+
},
|
|
206
|
+
"summary": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "Human-readable overall summary"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|