arXiv:2610.10141cs.SEOct 2026

Manuscript Offprint

arXiv:2610.10141

AdaT2^2: Adaptive Test Transformations for Black-Box Boundary Testing of Conversational Agents

Liting Lin, Boxi Yu, Qinghua Xu, Yuzhong Zhang, Lionel Briand, Emir Muñoz

LITING LIN, Lero, the Research Ireland Centre for Software, University of Limerick, Ireland

BOXI YU, Lero, the Research Ireland Centre for Software, University of Limerick, Ireland

QINGHUA XU, Lero, the Research Ireland Centre for Software, University of Limerick, Ireland

YUZHONG ZHANG, The Chinese University of Hong Kong, Shenzhen, China

LIONEL BRIAND, Lero, the Research Ireland Centre for Software, University of Limerick, Ireland and University of Ottawa, Canada

EMIR MUÑOZ, Genesys, Ireland

Conversational agents based on large language models (LLMs) must comply with policies. Each condition in a policy draws a boundary between user requests, and the agent must behave differently on the two sides of the boundary. We present AdaT², which extracts statements from the agent's replies in exploratory conversations with an LLM acting as the user, and uses the statements to guide boundary test generation. Each statement describes one condition and the behavior expected when the condition holds. Besides plain tests guided by single statements, AdaT² writes transformed tests guided by pairs of a statement and a test transformation instruction, such as “omit one required input”. Each statement describes one condition and the behavior expected when the condition holds. Besides plain tests for single statements, AdaT² writes transformed tests guided by pairs of a statement and a test transformation instruction. The instruction of a pair can move a test to the other side of the statement’s boundary or to another boundary. The statements and instructions form far more pairs than a run can try, and many of these pairs are not applicable. Adaptive pair selection therefore chooses the statement of each pair by novelty and the instruction with the bandit algorithm Bayes-UCB. Bayes-UCB learns which instructions to prefer from the outcomes of previously tried pairs: whether they yielded a test and whether the agent passed that test according to an LLM judge. Our benchmark counts the two sides of each boundary separately and distinguishes boundaries explicitly defined by the agent’s prompt, tool code, or knowledge base from boundaries that the LLM driving the agent infers from its domain knowledge. On four domains of τ³-bench, 62.7% to 83.3% of AdaT²’s tests are valid boundary tests whose expected behavior is explicitly defined. This proportion is higher in every domain than in previous AgentEval’s test suites (47.7% to 68.1%). The transformed tests contribute 13 to 46 explicitly defined boundaries that the plain tests miss. As regression tests, AdaT²’s test suites detect all eight seeded policy faults in the airline domain and four of eight in the retail domain, and AgentEval’s test suites, which have fewer than a third as many tests, detect five and two, respectively.

CCS Concepts: • Software and its engineering → Software testing and debugging.

Additional Key Words and Phrases: software testing, conversational agents, black-box testing, boundary testing, test generation, adaptive test selection

1 Introduction

Conversational agents based on large language models (LLMs) help users with tasks such as changing a booking or returning an item. They carry out these tasks by making tool calls under prompt instructions [4, 8, 52, 53]. Throughout a multi-turn conversation, such an agent must comply with its policy. The policy consists of conditions and procedures—such as eligibility limits, required confirmations, and identity checks—that are stated in the agent's prompt, in the knowledge base the agent consults, or in the code of its tools [7, 35, 52]. However, evaluations on the benchmarks τ\tau-bench [52], CRMArena-Pro [21], and SOPBench [29] show that agents often fail to comply with their policies: they behave inconsistently on repeated trials, lose accuracy over multiple turns, and

Authors' Contact Information: Liting Lin, Liting.Lin@ul.ie; Boxi Yu, boxi.yu@lero.ie; Qinghua Xu, Qinghua.Xu@ul.ie; Yuzhong Zhang, 123090848@link.cuhk.edu.cn; Lionel Briand, lionel.briand@lero.ie; Emir Muñoz, emir.munoz@gmail.com.

Lin et al.

Statement h

“The agent may raise a debit card’s ATM limit only after the user gives two of four details: date of birth, email, phone number, and address”

Supporting reply: "...your ATM withdrawal request. However, I need to first verify your identity ... please provide me with two of the following ...? Date of birth, Email address, Phone number, Address"

Instructions paired with h

k1k_{1} Omit one required input

