Back to Codeceptjs

Plugins

docs/plugins.md

4.0.02.7 KB
Original Source

Plugins

CodeceptJS bundles the following plugins. Each plugin has its own page with full configuration reference.

pause

Pauses test execution interactively. Replaces the legacy pauseOnFail plugin. The default on=fail matches the old pauseOnFail behavior.

pageInfo

Collects information from web page after each failed test and adds it to the test as an artifact. It is suggested to enable this plugin if you run tests on CI and you need to debug failed tests. This plugin can be paired with analyze plugin to provide more context.

expose

Exposes properties from helper instances as injectable test arguments. Use it to access the underlying Playwright/Puppeteer page, the wdio browser client, or any other helper internal directly from a Scenario:

junitReporter

Generates a JUnit-compatible XML report after a test run.

coverage

Dumps code coverage from Playwright/Puppeteer after every test.

screenshot

Saves screenshots from the browser at points triggered by on=.

screencast

Records WebM video of tests using Playwright's screencast API.

customLocator

Creates a [custom locator][1] by using special attributes in HTML.

aiTrace

Generates AI-friendly trace files for debugging with AI agents. This plugin creates a markdown file with test execution logs and links to all artifacts (screenshots, HTML, ARIA snapshots, browser logs, HTTP requests) for each step.

auth

Logs user in for the first test and reuses session for next tests. Works by saving cookies into memory or file. If a session expires automatically logs in again.

pauseOnFail

Starts an interactive pause when a test fails.

analyze

Uses AI to analyze test failures and provide insights

autoDelay

Sometimes it takes some time for a page to respond to user's actions. Depending on app's performance this can be either slow or fast.

stepTimeout

Set timeout for test steps globally.

heal

Self-healing tests with AI.

customReporter

Sample custom reporter for CodeceptJS.

screenshotOnFail

Saves a screenshot when a test fails.

retryFailedStep

Retries each failed step in a test.

browser

Overrides browser helper config from the command line. Works for all browser helpers (Playwright, Puppeteer, WebDriver, Appium) without touching codecept.conf.