greenrun-cli 0.1.2 → 0.1.3
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/package.json
CHANGED
|
@@ -40,7 +40,7 @@ Ask the user if they want to run the affected tests. If yes, execute them **in p
|
|
|
40
40
|
|
|
41
41
|
Use the project's `concurrency` setting (default: 5) to determine batch size. Split affected tests into batches and launch each batch simultaneously using the **Task tool** with `run_in_background: true`.
|
|
42
42
|
|
|
43
|
-
For each test in a batch, launch a background agent with this prompt:
|
|
43
|
+
For each test in a batch, launch a background agent with `max_turns: 30` and `model: "sonnet"`. Use this prompt:
|
|
44
44
|
|
|
45
45
|
```
|
|
46
46
|
You are executing a single Greenrun browser test. You have access to browser automation tools and Greenrun MCP tools.
|
|
@@ -50,14 +50,19 @@ You are executing a single Greenrun browser test. You have access to browser aut
|
|
|
50
50
|
Step 1: Call `get_test` with test_id "{test_id}" to get full instructions.
|
|
51
51
|
Step 2: Call `start_run` with test_id "{test_id}" to begin - save the returned `run_id`.
|
|
52
52
|
Step 3: Execute the test instructions using browser automation:
|
|
53
|
-
-
|
|
53
|
+
- Call `tabs_context_mcp` then create a new browser tab for this test
|
|
54
54
|
- Follow each instruction step exactly as written
|
|
55
55
|
- The instructions will tell you where to navigate and what to do
|
|
56
|
-
-
|
|
56
|
+
- Only take a screenshot when you need to verify a visual assertion — not for every navigation or click
|
|
57
|
+
- When reading page content, prefer `find` or `read_page` with `filter: "interactive"` over full DOM reads
|
|
58
|
+
- NEVER trigger JavaScript alerts, confirms, or prompts — they block the browser extension entirely. Before clicking delete buttons or other destructive actions, use `javascript_tool` to override: `window.alert = () => {}; window.confirm = () => true; window.prompt = () => null;`
|
|
59
|
+
- If browser tools stop responding (no result or timeout), assume a dialog is blocking — report the error and stop. Do not keep retrying.
|
|
60
|
+
- If you get stuck or a step fails, record the failure and move on — do not retry more than once
|
|
57
61
|
Step 4: Call `complete_run` with:
|
|
58
62
|
- run_id: the run ID from step 2
|
|
59
63
|
- status: "passed" if all checks succeeded, "failed" if any check failed, "error" if execution was blocked
|
|
60
|
-
- result: a brief summary of what happened
|
|
64
|
+
- result: a brief summary of what happened (include the failure reason if failed/error)
|
|
65
|
+
Step 5: Close the browser tab you created to clean up.
|
|
61
66
|
|
|
62
67
|
Return a single line summary: {test_name} | {status} | {result_summary}
|
|
63
68
|
```
|
|
@@ -33,6 +33,8 @@ For each batch, launch all tests simultaneously using the **Task tool** with `ru
|
|
|
33
33
|
For each test in the current batch, call the Task tool with:
|
|
34
34
|
- subagent_type: "general-purpose"
|
|
35
35
|
- run_in_background: true
|
|
36
|
+
- max_turns: 30
|
|
37
|
+
- model: "sonnet"
|
|
36
38
|
- prompt: (see below)
|
|
37
39
|
```
|
|
38
40
|
|
|
@@ -46,14 +48,19 @@ You are executing a single Greenrun browser test. You have access to browser aut
|
|
|
46
48
|
Step 1: Call `get_test` with test_id "{test_id}" to get full instructions.
|
|
47
49
|
Step 2: Call `start_run` with test_id "{test_id}" to begin - save the returned `run_id`.
|
|
48
50
|
Step 3: Execute the test instructions using browser automation:
|
|
49
|
-
-
|
|
51
|
+
- Call `tabs_context_mcp` then create a new browser tab for this test
|
|
50
52
|
- Follow each instruction step exactly as written
|
|
51
53
|
- The instructions will tell you where to navigate and what to do
|
|
52
|
-
-
|
|
54
|
+
- Only take a screenshot when you need to verify a visual assertion — not for every navigation or click
|
|
55
|
+
- When reading page content, prefer `find` or `read_page` with `filter: "interactive"` over full DOM reads
|
|
56
|
+
- NEVER trigger JavaScript alerts, confirms, or prompts — they block the browser extension entirely. Before clicking delete buttons or other destructive actions, use `javascript_tool` to override: `window.alert = () => {}; window.confirm = () => true; window.prompt = () => null;`
|
|
57
|
+
- If browser tools stop responding (no result or timeout), assume a dialog is blocking — report the error and stop. Do not keep retrying.
|
|
58
|
+
- If you get stuck or a step fails, record the failure and move on — do not retry more than once
|
|
53
59
|
Step 4: Call `complete_run` with:
|
|
54
60
|
- run_id: the run ID from step 2
|
|
55
61
|
- status: "passed" if all checks succeeded, "failed" if any check failed, "error" if execution was blocked
|
|
56
|
-
- result: a brief summary of what happened
|
|
62
|
+
- result: a brief summary of what happened (include the failure reason if failed/error)
|
|
63
|
+
Step 5: Close the browser tab you created to clean up.
|
|
57
64
|
|
|
58
65
|
Return a single line summary: {test_name} | {status} | {result_summary}
|
|
59
66
|
```
|