Skip to content
Philippos Melikidis

2026 · research

Do crawler locators make AI-written tests better?

A university study that compares a crawler, an LLM agent and a hybrid of both for generating end-to-end tests. The hybrid did not win.

0.146 vs 0.142judge-rated hallucination, hybrid vs. agent with stories, p = 0.48

Grounding in crawler locators did not reduce hallucination

The problem

An LLM agent can write end-to-end tests for a web app on its own, but it guesses locators. A crawler finds real ones, but does not know what a test should check. Combining the two sounds like the obvious fix. We wanted to know whether it is.

What I built

A benchmark on OWASP Juice Shop with four pipelines. A Playwright crawler turns a state graph into tests. An LLM agent explores the app on its own, a second one also gets the user stories, and a hybrid gets the stories plus the crawler's map with verified locators. Every LLM pipeline ran 50 times with the same generator model. A shared metric suite runs each generated suite, maps the results to functional suitability in ISO/IEC 25010, and a judge model from a different family rates correctness, appropriateness and hallucination.

What came out

The hypothesis that grounding in crawler locators helps was not supported. Judge-rated hallucination was 0.146 for the hybrid and 0.142 for the agent with stories (Mann-Whitney p = 0.48), and the hybrid's ISO completeness was lower, 0.47 vs. 0.54 (p = 0.01). The crawler suite passed 100 %, but each of its 30 tests ends with a smoke check that the page body exists, so it is green while checking little. The p-values are uncorrected for multiple comparisons, and the crawler is a single run.

My part

A university project with Timon Fricke at Reutlingen University. I built most of the pipeline and the metric suite.

Tech

  • Python
  • Playwright
  • pytest
  • DeepEval
  • LLMs via Ollama

Source on GitHub

← All work