You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projects

๐Ÿ“… 2024-12-13
๐Ÿ›๏ธ arXiv.org
๐Ÿ“ˆ Citations: 6
โœจ Influential: 1
๐Ÿ“„ PDF
๐Ÿค– AI Summary
To address the challenges of automated test execution across projects, programming languages, build systems, and testing frameworks, this paper proposes ExecutionAgentโ€”a large language model (LLM)-based autonomous agent. It employs a meta-prompt-driven system interaction paradigm to parse source code, perform environment-aware configuration, and autonomously generate test scripts for arbitrary open-source projects, supporting feedback-guided iterative debugging. Its novel zero-shot adaptation mechanism requires no predefined rules or human intervention, ensuring compatibility with 14 programming languages and mainstream ecosystems. Evaluated on 50 heterogeneous projects, ExecutionAgent successfully executed 33 test suites with only 7.5% result deviation from ground truth, achieving 6.6ร— higher performance than state-of-the-art methods. The average per-project execution time is 74 minutes, with an LLM inference cost of just $0.16.

Technology Category

Multiagent Systems: Agent CommunicationNatural Language Processing: Code Generation / Program Synthesis from Natural LanguageCognitive Modeling & Cognitive Systems: Agent Architectures

Application Category

Economics, Online Markets and Human Computation: Cost models of using LLMs in production systemsSearch and Retrieval-Augmented AI: Agentic searchSemantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactions
๐Ÿ“ Abstract
The ability to execute the test suite of a project is essential in many scenarios, e.g., to assess code quality and code coverage, to validate code changes made by developers or automated tools, and to ensure compatibility with dependencies. Despite its importance, executing the test suite of a project can be challenging in practice because different projects use different programming languages, software ecosystems, build systems, testing frameworks, and other tools. These challenges make it difficult to create a reliable, universal test execution method that works across different projects. This paper presents ExecutionAgent, an automated technique that prepares scripts for building an arbitrary project from source code and running its test cases. Inspired by the way a human developer would address this task, our approach is a large language model (LLM)-based agent that autonomously executes commands and interacts with the host system. The agent uses meta-prompting to gather guidelines on the latest technologies related to the given project, and it iteratively refines its process based on feedback from the previous steps. Our evaluation applies ExecutionAgent to 50 open-source projects that use 14 different programming languages and many different build and testing tools. The approach successfully executes the test suites of 33/50 projects, while matching the test results of ground truth test suite executions with a deviation of only 7.5%. These results improve over the best previously available technique by 6.6x. The costs imposed by the approach are reasonable, with an execution time of 74 minutes and LLM costs of USD 0.16, on average per project. We envision ExecutionAgent to serve as a valuable tool for developers, automated programming tools, and researchers that need to execute tests across a wide variety of projects.
Problem

Research questions and friction points this paper is trying to address.

Executing test suites across diverse projects is challenging due to varying technologies.
Creating a universal test execution method for different projects is difficult.
Automated test execution needs to handle multiple languages and tools reliably.
Innovation

Methods, ideas, or system contributions that make the work stand out.

LLM-based agent autonomously executes test commands
Meta-prompting gathers latest technology guidelines
Iterative refinement based on previous step feedback
๐Ÿ”Ž Similar Papers
No similar papers found.
๐Ÿ’ผ Related Jobs
No related jobs found.
University of Stuttgart