bitreka

Software Engineering Leader | AI-Assisted Development | .NET & C# | FinTech & Payments | E-Commerce | Architecture • Backend • Microservices • DevOps • Test Automation • AI Agents

All work

Testbot

An AI agent that explores an application, writes its user stories and turns them into Playwright tests.

Status
MVPA working first version with the core flows.
Role
Sole engineer: product design, architecture, agent, API, UI and the CI gate.
Started
Categories
AI and LLM, Developer tools, Automation
Parts
Web

Purpose

Learn what an application does from the application itself, keep that knowledge as approved user stories, and show what changed when the application changes.

The problem

End-to-end tests are written by hand, describe what someone remembered the app to do, and drift from the real product. Speeding up test writing does not fix that; the source of truth has to be the running application.

What I built

  • An exploration agent (Playwright .NET) that walks a target app in a real browser and records pages, forms and risky elements with screenshots, video and traces.
  • An understanding step that describes each page's purpose and compares it with the project's own documents, opening a discrepancy where they disagree.
  • A user-story workflow: stories are proposed per page; a human approves, edits or rejects them.
  • Test generation and execution: approved stories become Playwright tests that run and are compared with earlier runs.
  • A .NET 10 minimal API with EF Core on PostgreSQL that also serves the React 19 interface.
  • One local CI script — format, build with warnings as errors, tests, lint, dependency audit, secret scan and CodeQL — that CI calls unchanged.

Features

  • Browser-based discovery of the app under test, with screenshots, video and a trace.
  • Page-level user-story proposals that you approve or reject.
  • Test generation and runs on several engines.
  • Discrepancy cards between your documents and what discovery actually found.
  • Import of OpenAPI, WSDL and HTTP collections, with contract-drift detection.
  • Run schedules, flakiness quarantine and suite alerts.
  • Registration and e-mail verification flows, handled with a mailbox probe during discovery.
  • Per-tenant LLM providers and keys, with a model assigned to each stage.
  • Turkish and English interface.

Stack

  • .NET
  • EF Core
  • PostgreSQL
  • Playwright
  • React
  • Vite
  • TypeScript
  • GitHub Actions

AI in this project

In the product

  • Every model call goes through one gateway that picks a model by purpose (cheap or strong tier). The default cheap model is Claude Haiku and the strong one Claude Opus; other OpenAI-compatible providers can be configured per tenant, and keys belong to the tenant.
  • Documents: an uploaded spec or PRD is analysed for actors, flows and rules. A separate step compares free text with what discovery observed and opens discrepancies.
  • Discovery: a multi-turn agent browses the app within limits (6 pages, 12 turns). It has no click tool at all: the capability is simply not given, and every URL the model produces is re-checked before it is visited.
  • Authoring: the strong model writes user stories, test cases and clarifying questions. Stories stay proposals until a person approves or rejects them.
  • Scripts: the model generates Playwright or Selenium code and repairs a failing script. Generated code passes an inspection guard and is rejected if it fails.
  • Cost and privacy guards: a per-day and per-session budget is checked before each call, including inside tool loops, and sensitive values are masked before anything is written to disk.
  • The model is replaceable in tests: the repair loop and authoring use interfaces with fakes, so they run without any model call.

In how it was built

  • 258 of 316 commits carry a Claude co-author trailer.
  • A rule file records two real incidents: a parallel sub-agent that swept 69 files of shared work with a git stash, and a coverage figure inflated by an exclusion. A local 13-step gate and a per-assembly 80% coverage check came out of them.

Limitations

Tests need a real PostgreSQL and a real Chromium; there is no hosted demo yet.

Want something like this?

Tell me about your project — I reply within two working days.

Start a project