intellitester 0.2.11 → 0.2.13

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.
@@ -1,424 +1,430 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "IntelliTester Configuration",
4
- "description": "Schema for intellitester.config.yaml - the global configuration file for IntelliTester",
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "description": "Global configuration file for IntelliTester",
5
4
  "type": "object",
6
5
  "properties": {
7
6
  "defaults": {
8
- "type": "object",
9
7
  "description": "Default settings that apply to all tests unless overridden",
8
+ "type": "object",
10
9
  "properties": {
11
10
  "timeout": {
12
- "type": "integer",
13
- "minimum": 1,
14
11
  "description": "Default timeout in milliseconds for all actions",
15
- "examples": [30000, 60000],
16
- "default": 30000
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
17
15
  },
18
16
  "screenshots": {
19
- "type": "string",
20
- "enum": ["on-failure", "always", "never"],
21
17
  "description": "When to capture screenshots during test execution",
22
- "default": "on-failure"
18
+ "type": "string",
19
+ "enum": [
20
+ "on-failure",
21
+ "always",
22
+ "never"
23
+ ]
23
24
  }
24
- }
25
+ },
26
+ "additionalProperties": false
25
27
  },
26
28
  "ai": {
27
- "type": "object",
28
29
  "description": "AI configuration for test generation and healing",
29
- "required": ["provider", "model"],
30
+ "type": "object",
30
31
  "properties": {
31
32
  "provider": {
32
- "type": "string",
33
- "enum": ["anthropic", "openai", "ollama"],
34
33
  "description": "AI provider to use for test generation",
35
- "examples": ["anthropic"]
34
+ "type": "string",
35
+ "enum": [
36
+ "anthropic",
37
+ "openai",
38
+ "ollama"
39
+ ]
36
40
  },
37
41
  "model": {
38
- "type": "string",
39
- "minLength": 1,
40
42
  "description": "Model name to use",
41
- "examples": [
42
- "claude-3-5-sonnet-20241022",
43
- "gpt-4",
44
- "gpt-4-turbo",
45
- "llama2",
46
- "codellama"
47
- ]
43
+ "type": "string",
44
+ "minLength": 1
48
45
  },
49
46
  "apiKey": {
50
- "type": "string",
51
- "description": "API key for the AI provider (can use environment variables)",
52
- "examples": ["${ANTHROPIC_API_KEY}", "${OPENAI_API_KEY}"]
47
+ "description": "API key for the AI provider",
48
+ "type": "string"
53
49
  },
54
50
  "baseUrl": {
51
+ "description": "Base URL for the AI API (required for Ollama)",
55
52
  "type": "string",
56
- "format": "uri",
57
- "description": "Base URL for the AI API (required for Ollama, optional for others)",
58
- "examples": ["http://localhost:11434", "https://api.openai.com/v1"]
53
+ "format": "uri"
59
54
  },
60
55
  "temperature": {
56
+ "description": "Temperature for AI generation (0 = deterministic, 2 = very creative)",
57
+ "default": 0.2,
61
58
  "type": "number",
62
59
  "minimum": 0,
63
- "maximum": 2,
64
- "description": "Temperature for AI generation (0 = deterministic, 2 = very creative)",
65
- "default": 0.2
60
+ "maximum": 2
66
61
  },
67
62
  "maxTokens": {
68
- "type": "integer",
69
- "minimum": 1,
70
63
  "description": "Maximum tokens for AI responses",
71
- "default": 4096
64
+ "default": 4096,
65
+ "type": "integer",
66
+ "exclusiveMinimum": 0,
67
+ "maximum": 9007199254740991
72
68
  },
73
69
  "source": {
74
- "type": "object",
75
70
  "description": "Source code directories for AI to analyze when generating tests",
71
+ "type": "object",
76
72
  "properties": {
77
73
  "pagesDir": {
78
- "type": "string",
79
74
  "description": "Directory containing page components",
80
- "examples": ["./src/pages", "./app", "./routes"]
75
+ "type": "string"
81
76
  },
82
77
  "componentsDir": {
83
- "type": "string",
84
78
  "description": "Directory containing reusable components",
85
- "examples": ["./src/components", "./app/components"]
79
+ "type": "string"
86
80
  },
87
81
  "extensions": {
88
- "type": "array",
89
82
  "description": "File extensions to include in source code analysis",
83
+ "default": [
84
+ ".vue",
85
+ ".astro",
86
+ ".tsx",
87
+ ".jsx",
88
+ ".svelte"
89
+ ],
90
+ "type": "array",
90
91
  "items": {
91
92
  "type": "string"
92
- },
93
- "default": [".vue", ".astro", ".tsx", ".jsx", ".svelte"],
94
- "examples": [[".tsx", ".jsx", ".vue"]]
93
+ }
95
94
  }
96
- }
95
+ },
96
+ "required": [
97
+ "extensions"
98
+ ],
99
+ "additionalProperties": false
97
100
  }
