For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

How to Run Puppeteer Tests With Agent Skills on TestMu AI


If you write Puppeteer tests with an AI coding assistant, Agent Skills let that assistant generate production-ready Puppeteer automation instead of you setting up the project by hand. You get correct project structure, dependency versions, and both local and TestMu AI cloud execution patterns without wiring them together yourself. You install the puppeteer-skill into your tool's skills directory, then describe the test you want in natural language.

The puppeteer-skill is part of TestMu AI Agent Skills, structured packages that teach AI coding assistants how to write production-grade test automation code.

About Agent Skills​


Agent Skills are self-contained packages of instructions, code patterns, debugging guides, and CI/CD configurations for specific testing frameworks. Once installed, your AI assistant works like a Senior QA automation architect with knowledge of:

  • Proper project structure for each framework
  • Correct dependency versions and configurations
  • Both local and TestMu AI cloud execution patterns
  • Common pitfalls and debugging approaches
  • CI/CD integration with GitHub Actions

Prerequisites​


Before you install the skill, make sure you have the following in place.

Installing the Puppeteer Agent Skill​


Clone the repository and copy the Puppeteer skill into your AI tool's skills directory. Use the command that matches your tool.

Verified
git clone https://github.com/LambdaTest/agent-skills.git

# For Claude Code
cp -r agent-skills/puppeteer-skill .claude/skills/

# For Cursor
cp -r agent-skills/puppeteer-skill .cursor/skills/

# For GitHub Copilot
cp -r agent-skills/puppeteer-skill .github/skills/

# For Gemini CLI
cp -r agent-skills/puppeteer-skill .gemini/skills/
tip

If you prefer installing all available framework skills, clone the repository directly into your tool's skills directory (e.g., .claude/skills/, .cursor/skills/).

Set Up Your Authentication​


Configure your TestMu AI credentials as environment variables so the generated tests can connect to the cloud.

Verified
export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"

Running Your First Test Using Agent Skills​


Once the skill is installed, ask your AI assistant to write tests in natural language. The examples below show the kind of prompt the skill responds to.

Verified
"Write Puppeteer tests to scrape product data and run them on TestMu AI cloud"
Verified
"Set up Puppeteer with Jest for E2E testing and generate PDF reports"
Verified
"Run headless Chrome tests on TestMu AI with network interception"

The Agent Skill automatically handles:

  1. Project setup - Creates the right folder structure, dependencies, and config files
  2. Language detection - Maps your request to JavaScript or TypeScript
  3. Execution target - Configures local or TestMu AI cloud execution via CDP WebSocket
  4. Best practices - Uses waitForSelector, proper navigation handling, and network interception patterns

What's Included in the Puppeteer Skill​


The skill ships as a small set of files, with each part of the reference mapped to a specific area of Puppeteer automation. The structure and coverage are shown below.

Verified
puppeteer-skill/
├── SKILL.md
└── reference/
├── playbook.md
└── advanced-patterns.md
SectionDetails
Project SetupDependencies, versions, configuration files, project structure
Core PatternsComplete, runnable code examples with proper wait strategies
Cloud IntegrationTestMu AI CDP WebSocket connection and capabilities configuration
CI/CD IntegrationGitHub Actions workflows with reporting and parallel execution
Debugging Guide12+ common issues mapped to solutions
Best PracticesActionable recommendations for production code

Supported Frameworks With Dedicated Agent Skills​


The following framework docs under Puppeteer reference their own dedicated Agent Skills. Use the table to find the skill and guide for each framework.

FrameworkAgent SkillDocumentation
Jestjest-skillRun Puppeteer tests with Jest
Mochamocha-skillRun Puppeteer tests with Mocha
pytest (Pyppeteer)pytest-skillRun Puppeteer tests with pytest

Supported AI Tools​


Agent Skills work across the AI coding tools below. Each row shows where to place the skill for that tool.

ToolTypeInstallation Path
Claude CodeCLI.claude/skills/
GitHub CopilotExtension.github/skills/
CursorIDE.cursor/skills/
Gemini CLICLI.gemini/skills/
Codex CLICLI.codex/skills/
OpenCodeCLI.opencode/skills/
Claude.aiWebSettings > Features > Skills

Continue with these related guides to run and configure Puppeteer tests on TestMu AI.

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles