writing-codeceptjs-tests

Installation
SKILL.md

Writing CodeceptJS 4 Tests

A test that was never executed during authoring is unreliable by definition. The right way to write a Scenario is to drive the real browser through the CodeceptJS MCP server, query the page to learn locators, and only commit steps that actually pass. This skill is the playbook for that loop.

Two authoring modes, picked by how much of the flow you already know:

  • Mode A — incremental run_code — send one or two I.* lines per run_code, read the response, repeat. Suited to extending an existing test or porting a manual plan with known steps.
  • Mode B — scaffold-and-pause (recommended for greenfield / unknown flows) — write a stub Scenario containing I.amOnPage('/...'); pause();, run via MCP run_test. The browser opens and yields control at pause() on the live container. Drive the page through run_code to discover the flow, then edit the test to replace pause() with the verified sequence and re-run.

Both modes share the discovery / locator / commit steps below; the difference is just where the in-flight exploration happens.

Workflow

1. Read the project (fundamentals)

Run the codeceptjs-fundamentals skill first. You need: active web helper, base URL, plugins (especially aiTrace, auth), AI provider, page-object names, env vars.

Installs
54
GitHub Stars
1
First Seen
May 21, 2026
writing-codeceptjs-tests — codeceptjs/skills