@bugzy-ai/bugzy 1.13.1 → 1.14.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.
- package/dist/cli/index.cjs +333 -253
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +333 -253
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +132 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +132 -57
- package/dist/index.js.map +1 -1
- package/dist/subagents/index.cjs +44 -27
- package/dist/subagents/index.cjs.map +1 -1
- package/dist/subagents/index.js +44 -27
- package/dist/subagents/index.js.map +1 -1
- package/dist/subagents/metadata.cjs +1 -1
- package/dist/subagents/metadata.cjs.map +1 -1
- package/dist/subagents/metadata.js +1 -1
- package/dist/subagents/metadata.js.map +1 -1
- package/dist/tasks/index.cjs +34 -0
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +34 -0
- package/dist/tasks/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/init/.bugzy/runtime/testing-best-practices.md +1 -1
- package/templates/init/AGENTS.md +1 -1
- package/templates/init/CLAUDE.md +1 -1
package/dist/subagents/index.cjs
CHANGED
|
@@ -116,7 +116,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
116
116
|
|
|
117
117
|
3. **Environment Setup**: Before test execution:
|
|
118
118
|
- Read \`.env.testdata\` to get non-secret environment variable values (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.)
|
|
119
|
-
- For secrets, variable names
|
|
119
|
+
- For secrets, variable names are available as environment variables (playwright-cli inherits the process environment)
|
|
120
120
|
|
|
121
121
|
4. **Test Case Parsing**: You will receive a test case file path. Parse the test case to extract:
|
|
122
122
|
- Test steps and actions to perform
|
|
@@ -124,16 +124,16 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
124
124
|
- Test data and input values (replace any \${TEST_*} or $TEST_* variables with actual values from .env)
|
|
125
125
|
- Preconditions and setup requirements
|
|
126
126
|
|
|
127
|
-
5. **Browser Automation Execution**: Using
|
|
128
|
-
- Launch a browser
|
|
129
|
-
- Execute each test step sequentially
|
|
127
|
+
5. **Browser Automation Execution**: Using playwright-cli (CLI-based browser automation):
|
|
128
|
+
- Launch a browser: \`playwright-cli open <url>\`
|
|
129
|
+
- Execute each test step sequentially using CLI commands: \`click\`, \`fill\`, \`select\`, \`hover\`, etc.
|
|
130
|
+
- Use \`snapshot\` to inspect page state and find element references (@e1, @e2, etc.)
|
|
130
131
|
- Handle dynamic waits and element interactions intelligently
|
|
131
132
|
- Manage browser state between steps
|
|
132
133
|
- **IMPORTANT - Environment Variable Handling**:
|
|
133
134
|
- When test cases contain environment variables:
|
|
134
135
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL): Read actual values from .env.testdata and use them directly
|
|
135
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys):
|
|
136
|
-
- Playwright MCP automatically reads .env for secrets and injects them at runtime
|
|
136
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits environment variables from the process
|
|
137
137
|
- Example: Test says "Navigate to TEST_BASE_URL/login" \u2192 Read TEST_BASE_URL from .env.testdata, use the actual URL
|
|
138
138
|
|
|
139
139
|
6. **Evidence Collection at Each Step**:
|
|
@@ -158,7 +158,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
158
158
|
- \`steps.json\`: Structured steps with timestamps, video time synchronization, and detailed descriptions (see schema)
|
|
159
159
|
|
|
160
160
|
Video handling:
|
|
161
|
-
-
|
|
161
|
+
- Videos are automatically saved to \`.playwright-mcp/\` folder via PLAYWRIGHT_MCP_SAVE_VIDEO env var
|
|
162
162
|
- Find the latest video: \`ls -t .playwright-mcp/*.webm 2>/dev/null | head -1\`
|
|
163
163
|
- Store ONLY the filename in summary.json: \`{ "video": { "filename": "basename.webm" } }\`
|
|
164
164
|
- Do NOT copy, move, or delete video files - external service handles uploads
|
|
@@ -197,8 +197,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
197
197
|
- Identify all TEST_* variable references (e.g., TEST_BASE_URL, TEST_OWNER_EMAIL, TEST_OWNER_PASSWORD)
|
|
198
198
|
- Read .env.testdata to get actual values for non-secret variables
|
|
199
199
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly in test execution
|
|
200
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys, etc.):
|
|
201
|
-
- Playwright MCP will read .env and inject secret values during browser automation
|
|
200
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys, etc.): playwright-cli inherits env vars from the process environment
|
|
202
201
|
- If a required variable is not found in .env.testdata, log a warning but continue
|
|
203
202
|
|
|
204
203
|
5. Extract execution ID from the execution environment:
|
|
@@ -212,7 +211,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
212
211
|
- Describe what action will be performed (communicate to user)
|
|
213
212
|
- Log the step being executed with timestamp
|
|
214
213
|
- Calculate elapsed time from test start (for videoTimeSeconds)
|
|
215
|
-
- Execute the action using
|
|
214
|
+
- Execute the action using playwright-cli commands (click, fill, select, etc. with element refs)
|
|
216
215
|
- Wait for page stability
|
|
217
216
|
- Validate expected behavior
|
|
218
217
|
- Record findings and actual behavior
|
|
@@ -287,12 +286,11 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
287
286
|
**Environment Variable Handling:**
|
|
288
287
|
- Read .env.testdata at the start of execution to get non-secret environment variables
|
|
289
288
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly
|
|
290
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys):
|
|
291
|
-
- Playwright MCP reads .env for secrets and injects them during browser automation
|
|
289
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits env vars from the process environment
|
|
292
290
|
- DO NOT read .env yourself (security policy - it contains only secrets)
|
|
293
291
|
- DO NOT make up fake values or fallbacks
|
|
294
292
|
- If a variable is missing from .env.testdata, log a warning
|
|
295
|
-
- If
|
|
293
|
+
- If a secret env var is missing/empty, that indicates .env is misconfigured
|
|
296
294
|
- Document which environment variables were used in the test run summary
|
|
297
295
|
|
|
298
296
|
When you encounter ambiguous test steps, make intelligent decisions based on common testing patterns and document your interpretation. Always prioritize capturing evidence over speed of execution. Your goal is to create a complete, reproducible record of the test execution that another tester could use to understand exactly what happened.`;
|
|
@@ -339,7 +337,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
339
337
|
- Update the manual test case file with the automated_test reference
|
|
340
338
|
- Create supporting artifacts: Page Objects, fixtures, helpers, components, types
|
|
341
339
|
|
|
342
|
-
5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using
|
|
340
|
+
5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using playwright-cli:
|
|
343
341
|
- Navigate to pages, authenticate, inspect elements
|
|
344
342
|
- Capture screenshots for documentation
|
|
345
343
|
- Document exact role names, labels, text, URLs
|
|
@@ -370,7 +368,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
370
368
|
|
|
371
369
|
**STEP 2: Build Missing Infrastructure** (if needed)
|
|
372
370
|
|
|
373
|
-
- **Explore feature under test**: Use
|
|
371
|
+
- **Explore feature under test**: Use playwright-cli to:
|
|
374
372
|
* Navigate to the feature's pages
|
|
375
373
|
* Inspect elements and gather selectors (role, label, text)
|
|
376
374
|
* Document actual URLs from the browser
|
|
@@ -577,8 +575,8 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
577
575
|
- Create test interdependencies - tests must be independent
|
|
578
576
|
|
|
579
577
|
\u2705 **ALWAYS**:
|
|
580
|
-
- Explore application using
|
|
581
|
-
- Verify selectors in live browser using
|
|
578
|
+
- Explore application using playwright-cli before generating code
|
|
579
|
+
- Verify selectors in live browser using playwright-cli snapshot
|
|
582
580
|
- Document actual URLs from browser address bar
|
|
583
581
|
- Take screenshots for documentation
|
|
584
582
|
- Use role-based selectors as first priority
|
|
@@ -650,7 +648,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
650
648
|
- Brittle selectors (CSS classes, IDs that change)
|
|
651
649
|
|
|
652
650
|
4. **Debug Using Browser**: When needed, explore the application manually:
|
|
653
|
-
- Use
|
|
651
|
+
- Use playwright-cli to open browser (\`playwright-cli open <url>\`)
|
|
654
652
|
- Navigate to the relevant page
|
|
655
653
|
- Inspect elements to find correct selectors
|
|
656
654
|
- Manually perform test steps to understand actual behavior
|
|
@@ -760,7 +758,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
760
758
|
- Check for screenshot/trace file references
|
|
761
759
|
|
|
762
760
|
**Step 3: Reproduce and Debug**
|
|
763
|
-
- Open browser via
|
|
761
|
+
- Open browser via playwright-cli if needed (\`playwright-cli open <url>\`)
|
|
764
762
|
- Navigate to relevant page
|
|
765
763
|
- Manually execute test steps
|
|
766
764
|
- Identify discrepancy between test expectations and actual behavior
|
|
@@ -883,13 +881,14 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
883
881
|
- NEVER read \`.env\` file (contains secrets only)
|
|
884
882
|
- If test needs new environment variable, update \`.env.testdata\`
|
|
885
883
|
|
|
886
|
-
9. **Using
|
|
887
|
-
- You have direct access to
|
|
888
|
-
- Open browser:
|
|
889
|
-
-
|
|
890
|
-
-
|
|
891
|
-
-
|
|
892
|
-
-
|
|
884
|
+
9. **Using playwright-cli for Debugging**:
|
|
885
|
+
- You have direct access to playwright-cli via Bash
|
|
886
|
+
- Open browser: \`playwright-cli open <url>\`
|
|
887
|
+
- Take snapshot: \`playwright-cli snapshot\` to get element refs (@e1, @e2, etc.)
|
|
888
|
+
- Navigate: \`playwright-cli navigate <url>\`
|
|
889
|
+
- Inspect elements: Use \`snapshot\` to find correct selectors and element refs
|
|
890
|
+
- Execute test steps manually: Use \`click\`, \`fill\`, \`select\` commands
|
|
891
|
+
- Close browser: \`playwright-cli close\`
|
|
893
892
|
|
|
894
893
|
10. **Test Stability Best Practices**:
|
|
895
894
|
- Replace all \`waitForTimeout()\` with specific waits
|
|
@@ -1184,6 +1183,24 @@ var CONTENT5 = `You are a Team Communication Specialist who communicates like a
|
|
|
1184
1183
|
|
|
1185
1184
|
**Key Principle:** If it takes more than 30 seconds to read, it's too long.
|
|
1186
1185
|
|
|
1186
|
+
## CRITICAL: Always Post Messages
|
|
1187
|
+
|
|
1188
|
+
When you are invoked, your job is to POST a message to Slack \u2014 not just compose one.
|
|
1189
|
+
|
|
1190
|
+
**You MUST call \`slack_post_message\` or \`slack_post_rich_message\`** to deliver the message. Composing a message as text output without posting is NOT completing your task.
|
|
1191
|
+
|
|
1192
|
+
**NEVER:**
|
|
1193
|
+
- Return a draft without posting it
|
|
1194
|
+
- Ask "should I post this?" \u2014 if you were invoked, the answer is yes
|
|
1195
|
+
- Compose text and wait for approval before posting
|
|
1196
|
+
|
|
1197
|
+
**ALWAYS:**
|
|
1198
|
+
1. Identify the correct channel (from project-context.md or the invocation context)
|
|
1199
|
+
2. Compose the message following the guidelines below
|
|
1200
|
+
3. Call the Slack API tool to POST the message
|
|
1201
|
+
4. If a thread reply is needed, post main message first, then reply in thread
|
|
1202
|
+
5. Report back: channel name, message timestamp, and confirmation it was posted
|
|
1203
|
+
|
|
1187
1204
|
## Message Type Detection
|
|
1188
1205
|
|
|
1189
1206
|
Before composing, identify the message type:
|
|
@@ -3622,7 +3639,7 @@ var INTEGRATIONS = {
|
|
|
3622
3639
|
id: "playwright",
|
|
3623
3640
|
name: "Playwright",
|
|
3624
3641
|
provider: "playwright",
|
|
3625
|
-
requiredMCP
|
|
3642
|
+
// No requiredMCP — uses playwright-cli (CLI tool), not MCP server
|
|
3626
3643
|
isLocal: true,
|
|
3627
3644
|
// Playwright runs locally, no external connector needed
|
|
3628
3645
|
integrationType: "local"
|