Evaluation KI-basierter End-to-End-Tests für Webanwendungen unter Einsatz des Model Context Protocol
Bachelorarbeit, Abel Berhane, 2026
Kurzfassung
Diese Arbeit untersucht, inwieweit das Model Context Protocol (MCP) die Erstellung und Wartung automatisierter End-to-End-Tests für Webanwendungen unterstützen kann. Verglichen werden eine klassisch entwickelte Playwright-Testsuite und eine MCP-gestützt erzeugte Testsuite für die Referenzanwendung nopCommerce. Beide Suiten bilden dieselben 23 fachlich abgeglichenen Testfälle ab. Bewertet werden Implementierungsumfang, Ausführungszeit, Robustheit gegenüber kontrollierten Änderungen der Benutzeroberfläche sowie Reparaturaufwand.
In der Baseline bestanden sämtliche 1.380 Einzelausführungen in Chromium, Firefox und WebKit. Im untersuchten Versuchsaufbau war die MCP-Suite dabei im Mittel 35,6 % schneller. In fünf kontrollierten UI-Mutationen erreichte die klassische Suite eine Bestehensquote von 90,4 %, die MCP-Suite 88,7 %. Für die vollständige Wiederherstellung waren bei der klassischen Suite zwei und bei der MCP-Suite vier Reparaturen erforderlich. Mutation und Reparatur wurden nur in Chromium untersucht. Die lediglich zwei direkt vergleichbaren Reparaturfälle erlauben keine belastbare Aussage zum Healer; einer davon wurde zudem durch eine nicht minimale manuelle Änderung beeinflusst. Der statische Implementierungsumfang war mit 722 beziehungsweise 724 approximativen Codezeilen nahezu identisch.
Während der Entwicklung maß und dokumentierte der Autor für die vollständige Erstellung der klassischen Suite ungefähr zwei aktive Arbeitswochen und für die MCP-gestützte Suite ungefähr zwei aktive Arbeitstage. Erfasst wurde die tatsächlich an der Suite-Erstellung verbrachte Arbeitszeit; Pausen und projektfremde Tätigkeiten sind nicht enthalten. Da dieselbe Person beide Ansätze umsetzte, die Messung nicht wiederholt wurde und Prozessphasen sowie Reihenfolgeeffekte unkontrolliert blieben, dienen diese Werte nur als projektbezogene Prozessbeobachtung. Ein belastbarer Effizienz- oder MCP-Effekt lässt sich daraus nicht ableiten.
Die Ergebnisse zeigen für die zwei konkreten Implementierungen einen Laufzeitunterschied und einen ersten Hinweis auf Reparaturpotenzial, jedoch keine generelle Überlegenheit des MCP-Ansatzes. Aufgrund nur einer Anwendung, eines Modells und einer Agentenkonfiguration, der begrenzten Zahl an Mutationen und Reparaturfällen sowie der fehlenden vollständigen Healer-Protokolle sind die Befunde als explorative Fallstudie einzuordnen.
Abstract
This thesis investigates to what extent the Model Context Protocol (MCP) can support the creation and maintenance of automated end-to-end tests for web applications. A conventionally developed Playwright test suite is compared with an MCP-assisted suite for the nopCommerce reference application. Both suites implement the same 23 functionally aligned test cases. The evaluation covers implementation size, execution time, robustness under controlled user interface changes, and repair effort.
All 1,380 individual baseline executions passed in Chromium, Firefox, and WebKit. In the studied setup, the MCP suite executed 35.6% faster on average. Across five controlled UI mutations, the conventional suite achieved a pass rate of 90.4%, compared with 88.7% for the MCP suite. Full recovery required two repairs for the conventional suite and four for the MCP suite. Mutation and repair were examined only in Chromium. The only two directly comparable repair cases do not support a reliable conclusion about the healer; one was also affected by a non-minimal manual change. Static implementation size was almost identical, with 722 and 724 approximate lines of code, respectively.
During development, the author measured and documented approximately two active working weeks for creating the complete conventional suite and approximately two active working days for the MCP-assisted suite. The measurement covers time actually spent creating the suites; breaks and unrelated activities are excluded. Since the same person implemented both approaches, the measurement was not repeated, and process phases and order effects remained uncontrolled, the values are only a project-specific process observation. They do not establish a reliable efficiency or MCP effect.
The results show an execution-time difference between the two concrete implementations and preliminary repair potential, but they do not establish general superiority of the MCP approach. Since the study covers a single application, model, and agent configuration, a limited set of mutations and repair cases, and lacks complete healer transcripts, the findings should be interpreted as an exploratory case study.