98
- }
101
+ },
102
+ "required": [
103
+ "provider",
104
+ "model",
105
+ "temperature",
106
+ "maxTokens"
107
+ ],
108
+ "additionalProperties": false
99
109
  },
100
110
  "platforms": {
101
- "type": "object",
102
111
  "description": "Platform-specific configurations",
112
+ "type": "object",
103
113
  "properties": {
104
114
  "web": {
115
+ "description": "Web platform configuration",
105
116
  "type": "object",
106
- "description": "Web platform default configuration",
107
117
  "properties": {
108
118
  "baseUrl": {
119
+ "description": "Base URL for the web application",
109
120
  "type": "string",
110
- "format": "uri",
111
- "description": "Default base URL for web tests",
112
- "examples": ["https://example.com", "http://localhost:3000"]
121
+ "minLength": 1,
122
+ "format": "uri"
113
123
  },
114
124
  "browser": {
115
- "type": "string",
116
- "description": "Default browser to use",
117
- "examples": ["chromium", "firefox", "webkit"],
118
- "default": "chromium"
125
+ "description": "Browser to use for testing",
126
+ "type": "string"
119
127
  },
120
128
  "headless": {
121
- "type": "boolean",
122
- "description": "Run browser in headless mode by default",
123
- "default": true
129
+ "description": "Run browser in headless mode",
130
+ "type": "boolean"
124
131
  },
125
132
  "timeout": {
133
+ "description": "Timeout in milliseconds for web actions",
126
134
  "type": "integer",
127
- "minimum": 1,
128
- "description": "Default timeout for web actions in milliseconds",
129
- "examples": [30000]
135
+ "exclusiveMinimum": 0,
136
+ "maximum": 9007199254740991
130
137
  }
131
- }
138
+ },
139
+ "additionalProperties": false
132
140
  },
133
141
  "android": {
142
+ "description": "Android platform configuration",
134
143
  "type": "object",
135
- "description": "Android platform default configuration",
136
144
  "properties": {
137
145
  "appId": {
138
- "type": "string",
139
- "description": "Default Android application ID",
140
- "examples": ["com.example.app"]
146
+ "description": "Android application ID",
147
+ "type": "string"
141
148
  },
142
149
  "device": {
143
- "type": "string",
144
- "description": "Default device name or ID",
145
- "examples": ["Pixel_4_API_30", "emulator-5554"]
150
+ "description": "Device name or ID to run tests on",
151
+ "type": "string"
146
152
  }
147
- }
153
+ },
154
+ "additionalProperties": false
148
155
  },
149
156
  "ios": {
157
+ "description": "iOS platform configuration",
150
158
  "type": "object",
151
- "description": "iOS platform default configuration",
152
159
  "properties": {
153
160
  "bundleId": {
154
- "type": "string",
155
- "description": "Default iOS bundle identifier",
156
- "examples": ["com.example.app"]
161
+ "description": "iOS bundle identifier",
162
+ "type": "string"
157
163
  },
158
164
  "simulator": {
159
- "type": "string",
160
- "description": "Default simulator name",
161
- "examples": ["iPhone 14 Pro", "iPhone 15"]
165
+ "description": "Simulator name to run tests on",
166
+ "type": "string"
162
167
  }
163
- }
168
+ },
169
+ "additionalProperties": false
164
170
  }
