> For the complete documentation index, see [llms.txt](https://learning.contextqa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learning.contextqa.com/testing-with-ai-coding-agents.md).

# Testing with AI Coding Agents

- [Testing with AI Coding Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/ai-agent-testing.md): Write and verify unit, integration, functional, and end-to-end tests with AI coding agents, then connect ContextQA MCP for application testing and evidence.
- [Testing with Claude Code](https://learning.contextqa.com/testing-with-ai-coding-agents/claude-code-testing.md): Use Claude Code for contract-driven unit, integration and Playwright tests, then create and verify browser acceptance tests with ContextQA MCP.
- [Testing with Cursor](https://learning.contextqa.com/testing-with-ai-coding-agents/cursor-testing.md): Build an evidence-based test workflow in Cursor, review generated changes, and use ContextQA MCP for shared browser tests and portable test code.
- [Testing with Codex](https://learning.contextqa.com/testing-with-ai-coding-agents/codex-testing.md): Use Codex for repository-native tests and reproducible result receipts, then connect ContextQA MCP for reviewed browser tests and code export.
- [Copilot, Gemini CLI, and Windsurf](https://learning.contextqa.com/testing-with-ai-coding-agents/other-coding-agents.md): Use Copilot in VS Code, Gemini CLI, or Windsurf to create repository tests, connect ContextQA MCP, and verify application results with clear ownership boundaries.
- [Unit Testing with AI Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/unit-testing.md): Use Claude Code, Cursor, or Codex to create and verify meaningful unit tests, then connect changed user journeys to ContextQA through MCP.
- [Integration Testing with AI Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/integration-testing.md): Test real HTTP and application boundaries with Claude Code, Cursor, or Codex, then use ContextQA MCP for deployed API and workflow checks.
- [Functional Testing with AI Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/functional-testing.md): Turn business requirements into functional tests with Claude Code, Cursor, or Codex, then create and verify ContextQA cases through MCP.
- [End-to-End Testing with AI Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/end-to-end-testing.md): Use Claude Code, Cursor, or Codex to build Playwright end-to-end tests, verify real outcomes, and run equivalent ContextQA workflows through MCP.
- [Playwright Testing with AI Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/playwright-testing.md): Use Claude Code, Cursor, or Codex to write and review Playwright tests, verify assertions, and evaluate ContextQA MCP creation and Playwright export.
- [Playwright MCP, CLI, and Test Agents](https://learning.contextqa.com/testing-with-ai-coding-agents/playwright-mcp-cli-test-agents.md): Choose Playwright MCP, CLI skills, Test Agents, or ContextQA MCP for browser exploration, test generation, repeatable execution, and reviewed evidence.
- [Test AI-Generated Code](https://learning.contextqa.com/testing-with-ai-coding-agents/testing-ai-generated-code.md): Validate AI-generated code against independent acceptance rules, detect deliberate defects, and check changed application journeys with ContextQA MCP.
- [Playwright Authentication and Sessions](https://learning.contextqa.com/testing-with-ai-coding-agents/playwright-authentication-testing.md): Build Playwright authentication tests for login, saved sessions, logout, expiry, and role isolation, then verify the same outcomes through ContextQA MCP.
- [Cypress to Playwright Migration](https://learning.contextqa.com/testing-with-ai-coding-agents/cypress-to-playwright.md): Convert Cypress tests to Playwright by mapping assertions, waits, intercepts, sessions, and fixtures, then verify equivalent behavior before cutover.
- [OpenAPI Contract Testing with AI](https://learning.contextqa.com/testing-with-ai-coding-agents/openapi-contract-testing.md): Turn an OpenAPI specification into reviewed API tests, distinguish schema checks from business assertions, and add ContextQA MCP without assuming complete coverage.
- [Choose a Testing Framework](https://learning.contextqa.com/testing-with-ai-coding-agents/framework-selection.md): Choose Playwright, Cypress, Selenium, or native unit and integration tests based on risk, existing code, and ownership; add ContextQA MCP where it fits.
- [Export Tests and Verify Portability](https://learning.contextqa.com/testing-with-ai-coding-agents/export-and-portability.md): Export a ContextQA Playwright project through MCP, save the returned files locally, review credentials and manual steps, and prove assertion parity before CI.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learning.contextqa.com/testing-with-ai-coding-agents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
