@democratize-quality/mcp-server 1.1.8 → 1.2.0

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.
Files changed (64) hide show
  1. package/LICENSE +658 -12
  2. package/README.md +11 -6
  3. package/dist/server.d.ts +41 -0
  4. package/dist/server.d.ts.map +1 -0
  5. package/dist/server.js +225 -0
  6. package/dist/server.js.map +1 -0
  7. package/package.json +24 -25
  8. package/browserControl.js +0 -113
  9. package/cli.js +0 -228
  10. package/mcpServer.js +0 -335
  11. package/run-server.js +0 -140
  12. package/src/chatmodes//360/237/214/220 api-generator.chatmode.md" +0 -409
  13. package/src/chatmodes//360/237/214/220 api-healer.chatmode.md" +0 -494
  14. package/src/chatmodes//360/237/214/220 api-planner.chatmode.md" +0 -954
  15. package/src/config/environments/api-only.js +0 -53
  16. package/src/config/environments/development.js +0 -54
  17. package/src/config/environments/production.js +0 -69
  18. package/src/config/index.js +0 -341
  19. package/src/config/server.js +0 -41
  20. package/src/config/tools/api.js +0 -67
  21. package/src/config/tools/browser.js +0 -90
  22. package/src/config/tools/default.js +0 -32
  23. package/src/docs/Agent_README.md +0 -310
  24. package/src/docs/QUICK_REFERENCE.md +0 -111
  25. package/src/services/browserService.js +0 -325
  26. package/src/skills/api-planning/SKILL.md +0 -224
  27. package/src/skills/test-execution/SKILL.md +0 -728
  28. package/src/skills/test-generation/SKILL.md +0 -309
  29. package/src/skills/test-healing/SKILL.md +0 -405
  30. package/src/tools/api/api-generator.js +0 -1865
  31. package/src/tools/api/api-healer.js +0 -617
  32. package/src/tools/api/api-planner.js +0 -2598
  33. package/src/tools/api/api-project-setup.js +0 -313
  34. package/src/tools/api/api-request.js +0 -641
  35. package/src/tools/api/api-session-report.js +0 -1278
  36. package/src/tools/api/api-session-status.js +0 -395
  37. package/src/tools/api/prompts/README.md +0 -293
  38. package/src/tools/api/prompts/generation-prompts.js +0 -703
  39. package/src/tools/api/prompts/healing-prompts.js +0 -195
  40. package/src/tools/api/prompts/index.js +0 -25
  41. package/src/tools/api/prompts/orchestrator.js +0 -334
  42. package/src/tools/api/prompts/validation-rules.js +0 -339
  43. package/src/tools/base/ToolBase.js +0 -230
  44. package/src/tools/base/ToolRegistry.js +0 -269
  45. package/src/tools/browser/advanced/browser-console.js +0 -384
  46. package/src/tools/browser/advanced/browser-dialog.js +0 -319
  47. package/src/tools/browser/advanced/browser-evaluate.js +0 -337
  48. package/src/tools/browser/advanced/browser-file.js +0 -480
  49. package/src/tools/browser/advanced/browser-keyboard.js +0 -343
  50. package/src/tools/browser/advanced/browser-mouse.js +0 -332
  51. package/src/tools/browser/advanced/browser-network.js +0 -421
  52. package/src/tools/browser/advanced/browser-pdf.js +0 -407
  53. package/src/tools/browser/advanced/browser-tabs.js +0 -497
  54. package/src/tools/browser/advanced/browser-wait.js +0 -378
  55. package/src/tools/browser/click.js +0 -168
  56. package/src/tools/browser/close.js +0 -60
  57. package/src/tools/browser/dom.js +0 -70
  58. package/src/tools/browser/launch.js +0 -67
  59. package/src/tools/browser/navigate.js +0 -270
  60. package/src/tools/browser/screenshot.js +0 -351
  61. package/src/tools/browser/type.js +0 -174
  62. package/src/tools/index.js +0 -95
  63. package/src/utils/agentInstaller.js +0 -418
  64. package/src/utils/browserHelpers.js +0 -83