165
- }
171
+ },
172
+ "additionalProperties": false
166
173
  },
167
174
  "healing": {
168
- "type": "object",
169
175
  "description": "Self-healing test configuration",
176
+ "type": "object",
170
177
  "properties": {
171
178
  "enabled": {
172
- "type": "boolean",
173
179
  "description": "Enable self-healing capabilities",
174
- "default": false
180
+ "type": "boolean"
175
181
  },
176
182
  "strategies": {
177
- "type": "array",
178
183
  "description": "Healing strategies to use",
184
+ "type": "array",
179
185
  "items": {
180
186
  "type": "string"
181
- },
182
- "examples": [["ai", "fallback", "retry"]]
187
+ }
183
188
  }
184
- }
189
+ },
190
+ "additionalProperties": false
185
191
  },
186
192
  "email": {
187
- "type": "object",
188
193
  "description": "Email testing configuration",
189
- "required": ["provider"],
194
+ "type": "object",
190
195
  "properties": {
191
196
  "provider": {
197
+ "description": "Email testing provider",
192
198
  "type": "string",
193
- "enum": ["inbucket"],
194
- "description": "Email testing provider"
199
+ "const": "inbucket"
195
200
  },
196
201
  "endpoint": {
197
- "type": "string",
198
- "format": "uri",
199
202
  "description": "Email service endpoint URL",
200
- "examples": ["http://localhost:9000"]
203
+ "type": "string",
204
+ "minLength": 1,
205
+ "format": "uri"
201
206
  }
202
- }
207
+ },
208
+ "required": [
209
+ "provider"
210
+ ],
211
+ "additionalProperties": false
203
212
  },
204
213
  "appwrite": {
205
- "type": "object",
206
214
  "description": "Appwrite backend configuration",
207
- "required": ["endpoint", "projectId", "apiKey"],
215
+ "type": "object",
208
216
  "properties": {
209
217
  "endpoint": {
210
- "type": "string",
211
- "format": "uri",
212
218
  "description": "Appwrite API endpoint",
213
- "examples": ["https://cloud.appwrite.io/v1", "${APPWRITE_ENDPOINT}"]
214
- },
215
- "projectId": {
216
219
  "type": "string",
217
220
  "minLength": 1,
221
+ "format": "uri"
222
+ },
223
+ "projectId": {
218
224
  "description": "Appwrite project ID",
219
- "examples": ["${APPWRITE_PROJECT_ID}"]
225
+ "type": "string",
226
+ "minLength": 1
220
227
  },
221
228
  "apiKey": {
222
- "type": "string",
223
- "minLength": 1,
224
229
  "description": "Appwrite API key with appropriate permissions",
225
- "examples": ["${APPWRITE_API_KEY}"]
230
+ "type": "string",
231
+ "minLength": 1
226
232
  },
227
233
  "cleanup": {
228
- "type": "boolean",
229
- "description": "Enable automatic cleanup of Appwrite resources (backwards compatible)",
230
- "default": true
234
+ "description": "Enable automatic cleanup of created resources",
235
+ "type": "boolean"
231
236
  },
232
237
  "cleanupOnFailure": {
233
- "type": "boolean",
234
- "description": "Clean up Appwrite resources even when tests fail (backwards compatible)",
235
- "default": true
238
+ "description": "Clean up resources even when test fails",
239
+ "type": "boolean"
236
240
  }
237
- }
241
+ },
242
+ "required": [
243
+ "endpoint",
244
+ "projectId",
245
+ "apiKey"
246
+ ],
247
+ "additionalProperties": false
238
248
  },
