@bugzy-ai/bugzy 1.13.0 → 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 +339 -253
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +339 -253
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +138 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +138 -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 +38 -0
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +38 -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.js
CHANGED
|
@@ -76,7 +76,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
76
76
|
|
|
77
77
|
3. **Environment Setup**: Before test execution:
|
|
78
78
|
- Read \`.env.testdata\` to get non-secret environment variable values (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.)
|
|
79
|
-
- For secrets, variable names
|
|
79
|
+
- For secrets, variable names are available as environment variables (playwright-cli inherits the process environment)
|
|
80
80
|
|
|
81
81
|
4. **Test Case Parsing**: You will receive a test case file path. Parse the test case to extract:
|
|
82
82
|
- Test steps and actions to perform
|
|
@@ -84,16 +84,16 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
84
84
|
- Test data and input values (replace any \${TEST_*} or $TEST_* variables with actual values from .env)
|
|
85
85
|
- Preconditions and setup requirements
|
|
86
86
|
|
|
87
|
-
5. **Browser Automation Execution**: Using
|
|
88
|
-
- Launch a browser
|
|
89
|
-
- Execute each test step sequentially
|
|
87
|
+
5. **Browser Automation Execution**: Using playwright-cli (CLI-based browser automation):
|
|
88
|
+
- Launch a browser: \`playwright-cli open <url>\`
|
|
89
|
+
- Execute each test step sequentially using CLI commands: \`click\`, \`fill\`, \`select\`, \`hover\`, etc.
|
|
90
|
+
- Use \`snapshot\` to inspect page state and find element references (@e1, @e2, etc.)
|
|
90
91
|
- Handle dynamic waits and element interactions intelligently
|
|
91
92
|
- Manage browser state between steps
|
|
92
93
|
- **IMPORTANT - Environment Variable Handling**:
|
|
93
94
|
- When test cases contain environment variables:
|
|
94
95
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL): Read actual values from .env.testdata and use them directly
|
|
95
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys):
|
|
96
|
-
- Playwright MCP automatically reads .env for secrets and injects them at runtime
|
|
96
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits environment variables from the process
|
|
97
97
|
- Example: Test says "Navigate to TEST_BASE_URL/login" \u2192 Read TEST_BASE_URL from .env.testdata, use the actual URL
|
|
98
98
|
|
|
99
99
|
6. **Evidence Collection at Each Step**:
|
|
@@ -118,7 +118,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
118
118
|
- \`steps.json\`: Structured steps with timestamps, video time synchronization, and detailed descriptions (see schema)
|
|
119
119
|
|
|
120
120
|
Video handling:
|
|
121
|
-
-
|
|
121
|
+
- Videos are automatically saved to \`.playwright-mcp/\` folder via PLAYWRIGHT_MCP_SAVE_VIDEO env var
|
|
122
122
|
- Find the latest video: \`ls -t .playwright-mcp/*.webm 2>/dev/null | head -1\`
|
|
123
123
|
- Store ONLY the filename in summary.json: \`{ "video": { "filename": "basename.webm" } }\`
|
|
124
124
|
- Do NOT copy, move, or delete video files - external service handles uploads
|
|
@@ -157,8 +157,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
157
157
|
- Identify all TEST_* variable references (e.g., TEST_BASE_URL, TEST_OWNER_EMAIL, TEST_OWNER_PASSWORD)
|
|
158
158
|
- Read .env.testdata to get actual values for non-secret variables
|
|
159
159
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly in test execution
|
|
160
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys, etc.):
|
|
161
|
-
- Playwright MCP will read .env and inject secret values during browser automation
|
|
160
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys, etc.): playwright-cli inherits env vars from the process environment
|
|
162
161
|
- If a required variable is not found in .env.testdata, log a warning but continue
|
|
163
162
|
|
|
164
163
|
5. Extract execution ID from the execution environment:
|
|
@@ -172,7 +171,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
172
171
|
- Describe what action will be performed (communicate to user)
|
|
173
172
|
- Log the step being executed with timestamp
|
|
174
173
|
- Calculate elapsed time from test start (for videoTimeSeconds)
|
|
175
|
-
- Execute the action using
|
|
174
|
+
- Execute the action using playwright-cli commands (click, fill, select, etc. with element refs)
|
|
176
175
|
- Wait for page stability
|
|
177
176
|
- Validate expected behavior
|
|
178
177
|
- Record findings and actual behavior
|
|
@@ -247,12 +246,11 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
|
|
|
247
246
|
**Environment Variable Handling:**
|
|
248
247
|
- Read .env.testdata at the start of execution to get non-secret environment variables
|
|
249
248
|
- For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly
|
|
250
|
-
- For secrets (TEST_OWNER_PASSWORD, API keys):
|
|
251
|
-
- Playwright MCP reads .env for secrets and injects them during browser automation
|
|
249
|
+
- For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits env vars from the process environment
|
|
252
250
|
- DO NOT read .env yourself (security policy - it contains only secrets)
|
|
253
251
|
- DO NOT make up fake values or fallbacks
|
|
254
252
|
- If a variable is missing from .env.testdata, log a warning
|
|
255
|
-
- If
|
|
253
|
+
- If a secret env var is missing/empty, that indicates .env is misconfigured
|
|
256
254
|
- Document which environment variables were used in the test run summary
|
|
257
255
|
|
|
258
256
|
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.`;
|
|
@@ -299,7 +297,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
299
297
|
- Update the manual test case file with the automated_test reference
|
|
300
298
|
- Create supporting artifacts: Page Objects, fixtures, helpers, components, types
|
|
301
299
|
|
|
302
|
-
5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using
|
|
300
|
+
5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using playwright-cli:
|
|
303
301
|
- Navigate to pages, authenticate, inspect elements
|
|
304
302
|
- Capture screenshots for documentation
|
|
305
303
|
- Document exact role names, labels, text, URLs
|
|
@@ -330,7 +328,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
330
328
|
|
|
331
329
|
**STEP 2: Build Missing Infrastructure** (if needed)
|
|
332
330
|
|
|
333
|
-
- **Explore feature under test**: Use
|
|
331
|
+
- **Explore feature under test**: Use playwright-cli to:
|
|
334
332
|
* Navigate to the feature's pages
|
|
335
333
|
* Inspect elements and gather selectors (role, label, text)
|
|
336
334
|
* Document actual URLs from the browser
|
|
@@ -537,8 +535,8 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
|
|
|
537
535
|
- Create test interdependencies - tests must be independent
|
|
538
536
|
|
|
539
537
|
\u2705 **ALWAYS**:
|
|
540
|
-
- Explore application using
|
|
541
|
-
- Verify selectors in live browser using
|
|
538
|
+
- Explore application using playwright-cli before generating code
|
|
539
|
+
- Verify selectors in live browser using playwright-cli snapshot
|
|
542
540
|
- Document actual URLs from browser address bar
|
|
543
541
|
- Take screenshots for documentation
|
|
544
542
|
- Use role-based selectors as first priority
|
|
@@ -610,7 +608,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
610
608
|
- Brittle selectors (CSS classes, IDs that change)
|
|
611
609
|
|
|
612
610
|
4. **Debug Using Browser**: When needed, explore the application manually:
|
|
613
|
-
- Use
|
|
611
|
+
- Use playwright-cli to open browser (\`playwright-cli open <url>\`)
|
|
614
612
|
- Navigate to the relevant page
|
|
615
613
|
- Inspect elements to find correct selectors
|
|
616
614
|
- Manually perform test steps to understand actual behavior
|
|
@@ -720,7 +718,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
720
718
|
- Check for screenshot/trace file references
|
|
721
719
|
|
|
722
720
|
**Step 3: Reproduce and Debug**
|
|
723
|
-
- Open browser via
|
|
721
|
+
- Open browser via playwright-cli if needed (\`playwright-cli open <url>\`)
|
|
724
722
|
- Navigate to relevant page
|
|
725
723
|
- Manually execute test steps
|
|
726
724
|
- Identify discrepancy between test expectations and actual behavior
|
|
@@ -843,13 +841,14 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
|
|
|
843
841
|
- NEVER read \`.env\` file (contains secrets only)
|
|
844
842
|
- If test needs new environment variable, update \`.env.testdata\`
|
|
845
843
|
|
|
846
|
-
9. **Using
|
|
847
|
-
- You have direct access to
|
|
848
|
-
- Open browser:
|
|
849
|
-
-
|
|
850
|
-
-
|
|
851
|
-
-
|
|
852
|
-
-
|
|
844
|
+
9. **Using playwright-cli for Debugging**:
|
|
845
|
+
- You have direct access to playwright-cli via Bash
|
|
846
|
+
- Open browser: \`playwright-cli open <url>\`
|
|
847
|
+
- Take snapshot: \`playwright-cli snapshot\` to get element refs (@e1, @e2, etc.)
|
|
848
|
+
- Navigate: \`playwright-cli navigate <url>\`
|
|
849
|
+
- Inspect elements: Use \`snapshot\` to find correct selectors and element refs
|
|
850
|
+
- Execute test steps manually: Use \`click\`, \`fill\`, \`select\` commands
|
|
851
|
+
- Close browser: \`playwright-cli close\`
|
|
853
852
|
|
|
854
853
|
10. **Test Stability Best Practices**:
|
|
855
854
|
- Replace all \`waitForTimeout()\` with specific waits
|
|
@@ -1144,6 +1143,24 @@ var CONTENT5 = `You are a Team Communication Specialist who communicates like a
|
|
|
1144
1143
|
|
|
1145
1144
|
**Key Principle:** If it takes more than 30 seconds to read, it's too long.
|
|
1146
1145
|
|
|
1146
|
+
## CRITICAL: Always Post Messages
|
|
1147
|
+
|
|
1148
|
+
When you are invoked, your job is to POST a message to Slack \u2014 not just compose one.
|
|
1149
|
+
|
|
1150
|
+
**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.
|
|
1151
|
+
|
|
1152
|
+
**NEVER:**
|
|
1153
|
+
- Return a draft without posting it
|
|
1154
|
+
- Ask "should I post this?" \u2014 if you were invoked, the answer is yes
|
|
1155
|
+
- Compose text and wait for approval before posting
|
|
1156
|
+
|
|
1157
|
+
**ALWAYS:**
|
|
1158
|
+
1. Identify the correct channel (from project-context.md or the invocation context)
|
|
1159
|
+
2. Compose the message following the guidelines below
|
|
1160
|
+
3. Call the Slack API tool to POST the message
|
|
1161
|
+
4. If a thread reply is needed, post main message first, then reply in thread
|
|
1162
|
+
5. Report back: channel name, message timestamp, and confirmation it was posted
|
|
1163
|
+
|
|
1147
1164
|
## Message Type Detection
|
|
1148
1165
|
|
|
1149
1166
|
Before composing, identify the message type:
|
|
@@ -3582,7 +3599,7 @@ var INTEGRATIONS = {
|
|
|
3582
3599
|
id: "playwright",
|
|
3583
3600
|
name: "Playwright",
|
|
3584
3601
|
provider: "playwright",
|
|
3585
|
-
requiredMCP
|
|
3602
|
+
// No requiredMCP — uses playwright-cli (CLI tool), not MCP server
|
|
3586
3603
|
isLocal: true,
|
|
3587
3604
|
// Playwright runs locally, no external connector needed
|
|
3588
3605
|
integrationType: "local"
|