codeception-skill — Claude Code skill: how to install
Generates PHP Codeception acceptance, functional, and unit tests using BDD actor workflows. Useful for web interface validation and browser automation.
MIT 243 installs ★ 393 updated 2026-10-13
npx skills add LambdaTest/agent-skills --skill codeception-skill -a claude-codeWhat codeception-skill does
This skill instructs the agent to structure PHP Codeception suites using the Actor pattern. It provides templates for Cest test classes, field inputs, form submissions, and element assertions via $I methods.
It covers Page Object patterns with static selectors to keep test logic maintainable. The reference configuration includes WebDriver settings for running browser tests against LambdaTest infrastructure.
Executing the generated tests requires codeception/codeception and codeception/module-webdriver installed in your project via Composer. Test suites run through php vendor/bin/codecept run acceptance.
What it helps with
- generate Cest acceptance tests for user authentication and form submissions
- organize page selectors and reusable actions into Page Object classes
- configure WebDriver test runs for LambdaTest cloud browsers
- verify page elements, URLs, and text content with Actor methods
Example prompts for the agent
- Create a LoginCest Codeception test covering both valid and invalid login attempts
- Generate a Page Object class for the checkout page with fill and submit methods
- Prepare an acceptance.suite.yml configuration using the WebDriver module for Chrome
How to install codeception-skill
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill codeception-skill -a claude-code2Manually: put the files in place
~/.claude/skills/codeception-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/codeception-skill/
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill codeception-skill -a codex2Manually: put the files in place
.agents/skills/codeception-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill codeception-skill -a cursor2Manually: put the files in place
.cursor/skills/codeception-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install LambdaTest/agent-skills codeception-skill2Manually: put the files in place
.github/skills/codeception-skill/SKILL.md1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill codeception-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/LambdaTest/agent-skills --path codeception-skillManually: put the files in place
.devin/skills/codeception-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill codeception-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about codeception-skill
How to install codeception-skill in Claude Code?
Run npx skills add LambdaTest/agent-skills --skill codeception-skill -a claude-code.
What does codeception-skill do?
It guides coding agents to generate PHP Codeception test suites, including Cest classes, Page Objects, and Actor-based assertions.
What dependencies are required to run the tests?
You need codeception/codeception and codeception/module-webdriver installed as development dependencies in Composer.
Source text
SKILL.md · MIT
---
name: codeception-skill
description: >
Generates Codeception tests in PHP covering acceptance, functional, and unit
testing. BDD-style with Actor pattern. Use when user mentions "Codeception",
"$I->amOnPage", "$I->see", "Cest". Triggers on: "Codeception", "$I->amOnPage",
"AcceptanceTester", "Codeception PHP", "Cest".
languages:
- PHP
category: e2e-testing
license: MIT
metadata:
author: TestMu AI
version: "1.0"
---
# Codeception Testing Skill
## Core Patterns
### Acceptance Test (Cest)
```php
<?php
// tests/Acceptance/LoginCest.php
class LoginCest
{
public function _before(AcceptanceTester $I)
{
$I->amOnPage('/login');
}
public function loginWithValidCredentials(AcceptanceTester $I)
{
$I->fillField('email', '[email protected]');
$I->fillField('password', 'password123');
$I->click('Login');
$I->see('Dashboard');
$I->seeInCurrentUrl('/dashboard');
$I->seeElement('.welcome-message');
}
public function loginWithInvalidCredentials(AcceptanceTester $I)
{
$I->fillField('email', '[email protected]');
$I->fillField('password', 'wrong');
$I->click('Login');
$I->see('Invalid credentials');
$I->seeInCurrentUrl('/login');
}
}
```
### Actor Methods (AcceptanceTester $I)
```php
// Navigation
$I->amOnPage('/path');
$I->click('Button Text');
$I->click('#id');
$I->click(['xpath' => '//button']);
// Forms
$I->fillField('Name or Label', 'value');
$I->selectOption('Select', 'Option');
$I->checkOption('Checkbox');
$I->uncheckOption('Checkbox');
$I->attachFile('Upload', 'file.txt');
$I->submitForm('#form', ['email' => '[email protected]']);
// Assertions
$I->see('Text');
$I->dontSee('Text');
$I->seeElement('#id');
$I->dontSeeElement('.error');
$I->seeInField('email', '[email protected]');
$I->seeInCurrentUrl('/dashboard');
$I->seeInTitle('Page Title');
$I->seeCheckboxIsChecked('#agree');
$I->seeNumberOfElements('li', 5);
// Grabbers
$text = $I->grabTextFrom('.element');
$attr = $I->grabAttributeFrom('#link', 'href');
$value = $I->grabValueFrom('#input');
```
### Page Objects (Step Objects)
```php
<?php
// tests/_support/Page/Login.php
namespace Page;
class Login
{
public static $url = '/login';
public static $emailField = '#email';
public static $passwordField = '#password';
public static $loginButton = 'button[type="submit"]';
protected $I;
public function __construct(\AcceptanceTester $I) { $this->I = $I; }
public function login(string $email, string $password): void
{
$this->I->amOnPage(self::$url);
$this->I->fillField(self::$emailField, $email);
$this->I->fillField(self::$passwordField, $password);
$this->I->click(self::$loginButton);
}
}
```
### Cloud (TestMu AI)
Full setup: [reference/cloud-integration.md](reference/cloud-integration.md). Capabilities reference: [shared/testmu-cloud-reference.md](../shared/testmu-cloud-reference.md).
### Cloud Config (acceptance.suite.yml)
```yaml
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'http://localhost:3000'
host: 'hub.lambdatest.com'
port: 80
browser: chrome
capabilities:
'LT:Options':
user: '%LT_USERNAME%'
accessKey: '%LT_ACCESS_KEY%'
build: 'Codeception Build'
video: true
```
## Setup: `composer require --dev codeception/codeception codeception/module-webdriver`
## Init: `php vendor/bin/codecept bootstrap`
## Run: `php vendor/bin/codecept run acceptance`
## Deep Patterns
See `reference/playbook.md` for production-grade patterns:
| Section | What You Get |
|---------|-------------|
| §1 Project Setup | Installation, codeception.yml, suite configurations |
| §2 Acceptance Tests | Cest pattern, @dataProvider, WebDriver interactions |
| §3 API Tests | REST module, CRUD operations, @depends, HttpCode |
| §4 Page Objects | Page class with static selectors, reusable methods |
| §5 Database Testing | haveInDatabase, seeInDatabase, updateInDatabase |
| §6 Custom Helpers | Custom module extending Codeception Module |
| §7 CI/CD Integration | GitHub Actions with MySQL, Selenium, coverage |
| §8 Debugging Table | 12 common problems with causes and fixes |
| §9 Best Practices | 14-item Codeception testing checklist |
© TestMu AI · MIT · LambdaTest/agent-skills