AI

An autonomous AI testing tool: agents that test APIs and UIs on their own

DRCODE's main product — a tool that captures what a tester does and then has an AI agent test the APIs and UI by itself. The UI-testing toolkit was mine to build from scratch.

Mokshit Jain · · 7 min read

This was the main product we were building at DRCODE — an autonomous testing tool driven by an AI agent. It didn’t become a commercial success, but I learned a lot building it, and one half of it — the UI-testing toolkit — I built from the ground up. There are two sides to the tool, so let me take them one at a time.

Side one: API end-to-end testing

A tester opens a Chrome extension, hits “start capturing”, and just uses the app the way they normally would — logging in, clicking around, hitting endpoints. The extension captures every API call and its inputs, then cleans that up (dropping the domains and calls we don’t care about).

That cleaned set of APIs — with their responses and payloads — goes to the server, which generates variants of the inputs: different IDs for login, different field values, different query parameters, and so on. It then analyzes the responses (should this be a 200, a 201, a 401?) and generates test cases for the whole end-to-end flow. It keeps the login session key flowing to later calls, lets the user supply their own credentials without sharing them with any agent, and shows exactly which API in a flow breaks and why.

On this side my work was mostly fixing bugs in the E2E flow and the capture extension, and improving how test cases are generated and run.

Side two: the UI-testing toolkit (built from scratch)

This part was mine, end to end (I used a couple of open-source tools as reference). There are a few versions, and we ran proof-of-concepts on each. The idea:

  • Playwright is connected to the server as an MCP. The agent controls a browser to carry out a flow the user described, and the resulting Playwright script is saved automatically. The agent then mimics variations of that flow, both from the saved script and during a discovery phase.
  • A separate Chrome extension captures every click a QA tester makes and hands it to the agent. The agent takes screenshots of each page, mimics the tester’s behavior, and then actively tries to break the flow — running any task the user prompts, over multiple iterations, saving each attempt as a script.

We only tested against staging and development deployments with dedicated test credentials, never real production sites.

What I took away

The honest outcome is that the product didn’t take off, but the engineering was some of the most interesting I’ve done — getting an agent to drive a browser reliably, capture human intent from clicks, and then diverge from it to find breakage. Building the UI-testing side from nothing taught me how much of “AI does the testing” is really careful plumbing around the agent: capture, replay, isolation, and saving artifacts you can trust.

Share
Written by
Mokshit Jain

AI engineer & full-stack developer building LLM products, automation, and RAG pipelines.

Continue reading