@@ -1,728 +0,0 @@
1
- ````skill
2
- ---
3
- name: test-execution
4
- description: Execute API tests directly from test plans using actual API requests. Run tests section-by-section or entirely, validate responses, chain requests, and generate comprehensive HTML reports. Use when user wants to run tests, execute API calls from test plan, validate endpoints, or create test execution reports.
5
- ---
6
-
7
- # API Test Execution Skill
8
-
9
- Use this skill to execute API tests directly from test plans without writing code. Run comprehensive test sequences, validate responses, and generate visual HTML reports.
10
-
11
- ## When to Use This Skill
12
-
13
- - User has a test plan and wants to execute tests immediately
14
- - User mentions running tests without generating code
15
- - User needs to validate API endpoints from test plan
16
- - User wants to execute specific sections of a test plan
17
- - User requests test execution reports or validation results
18
- - User needs quick API testing without setup
19
-
20
- ## Core Workflow
21
-
22
- ### Step 1: Load Test Plan
23
-
24
- **Read the test plan file** that was generated by `api_planner`:
25
-
26
- ```javascript
27
- // User provides test plan path
28
- const testPlanPath = "./api-test-reports/api-test-plan.md";
29
-
30
- // Read the test plan content
31
- const testPlanContent = await readFile(testPlanPath);
32
-
33
- // Parse sections using markdown headers (##)
34
- // Each section represents a testable API endpoint or feature
35
- ```
36
-
37
- ### Step 2: Select Section or Full Execution
38
-
39
- **Ask user what to execute** (if not specified):
40
-
41
- ```javascript
42
- // Parse test plan sections
43
- const sections = parseTestPlanSections(testPlanContent);
44
-
45
- // User can specify:
46
- // - "Execute section 1" or "Run tests for GET /api/v1/Books"
47
- // - "Execute all sections" or "Run entire test plan"
48
- // - "Run sections 1, 3, and 5"
49
-
50
- // Section structure example:
51
- // ## 1. GET /api/v1/Books - Retrieve all books
52
- // - Endpoint: GET /api/v1/Books
53
- // - Expected Status: 200
54
- // - Sample Request: [details]
55
- // - Expected Response: [structure]
56
- ```
57
-
58
- **Section Selection Examples:**
59
- - Section number: "Execute section 1"
60
- - Endpoint match: "Run tests for Books API"
61
- - Multiple sections: "Execute sections 1, 2, and 4"
62
- - Full plan: "Run all tests" or "Execute entire test plan"
63
-
64
- ### Step 3: Parse Test Data from Section
65
-
66
- **Extract test information** from the selected section(s):
67
-
68
- ```javascript
69
- // For each test section, extract:
70
- const testData = {
71
- method: "GET", // HTTP method
72
- endpoint: "/api/v1/Books", // API endpoint
73
- baseUrl: "https://api.example.com", // From test plan overview
74
- expectedStatus: 200, // Expected HTTP status
75
- headers: { // Authentication and headers
76
- "Content-Type": "application/json",
77
- "Authorization": "Bearer token-if-needed"
78
- },
79
- data: { // Request body (for POST/PUT/PATCH)
80
- // Parsed from sample request in test plan
81
- },
82
- expectedResponse: { // Expected response structure
83
- // Parsed from expected response section
84
- }
85
- }
86
- ```
87
-
88
- **Parsing Rules:**
89
- - Extract HTTP method from section title or endpoint line
90
- - Get endpoint URL from "Endpoint:" line
91
- - Parse expected status from "Expected Status:" or "Status Code:" line
92
- - Extract request body from "Sample Request:" or "Request Body:" section
93
- - Get expected response from "Expected Response:" or "Response Structure:" section
94
- - Identify authentication requirements from test plan
95
-
96
- ### Step 4: Execute Tests with Unique Session ID
97
-
98
- **Create a unique session** and execute tests:
99
-
100
- ```javascript
101
- // Generate unique session ID
102
- const sessionId = `test-execution-${Date.now()}`;
103
- // Or use meaningful name: `test-execution-books-api-${Date.now()}`
104
-
105
- // Execute each test in the section
106
- for (const test of testsInSection) {
107
- await tools.api_request({
108
- sessionId: sessionId,
109
- method: test.method,
110
- url: `${test.baseUrl}${test.endpoint}`,
111
- headers: test.headers,
112
- data: test.data, // Only for POST/PUT/PATCH/DELETE
113
- expect: {
114
- status: test.expectedStatus,
115
- // Optional: Add response validation
116
- body: {
117
- // Expected fields from test plan
118
- }
119
- },
120
- extract: {
121
- // Extract data for chained requests
122
- // Example: { "bookId": "id" } to use in next request
123
- }
124
- })
125
-
126
- console.log(`✅ Test passed: ${test.method} ${test.endpoint}`);
127
- }
128
- ```
129
-
130
- **Request Chaining Example:**
131
- ```javascript
132
- // Step 1: Create a book and extract its ID
133
- await tools.api_request({
134
- sessionId: sessionId,
135
- method: "POST",
136
- url: "https://api.example.com/api/v1/Books",
137
- data: {
138
- title: "Test Book",
139
- author: "Test Author"
140
- },
141
- expect: { status: 201 },
142
- extract: { "bookId": "id" } // Save book ID for next request
143
- })
144
-
145
- // Step 2: Use extracted bookId in next request
146
- await tools.api_request({
147
- sessionId: sessionId,
148
- method: "GET",
149
- url: "https://api.example.com/api/v1/Books/{{bookId}}", // Uses extracted ID
150
- expect: { status: 200 }
151
- })
152
-
153
- // Step 3: Update the book
154
- await tools.api_request({
155
- sessionId: sessionId,
156
- method: "PUT",
157
- url: "https://api.example.com/api/v1/Books/{{bookId}}",
158
- data: {
159
- title: "Updated Test Book",
160
- author: "Test Author"
161
- },
162
- expect: { status: 200 }
163
- })
164
-
165
- // Step 4: Delete the book
166
- await tools.api_request({
167
- sessionId: sessionId,
168
- method: "DELETE",
169
- url: "https://api.example.com/api/v1/Books/{{bookId}}",
170
- expect: { status: 204 }
171
- })
172
- ```
173
-
174
- ### Step 5: Generate HTML Test Report
175
-
176
- **After all tests execute**, generate comprehensive report:
177
-
178
- ```javascript
179
- await tools.api_session_report({
180
- sessionId: sessionId,
181
- outputPath: `./api-test-reports/${sessionId}-report.html`
182
- })
183
-
184
- // Optionally check final status
185
- await tools.api_session_status({
186
- sessionId: sessionId
187
- })
188
- ```
189
-
190
- ## Execution Modes
191
-
192
- ### Mode 1: Single Section Execution
193
- ```javascript
194
- // User: "Execute section 1 from the test plan"
195
-
196
- // 1. Parse test plan
197
- // 2. Extract section 1
198
- // 3. Execute all tests in section 1
199
- // 4. Generate report
200
- ```
201
-
202
- ### Mode 2: Multiple Sections Execution
203
- ```javascript
204
- // User: "Run tests for sections 1, 3, and 5"
205
-
206
- // 1. Parse test plan
207
- // 2. Extract sections 1, 3, and 5
208
- // 3. Execute tests sequentially
209
- // 4. Generate single comprehensive report
210
- ```
211
-
212
- ### Mode 3: Full Plan Execution
213
- ```javascript
214
- // User: "Execute all tests from the test plan"
215
-
216
- // 1. Parse entire test plan
217
- // 2. Execute all sections in order
218
- // 3. Handle dependencies between tests
219
- // 4. Generate comprehensive report with all results
220
- ```
221
-
222
- ### Mode 4: Filtered Execution
223
- ```javascript
224
- // User: "Run only GET and POST tests"
225
-
226
- // 1. Parse test plan
227
- // 2. Filter tests by HTTP method
228
- // 3. Execute filtered tests
229
- // 4. Generate filtered report
230
- ```
231
-
232
- ## Test Plan Parsing
233
-
234
- ### Expected Test Plan Structure
235
-
236
- ```markdown
237
- # API Test Plan
238
-
239
- ## Overview
240
- - Base URL: https://api.example.com
241
- - Authentication: Bearer Token
242
- - API Version: v1
243
-
244
- ## 1. GET /api/v1/Books - Retrieve all books
245
-
246
- ### Endpoint
247
- GET /api/v1/Books
248
-
249
- ### Expected Status
250
- 200 OK
251
-
252
- ### Request Headers
253
- - Content-Type: application/json
254
- - Authorization: Bearer {{authToken}}
255
-
256
- ### Sample Request
257
- No request body required
258
-
259
- ### Expected Response
260
- ```json
261
- [
262
- {
263
- "id": 1,
264
- "title": "Book Title",
265
- "author": "Author Name",
266
- "isbn": "978-3-16-148410-0"
267
- }
268
- ]
269
- ```
270
-
271
- ### Validation Criteria
272
- - Response is an array
273
- - Each book has id, title, author fields
274
- - Status code is 200
275
-
276
- ## 2. POST /api/v1/Books - Create new book
277
-
278
- ### Endpoint
279
- POST /api/v1/Books
280
-
281
- ### Expected Status
282
- 201 Created
283
-
284
- ### Request Headers
285
- - Content-Type: application/json
286
- - Authorization: Bearer {{authToken}}
287
-
288
- ### Sample Request
289
- ```json
290
- {
291
- "title": "New Book Title",
292
- "author": "Author Name",
293
- "isbn": "978-3-16-148410-0",
294
- "publishedDate": "2026-02-15"
295
- }
296
- ```
297
-
298
- ### Expected Response
299
- ```json
300
- {
301
- "id": 42,
302
- "title": "New Book Title",
303
- "author": "Author Name",
304
- "isbn": "978-3-16-148410-0",
305
- "publishedDate": "2026-02-15",
306
- "createdAt": "2026-02-15T10:30:00Z"
307
- }
308
- ```
309
- ```
310
-
311
- ### Parsing Strategy
312
-
313
- **1. Extract Base Configuration:**
314
- - Find "Base URL" or "API Base URL" in overview section
315
- - Extract authentication method and headers
316
- - Identify API version
317
-
318
- **2. Identify Test Sections:**
319
- - Look for markdown headers (##) that contain HTTP methods
320
- - Pattern: `## N. METHOD /endpoint - Description`
321
- - Examples: `## 1. GET /api/v1/Books`, `## 2. POST /api/v1/Users`
322
-
323
- **3. Parse Section Content:**
324
- - Extract endpoint URL
325
- - Parse expected status code
326
- - Find request headers
327
- - Extract request body from code blocks
328
- - Parse expected response from code blocks
329
- - Identify validation criteria
330
-
331
- **4. Handle Code Blocks:**
332
- ```javascript
333
- // JSON code blocks contain sample data
334
- // Look for: ```json [content] ```
335
- // Parse as JSON for request/response data
336
- ```
337
-
338
- ## Error Handling and Validation
339
-
340
- ### Test Failure Handling
341
-
342
- ```javascript
343
- try {
344
- await tools.api_request({
345
- sessionId: sessionId,
346
- method: "GET",
347
- url: "https://api.example.com/api/v1/Books",
348
- expect: { status: 200 }
349
- })
350
- console.log(`✅ Test passed: GET /api/v1/Books`);
351
- } catch (error) {
352
- console.error(`❌ Test failed: GET /api/v1/Books`);
353
- console.error(` Error: ${error.message}`);
354
- // Continue with remaining tests
355
- }
356
- ```
357
-
358
- ### Validation Options
359
-
360
- **Basic Status Validation:**
361
- ```javascript
362
- expect: { status: 200 }
363
- ```
364
-
365
- **Expected vs Actual Validation:**
366
- ```javascript
367
- expect: {
368
- status: 200,
369
- body: {
370
- "items": expectedResponseFromTestPlan,
371
- "count": "{{any}}" // Allow any value
372
- }
373
- }
374
- ```
375
-
376
- **Flexible Validation:**
377
- ```javascript
378
- expect: {
379
- status: [200, 201], // Accept either status
380
- body: {
381
- "id": "{{number}}", // Must be a number
382
- "title": "{{string}}", // Must be a string
383
- "items": "{{array}}" // Must be an array
384
- }
385
- }
386
- ```
387
-
388
- ## Session Management
389
-
390
- ### Tracking Test Execution
391
-
392
- ```javascript
393
- // Check test progress
394
- await tools.api_session_status({
395
- sessionId: sessionId
396
- })
397
-
398
- // Output includes:
399
- // - Total requests made
400
- // - Successful requests
401
- // - Failed requests
402
- // - Extracted variables
403
- // - Request history
404
- ```
405
-
406
- ### Session Naming Conventions
407
-
408
- **Descriptive Session IDs:**
409
- ```javascript
410
- // Format: test-execution-<feature>-<timestamp>
411
- const sessionId = `test-execution-books-api-${Date.now()}`;
412
- const sessionId = `test-execution-full-plan-${Date.now()}`;
413
- const sessionId = `test-execution-section-1-${Date.now()}`;
414
-
415
- // Benefits:
416
- // - Easy to identify in reports
417
- // - Helps organize multiple test runs
418
- // - Clear audit trail
419
- ```
420
-
421
- ## Report Generation
422
-
423
- ### HTML Report Features
424
-
425
- The `api_session_report` tool generates:
426
-
427
- - **Test Summary**
428
- - Total tests executed
429
- - Pass/fail statistics
430
- - Execution duration
431
- - Success rate percentage
432
-
433
- - **Request Details**
434
- - Each API call made
435
- - Request method, URL, headers, body
436
- - Response status, headers, body
437
- - Timing information (response time)
438
-
439
- - **Validation Results**
440
- - Expected vs Actual comparisons
441
- - Detailed failure messages
442
- - Status code validation
443
- - Response body validation
444
-
445
- - **Visual Elements**
446
- - Color-coded pass/fail indicators (✅/❌)
447
- - Expandable request/response sections
448
- - Timing charts
449
- - Interactive HTML with filtering
450
-
451
- ### Report Example
452
-
453
- ```javascript
454
- // Generate comprehensive report
455
- await tools.api_session_report({
456
- sessionId: "test-execution-books-api-1739597400000",
457
- outputPath: "./api-test-reports/books-api-execution-report.html"
458
- })
459
-
460
- // Report file created at:
461
- // ./api-test-reports/books-api-execution-report.html
462
-
463
- // Open in browser to view:
464
- // - 15 total requests
465
- // - 13 passed (86.7%)
466
- // - 2 failed (13.3%)
467
- // - Average response time: 145ms
468
- // - Total execution time: 2.3s
469
- ```
470
-
471
- ## Advanced Scenarios
472
-
473
- ### Scenario 1: Testing with Authentication
474
-
475
- ```javascript
476
- // Step 1: Authenticate first
477
- await tools.api_request({
478
- sessionId: sessionId,
479
- method: "POST",
480
- url: "https://api.example.com/auth/login",
481
- data: {
482
- email: "test@example.com",
483
- password: "password123"
484
- },
485
- expect: { status: 200 },
486
- extract: { "authToken": "access_token" }
487
- })
488
-
489
- // Step 2: Use token in subsequent requests
490
- await tools.api_request({
491
- sessionId: sessionId,
492
- method: "GET",
493
- url: "https://api.example.com/api/v1/protected-resource",
494
- headers: {
495
- "Authorization": "Bearer {{authToken}}" // Uses extracted token
496
- },
497
- expect: { status: 200 }
498
- })
499
- ```
500
-
501
- ### Scenario 2: Testing CRUD Operations
502
-
503
- ```javascript
504
- const sessionId = `test-execution-crud-${Date.now()}`;
505
-
506
- // CREATE
507
- await tools.api_request({
508
- sessionId: sessionId,
509
- method: "POST",
510
- url: "https://api.example.com/api/v1/Books",
511
- data: { title: "Test Book", author: "Test Author" },
512
- expect: { status: 201 },
513
- extract: { "newBookId": "id" }
514
- })
515
-
516
- // READ
517
- await tools.api_request({
518
- sessionId: sessionId,
519
- method: "GET",
520
- url: "https://api.example.com/api/v1/Books/{{newBookId}}",
521
- expect: { status: 200 }
522
- })
523
-
524
- // UPDATE
525
- await tools.api_request({
526
- sessionId: sessionId,
527
- method: "PUT",
528
- url: "https://api.example.com/api/v1/Books/{{newBookId}}",
529
- data: { title: "Updated Book", author: "Test Author" },
530
- expect: { status: 200 }
531
- })
532
-
533
- // DELETE
534
- await tools.api_request({
535
- sessionId: sessionId,
536
- method: "DELETE",
537
- url: "https://api.example.com/api/v1/Books/{{newBookId}}",
538
- expect: { status: 204 }
539
- })
540
-
541
- // Generate report showing complete CRUD workflow
542
- await tools.api_session_report({
543
- sessionId: sessionId,
544
- outputPath: "./api-test-reports/crud-test-report.html"
545
- })
546
- ```
547
-
548
- ### Scenario 3: Parallel Execution (Multiple Sessions)
549
-
550
- ```javascript
551
- // Execute different sections in parallel
552
- const session1 = `test-execution-books-${Date.now()}`;
553
- const session2 = `test-execution-users-${Date.now()}`;
554
- const session3 = `test-execution-orders-${Date.now()}`;
555
-
556
- // Run tests for different sections independently
557
- // Note: These should be awaited sequentially or use Promise.all if truly parallel
558
-
559
- // Generate individual reports
560
- await tools.api_session_report({
561
- sessionId: session1,
562
- outputPath: "./api-test-reports/books-report.html"
563
- })
564
-
565
- await tools.api_session_report({
566
- sessionId: session2,
567
- outputPath: "./api-test-reports/users-report.html"
568
- })
569
-
570
- await tools.api_session_report({
571
- sessionId: session3,
572
- outputPath: "./api-test-reports/orders-report.html"
573
- })
574
- ```
575
-
576
- ## Best Practices
577
-
578
- ### DO:
579
- - Use unique, descriptive session IDs for each test run
580
- - Parse test plan systematically (base URL, auth, sections)
581
- - Execute tests in logical order (auth first, dependencies second)
582
- - Use request chaining for dependent tests (extract/reuse IDs)
583
- - Generate comprehensive HTML reports after execution
584
- - Handle test failures gracefully (continue with remaining tests)
585
- - Provide clear progress updates to user during execution
586
- - Validate responses using expect parameters
587
- - Use consistent session naming conventions
588
-
589
- ### DON'T:
590
- - Don't reuse session IDs across different test runs
591
- - Don't skip authentication if test plan requires it
592
- - Don't execute dependent tests out of order
593
- - Don't forget to generate the final HTML report
594
- - Don't stop execution on first failure (unless critical)
595
- - Don't ignore validation criteria from test plan
596
- - Don't execute tests without parsing test plan structure first
597
- - Don't forget to extract base URL from test plan
598
-
599
- ## Expected Output
600
-
601
- After successful test execution, provide user with:
602
-
603
- 1. **Execution Summary:**
604
- ```
605
- Test Execution Summary:
606
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
607
- Session ID: test-execution-books-api-1739597400000
608
- Total Tests: 15
609
- Passed: 13 (86.7%)
610
- Failed: 2 (13.3%)
611
- Execution Time: 2.3s
612
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
613
-
614
- Test Results:
615
- ✅ GET /api/v1/Books - List all books
616
- ✅ GET /api/v1/Books/{id} - Get book by ID
617
- ✅ POST /api/v1/Books - Create new book
618
- ❌ PUT /api/v1/Books/{id} - Update book (404 Not Found)
619
- ✅ DELETE /api/v1/Books/{id} - Delete book
620
- ...
621
-
622
- 📊 HTML Report Generated:
623
- ./api-test-reports/books-api-execution-report.html
624
-
625
- Open this file in a browser for detailed analysis!
626
- ```
627
-
628
- 2. **Failed Test Details:**
629
- ```
630
- Failed Tests:
631
-
632
- ❌ PUT /api/v1/Books/{id}
633
- Expected: 200 OK
634
- Actual: 404 Not Found
635
- Response: {"error": "Book not found"}
636
-
637
- Possible causes:
638
- - Book ID may have been deleted
639
- - Endpoint URL may have changed
640
- - Authentication may have expired
641
- ```
642
-
643
- 3. **Next Steps:**
644
- ```
645
- Next Steps:
646
- 1. Open HTML report for detailed analysis
647
- 2. Review failed tests and fix issues
648
- 3. Re-run failed tests or use /test-healing skill
649
- 4. Update test plan if API has changed
650
- ```
651
-
652
- ## Integration with Other Skills
653
-
654
- ### After API Planning → Execute Tests
655
- ```
656
- 1. User: /api-planning create test plan for API
657
- → Test plan generated
658
-
659
- 2. User: /test-execution run tests from section 1
660
- → Tests executed, report generated
661
- ```
662
-
663
- ### Execute → Heal → Re-execute
664
- ```
665
- 1. User: /test-execution run all tests
666
- → Some tests fail
667
-
668
- 2. User: /test-healing fix failed tests
669
- → Tests updated with fixes
670
-
671
- 3. User: /test-execution re-run failed tests
672
- → All tests pass now
673
- ```
674
-
675
- ### Execute → Generate Code → Execute Again
676
- ```
677
- 1. User: /test-execution run quick validation
678
- → Quick API validation completed
679
-
680
- 2. User: /test-generation create Playwright tests
681
- → Executable test code generated
682
-
683
- 3. User: Run generated Playwright tests
684
- → Automated test suite running
685
- ```
686
-
687
- ## Troubleshooting
688
-
689
- ### Issue: Base URL not found in test plan
690
- - Check test plan overview section
691
- - Ask user to provide base URL
692
- - Look for API URL in first few sections
693
-
694
- ### Issue: Cannot parse test sections
695
- - Verify test plan uses markdown headers (##)
696
- - Check section titles include HTTP method
697
- - Ensure sections have required fields (endpoint, status)
698
-
699
- ### Issue: Authentication failures (401/403)
700
- - Extract auth requirements from test plan
701
- - Execute auth endpoint first
702
- - Use extracted tokens in subsequent requests
703
-
704
- ### Issue: Request chaining not working
705
- - Verify extract parameter is used correctly
706
- - Check variable naming matches between requests
707
- - Ensure extracted data exists in response
708
-
709
- ### Issue: Tests fail with timeouts
710
- - Check API availability
711
- - Verify network connectivity
712
- - Consider increasing timeout in api_request
713
-
714
- ### Issue: Report not generated
715
- - Ensure session ID is correct
716
- - Verify api_session_report is called after all tests
717
- - Check output path is valid
718
-
719
- ## Additional Tools Available
720
-
721
- Use these tools as needed:
722
- - `api_request` - Execute individual API requests
723
- - `api_session_status` - Check test execution progress
724
- - `api_session_report` - Generate HTML test reports
725
- - `search/readFile` - Read test plan files
726
- - `search/listDirectory` - Find test plan files
727
-
728
- ````