You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/agents.md
+32-25Lines changed: 32 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,38 @@ Agents get full control over test and browser execution:
23
23
24
24
CodeceptJS is token-efficient: it stores HTML, ARIA, logs, and HTTP request data as files instead of streaming them through MCP. Agents read these files with their native shell tools—no extra API calls, no redundant context.
25
25
26
+
## Essential Setup
27
+
28
+
Two things make agent testing work: the **skills** that teach the agent CodeceptJS, and the **MCP server** that lets it drive the browser. Set both up once, from your project directory.
See [/mcp](/mcp) for full client setup. Now the agent is ready to run the loop.
57
+
26
58
## The loop
27
59
28
60
Whether the agent is writing a new test or fixing an old one, it follows the same cycle.
@@ -96,31 +128,6 @@ Only `url` is inline. The rest are paths the agent opens with the right tool:
96
128
97
129
Saved HTML is formatted, with non-semantic elements stripped out: `<style>`, `<script>`, Tailwind-style trash classes, and inline `style=""` attributes. `grep` can then effectively find the correct tree branch in raw page source. ARIA snapshots are smaller and more structured than HTML, which is why the agent prefers them when picking locators.
98
130
99
-
## Setup
100
-
101
-
When CodeceptJS is installed, the MCP server can be launched with this command:
102
-
103
-
```bash
104
-
npx codeceptjs-mcp
105
-
```
106
-
107
-
> See [/mcp](/mcp) for detailed client setup.
108
-
109
-
We recommend pairing CodeceptJS MCP with the skills bundle.
110
-
111
-
Install for any agent:
112
-
113
-
```bash
114
-
npx skills add codeceptjs/skills
115
-
```
116
-
117
-
Or, in Claude Code:
118
-
119
-
```text
120
-
/plugin marketplace add codeceptjs/skills
121
-
/plugin install codeceptjs@codeceptjs-skills
122
-
```
123
-
124
131
## Usage Examples
125
132
126
133
When MCP and skills are connected, the agent receives predefined workflows and can act effectively for testing purposes. Common scenarios it handles:
0 commit comments