ai-e2e-driver
Facilitates comprehensive, AI-guided validation within browser automation workflows, specializing in end-to-end scenario coverage. It employs Playwright for lightweight, predictable test execution, enabling users to articulate test logic using natural language directives for efficient deployment.
Author

m2rads
Quick Info
Actions
Tags
AI-Powered End-to-End Testing Harness
AI-E2E-Driver is a minimal-footprint framework designed for robust end-to-end (E2E) validation, enhanced with artificial intelligence capabilities, optimized for continuous integration pipelines. Formulate your validation steps in common language, and allow the integrated intelligence layer to manage the execution flow.
Core Capabilities
- LLM Integration: Express test requirements plainly; the engine translates and executes the full E2E sequence.
- Performance Focus: Utilizes Playwright's asset comparison mechanism instead of resource-intensive visual rasterization, ensuring rapid and stable test cycles.
- Visual Fallback: When structural comparisons prove insufficient for complex states, the system seamlessly transitions to pixel-level perceptual verification.
Setup Procedure
bash npm install @ai-driver/toolkit
npx playwright install
Persistent Browser Data Location
The utility initializes Chromium utilizing a fresh user data volume, stored here:
- C:\Users\
\AppData\Local\ai-e2e-driver\mcp-profile (Windows) - ~/Library/Caches/ai-e2e-driver/mcp-profile (macOS)
- ~/.cache/ai-e2e-driver/mcp-profile (Linux)
Operational Guide
Executing Tests
Use the --non-visual flag for CI environments to ensure background operation:
bash npx ai-e2e-driver run suite-alpha
MCP Integration Service
https://github.com/user-attachments/assets/b801f239-dc66-4b3b-bcf2-42e2a9a68721
A Model Context Protocol (MCP) broker, built atop Playwright, designed to streamline the connectivity between your E2E testing logic and your MCP client interfaces.
Primary Applications
- Orchestrating test plans generated and directed by Large Language Models (LLMs).
Configuration Example
After cloning the source repository, compile the necessary artifacts and integrate the E2E broker into your MCP Client configuration like so: Note: Operation in simulation/execution mode requires a valid OpenAI access credential.
bash npm install @ai-driver/mcp-adapter
npx playwright install
Subsequently, modify your configuration file:
js
{
"mcpBrokers": {
"e2e_driver": {
"executable": "npx",
"parameters": [
"npx @ai-driver/mcp-adapter",
"--key=
All accumulated session state is persisted within the designated profile path; this state is safe to purge between distinct testing runs to guarantee stateless execution.
Credits
This project draws foundational elements from Microsoft's Playwright MCP and is specifically engineered for autonomous end-to-end validation as a distinct operational utility. Licensed under the Apache 2.0 License.
WIKIPEDIA: A headless browser is a web browser without a graphical user interface. Headless browsers provide automated control of a web page in an environment similar to popular web browsers, but they are executed via a command-line interface or using network communication. They are particularly useful for testing web pages as they are able to render and understand HTML the same way a browser would, including styling elements such as page layout, color, font selection and execution of JavaScript and Ajax which are usually not available when using other testing methods. Since version 59 of Google Chrome and version 56 of Firefox, there is native support for remote control of the browser. This made earlier efforts obsolete, notably PhantomJS.
== Use cases == The main use cases for headless browsers are:
Test automation in modern web applications (web testing) Taking screenshots of web pages. Running automated tests for JavaScript libraries. Automating interaction of web pages.
=== Other uses === Headless browsers are also useful for web scraping. Google stated in 2009 that using a headless browser could help their search engine index content from websites that use Ajax. Headless browsers have also been misused in various ways:
Perform DDoS attacks on web sites. Increase advertisement impressions. Automate web sites in unintended ways e.g. for credential stuffing. However, a study of browser traffic in 2018 found no preference by malicious actors for headless browsers. There is no indication that headless browsers are used more frequently than non-headless browsers for malicious purposes, like DDoS attacks, SQL injections or cross-site scripting attacks.
== Usage == As several major browsers natively support headless mode through APIs, some software exists to perform browser automation through a unified interface. These include:
Selenium WebDriver – a W3C compliant implementation of WebDriver Playwright – a Node.js library to automate Chromium, Firefox and WebKit Puppeteer – a Node.js library to automate Chrome or Firefox
=== Test automation === Some test automation software and frameworks include headless browsers as part of their testing apparati.
Capybara uses headless browsing, either via WebKit or Headless Chrome to mimic user behavior in its testing protocols. Jasmine uses Selenium by default, but can use WebKit or Headless Chrome, to run browser tests. Cypress, a frontend testing framework QF-Test, a software tool for automated testing of programs via the graphical user interface where a headless browser can also be used for testing.
=== Alternatives === Another approach is to use software that provides browser APIs. For example, Deno provides browser APIs as part of its design. For Node.js, jsdom is the most complete provider. While most are able to support common browser features (HTML parsing, cookies, XHR, some JavaScript, etc.), they do not render the DOM and have limited support for DOM events. They usually perform faster than