239
249
  "cleanup": {
240
- "type": "object",
241
250
  "description": "Comprehensive resource cleanup configuration",
251
+ "type": "object",
242
252
  "properties": {
243
253
  "provider": {
244
- "type": "string",
245
254
  "description": "Primary cleanup provider to use",
246
- "examples": ["appwrite", "postgres", "mysql", "sqlite"]
255
+ "type": "string"
247
256
  },
248
257
  "parallel": {
249
- "type": "boolean",
250
258
  "description": "Execute cleanup operations in parallel",
251
- "default": false
259
+ "default": false,
260
+ "type": "boolean"
252
261
  },
253
262
  "retries": {
254
- "type": "integer",
255
- "minimum": 1,
256
- "maximum": 10,
257
263
  "description": "Number of retry attempts for failed cleanup operations",
258
- "default": 3
264
+ "default": 3,
265
+ "type": "number",
266
+ "minimum": 1,
267
+ "maximum": 10
259
268
  },
260
269
  "types": {
261
- "type": "object",
262
270
  "description": "Map resource types to cleanup handler methods",
263
- "additionalProperties": {
271
+ "type": "object",
272
+ "propertyNames": {
264
273
  "type": "string"
265
274
  },
266
- "examples": [
267
- {
268
- "row": "appwrite.deleteRow",
269
- "team": "appwrite.deleteTeam",
270
- "user": "appwrite.deleteUser",
271
- "stripe_customer": "stripe.deleteCustomer",
272
- "stripe_subscription": "stripe.deleteSubscription"
273
- }
274
- ]
275
+ "additionalProperties": {
276
+ "type": "string"
277
+ }
275
278
  },
276
279
  "handlers": {
277
- "type": "array",
278
280
  "description": "Explicit paths to custom cleanup handler files",
281
+ "type": "array",
279
282
  "items": {
280
283
  "type": "string"
281
- },
282
- "examples": [["./src/cleanup/stripe.ts", "./tests/cleanup/custom.ts"]]
284
+ }
283
285
  },
284
286
  "discover": {
285
- "type": "object",
286
287
  "description": "Auto-discovery configuration for cleanup handlers",
288
+ "type": "object",
287
289
  "properties": {
288
290
  "enabled": {
289
- "type": "boolean",
290
291
  "description": "Enable auto-discovery of cleanup handlers in specified paths",
291
- "default": true
292
+ "default": true,
293
+ "type": "boolean"
292
294
  },
293
295
  "paths": {
294
- "type": "array",
295
296
  "description": "Directories to search for cleanup handler files",
297
+ "default": [
298
+ "./tests/cleanup"
299
+ ],
300
+ "type": "array",
296
301
  "items": {
297
302
  "type": "string"
298
- },
299
- "default": ["./tests/cleanup"]
303
+ }
300
304
  },
301
305
  "pattern": {
302
- "type": "string",
303
306
  "description": "Glob pattern to match handler files",
304
307
  "default": "**/*.ts",
305
- "examples": ["**/*.ts", "**/*.js", "**/cleanup.*.ts"]
308
+ "type": "string"
306
309
  }
307
- }
310
+ },
311
+ "required": [
312
+ "enabled",
313
+ "paths",
314
+ "pattern"
315
+ ],
316
+ "additionalProperties": false
308
317
  }
309
- }
318
+ },
319
+ "required": [
320
+ "parallel",
321
+ "retries"
322
+ ],
323
+ "additionalProperties": {}
310
324
  },