k2k_{2} Repeat a completed request

k3k_{3} Swap source and destination

Requests to raise the daily ATM limit of the card ending in 4821

User gives two details

User gives one detail

First increase

in 24 hours

Requests described by h

Second increase

in 24 hours

Agent may raise the limit

Transformed test for (h,k1)(h, k_{1})

"I'm Liang Jinhai. Please raise the ATM limit of my card ending in 4821 to $2,000. My date of birth is April 12, 2002."

Agent must not raise the limit yet

Transformed test for (h,k2)(h, k_{2})

"Thanks. Please raise my ATM limit again."

Boundary of one increase per 24 hours

Agent must refuse

Agent must not raise the limit

Pair (h,k3)(h, k_{3}) is not applicable: a limit increase has no source or destination.

Boundary of h

Fig. 1. Combinations (pairs) of a banking statement h with three test transformation instructions k1k_1 to k3k_3. The boundary of h (solid line) and the boundary of the condition that allows only one increase in 24 hours (dashed line) divide the requests to raise the daily ATM limit of a debit card; h describes the shaded requests, where the agent may raise the limit. Speech bubbles show the requests from the user in the transformed tests for (h,k1)(h, k_1) and (h,k2)(h, k_2), that is, the tests that the generator can write when it receives h together with k1k_1 or k2k_2; the generator reports (h,k3)(h, k_3) as not applicable.

fail many tests of whether they follow prescribed procedures. Such failures may be costly, because an action taken through a tool, such as a refund or a cancellation, may not be reversible.

To detect these failures, this paper proposes a method that lets a black-box tester generate boundary tests from the agent's replies, using only the observed conversation. Boundary tests come from program testing, where domain testing and boundary value analysis place tests on and near the boundaries of a program's input domain to find errors there [14, 19]. A conversational agent's input consists of user requests, so we define an agent's boundary as a division of these requests into two groups, its sides, that the agent must handle differently. The conditions of the agent's policy define such boundaries: requests that satisfy a condition lie on one side, and requests that violate it lie on the other. For example, the banking agent policy in τ3\tau^{3}-bench [45], a benchmark for conversational agents, allows the agent to change the user's account only after the user correctly provides two of four details: date of birth, email, phone number, and address. If a user asks the agent to raise the daily ATM limit on a debit card and provides the date of birth and phone number, the request belongs to the side where the agent may raise the limit. If the user provides only the date of birth, the request belongs to the side where the agent must not raise the limit until the user provides a second detail; an agent that raises the limit in this case fails to comply with the condition (Figure 1, right). In a boundary test, the tester sends the agent a request from one side of a boundary and checks whether the agent exhibits the behavior expected on that side; thus, boundary tests directly assess whether the agent complies with the specified conditions.

The closest prior work, AgentEval [30], explores a black-box agent through conversations in a phase called discovery and then generates tests from the resulting records, the discovery traces. For boundary testing, it mines a workflow graph from these traces and prompts an LLM (the generator) to write tests that target the graph's nodes and edges by perturbing user messages. AgentEval's ablation analysis shows that using nodes and edges as explicit targets yields tests that cover more distinct boundaries than prompting an LLM with the traces alone. This idea of providing explicit targets inspired our work. However, our analysis of AgentEval's workflow graph and generated tests reveals three problems. First, each node merges agent replies that reflect the same kind of activity (e.g., processing an exchange), and each edge merges the user messages that move the conversation from one activity to the next. As a result, a single node or edge may contain several boundaries, so the generator must infer which boundary to test and what behavior to expect. Because the graph does not specify expected behavior, the generator supplies it. Many of AgentEval's tests therefore expect behaviors not supported by the agent's artifacts: its prompt, tool code, and (if present) the knowledge base it consults. In our evaluation, 22.0% to 36.0% of AgentEval's tests expect behavior that follows only from the domain knowledge of the LLM driving the agent. In most of these cases, the expected behavior is a general conversational heuristic (e.g., asking for a missing value) that the artifacts do not define. Second, the size of the graph limits the number of targets. Third, AgentEval selects all targets before executing any test, so outcomes of earlier tests cannot guide the choice of later targets.