311
325
  "webServer": {
312
326
  "type": "object",
313
- "description": "Configuration for starting a web server before running tests",
314
- "required": ["url"],
315
327
  "properties": {
316
328
  "command": {
317
- "type": "string",
318
- "minLength": 1,
319
329
  "description": "Command to start the web server",
320
- "examples": [
321
- "npm run dev",
322
- "pnpm dev",
323
- "yarn dev",
324
- "bun dev",
325
- "python -m http.server 8000"
326
- ]
330
+ "type": "string",
331
+ "minLength": 1
327
332
  },
328
333
  "auto": {
329
- "type": "boolean",
330
334
  "description": "Automatically detect and run the dev server from package.json",
331
- "default": false
335
+ "type": "boolean"
332
336
  },
333
337
  "static": {
334
- "type": "string",
335
338
  "description": "Serve a static directory instead of running a command",
336
- "examples": ["./dist", "./build", "./public"]
339
+ "type": "string"
337
340
  },
338
341
  "url": {
339
- "type": "string",
340
- "format": "uri",
341
342
  "description": "URL to wait for before starting tests",
342
- "examples": ["http://localhost:3000", "http://localhost:8080"]
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "format": "uri"
343
346
  },
344
347
  "port": {
345
- "type": "integer",
346
- "minimum": 1,
347
- "maximum": 65535,
348
348
  "description": "Port number for the web server",
349
- "examples": [3000, 8080, 5173]
349
+ "type": "integer",
350
+ "exclusiveMinimum": 0,
351
+ "maximum": 9007199254740991
350
352
  },
351
353
  "reuseExistingServer": {
352
- "type": "boolean",
353
354
  "description": "Use existing server if already running at the specified URL",
354
- "default": true
355
+ "default": true,
356
+ "type": "boolean"
355
357
  },
356
358
  "timeout": {
357
- "type": "integer",
358
- "minimum": 1,
359
359
  "description": "Timeout in milliseconds to wait for server to become available",
360
- "default": 30000
360
+ "default": 30000,
361
+ "type": "integer",
362
+ "exclusiveMinimum": 0,
363
+ "maximum": 9007199254740991
361
364
  },
362
365
  "cwd": {
363
- "type": "string",
364
366
  "description": "Working directory for the server command",
365
- "examples": ["./frontend", "./server"]
367
+ "type": "string"
366
368
  }
367
- }
369
+ },
370
+ "required": [
371
+ "url",
372
+ "reuseExistingServer",
373
+ "timeout"
374
+ ],
375
+ "additionalProperties": false
368
376
  },
369
377
  "preview": {
370
- "type": "object",
371
378
  "description": "Configuration for the --preview flag (build and serve production build)",
379
+ "type": "object",
372
380
  "properties": {
373
381
  "build": {
374
- "type": "object",
375
382
  "description": "Build configuration",
383
+ "type": "object",
376
384
  "properties": {
377
385
  "command": {
378
- "type": "string",
379
386
  "description": "Command to build the project",
380
- "examples": ["pnpm build", "npm run build", "yarn build", "bun run build"]
387
+ "type": "string"
381
388
  }
382
- }
389
+ },
390
+ "additionalProperties": false
383
391
  },
384
392
  "preview": {
385
- "type": "object",
386
393
  "description": "Preview server configuration",
394
+ "type": "object",
387
395
  "properties": {
388
396
  "command": {
389
- "type": "string",
390
397
  "description": "Command to start the preview server after build",
391
- "examples": ["pnpm preview", "npm run preview", "serve ./dist", "npx serve build"]
398
+ "type": "string"
392
399
  }
393
- }
400
+ },
401
+ "additionalProperties": false
394
402
  },
395
403
  "url": {
396
- "type": "string",
397
- "format": "uri",
398
404
  "description": "URL to wait for before starting tests",
399
- "examples": ["http://localhost:4321", "http://localhost:3000"]
405
+ "type": "string",
406
+ "format": "uri"
400
407
  },
401
408
  "timeout": {
402
- "type": "integer",
403
- "minimum": 1,
404
409
  "description": "Timeout in milliseconds to wait for preview server",
405
- "default": 60000
410
+ "type": "integer",
411
+ "exclusiveMinimum": 0,
412
+ "maximum": 9007199254740991
406
413
  }
407
- }
414
+ },
415
+ "additionalProperties": false
408
416
  },
409
417
  "secrets": {
418
+ "description": "Secret values that can be referenced in tests",
410
419
  "type": "object",
411
- "description": "Secret values that can be referenced in tests (prefer environment variables)",
412
- "additionalProperties": {
420
+ "propertyNames": {
413
421
  "type": "string"
414
422
  },
415
- "examples": [
416
- {
417
- "API_KEY": "${API_KEY}",
418
- "TEST_PASSWORD": "${TEST_PASSWORD}",
419
- "STRIPE_KEY": "${STRIPE_SECRET_KEY}"
420
- }
421
- ]
423
+ "additionalProperties": {
424
+ "type": "string"
425
+ }
422
426
  }
423
- }
427
+ },
428
+ "additionalProperties": false,
429
+ "title": "IntelliTester Configuration"
424
430
  }