Our method, AdaT 2^{2} (Adaptive Test Transformations), keeps the idea of giving the generator explicit targets but replaces AgentEval's nodes and edges with statements: natural-language hypotheses that describe a single policy condition and the behavior expected of the agent when that condition holds. With a statement as its target, the generator is given the expected behavior directly, rather than having to infer it. An LLM extracts statements from the agent's replies in the discovery traces and stores each statement together with its supporting reply as evidence. Extraction is possible because agents often explicitly state the conditions they apply, for example, when explaining why they refuse a request.

AdaT 2^{2} generates statement-guided tests, for which the generator receives a statement as its target, in two forms. For a plain test, the generator receives the statement alone and writes a test for the side of the boundary that the statement describes. For a transformed test, the generator also receives a test transformation instruction, or simply instruction, such as an instruction to change a value in a user request, the wording of the request, or the state of the conversation. The instruction transforms the test that the generator would write for the statement alone and can thereby move it to the other side of the statement's boundary or to a boundary that the statement does not describe. Figure 1 shows both cases for a banking-agent statement.

However, exhaustively exploring all possible combinations of statements and instructions (pairs) is infeasible. In one of our experiments, for example, 126 statements and 91 instructions form 11,466 pairs, but one run of test generation may try only 400 of them. Moreover, many pairs are not applicable: their instruction changes nothing in a test of their statement (as in the pair (h,k3)(h, k_3) in Figure 1), and the generator reports them as such. To choose pairs under these constraints, we introduce adaptive pair selection, in which a selector chooses first the statement and then the instruction of each pair. The selector chooses the statement by novelty order, which prefers the statements least similar to those that already have a transformed test. It chooses the instruction for this statement with the bandit algorithm Bayes-UCB [23], treating the instructions as the arms of a multi-armed bandit problem [25, 26]. The selector learns which instructions to choose from two signals that become known only after a pair is tried: whether the generator writes a transformed test (whether the pair is applicable), and the verdict of an LLM judge on the executed test (pass, fail, or inconclusive).

To measure AdaT 2^{2}'s effectiveness, we built a benchmark for boundary tests. A boundary can come from two sources: it can be defined by the agent's artifacts, or it can be inferred by the LLM that drives the agent from domain knowledge. For example, an airline booking agent may refuse to book a flight for a past date based on domain knowledge, even when the agent's policy does not include this condition. We call a boundary explicit when it is defined by the artifacts.

In our benchmark, an LLM auditor reads the artifacts—which the tester cannot see—and labels each test. A test is valid if the facts it assumes hold in the initial state of the agent’s database, its

Lin et al.

messages lead the conversation to the situation it checks, and every behavior it expects of the agent follows from the artifacts or is necessarily implied by domain knowledge. A valid test that covers at least one boundary is a valid boundary test. It is explicitly valid if every expected behavior follows from the artifacts. The auditor counts the distinct explicit boundaries covered by the valid boundary tests, counting the two sides of each boundary separately.

We evaluate AdaT 2^{2} on four domains of τ3\tau^{3}-bench and compare it with AgentEval, which generates tests from the same discovery traces using the same generator model. Across the four domains, 74.3% to 88.3% of AdaT 2^{2}'s tests are valid boundary tests, and 62.7% to 83.3% are explicitly valid. The transformed tests add 13 to 46 explicit boundaries beyond those covered by the plain tests. In every domain, AdaT 2^{2} produces a higher proportion of explicitly valid tests than AgentEval, and its test suite covers at least as many explicit boundaries and more sides. As regression tests, AdaT 2^{2}'s test suites detect all eight seeded faults in the airline domain and four of eight in the retail domain, whereas AgentEval's test suites detect five and two, respectively.

This paper makes three contributions.

(1) Statements and test transformation instructions. We introduce statements to guide test generation. Each statement is extracted from the discovery traces and gives the generator the behavior expected of the agent under a condition. We also introduce test transformation instructions that transform a statement's test so it can cover the other side of the statement's boundary or another boundary (Sections 3.2 and 3.3).

(2) Adaptive pair selection. We propose a method that adaptively selects statement–instruction pairs. It selects each pair’s statement by novelty and its instruction using the multi-armed bandit algorithm Bayes-UCB. Its feedback consists of two signals that a black-box tester observes: whether the pair is applicable and the judge’s verdict on the transformed test (Section 3.4).

(3) A benchmark for boundary tests. We design a benchmark for boundary tests that distinguishes the two sides of each boundary and separates boundaries defined by the agent’s artifacts from those inferred by the LLM from domain knowledge (Section 4.3).

References (32)