Search papers, labs, and topics across Lattice.
This paper introduces APIPilot, an execution-validated framework for testing REST APIs that enhances the reliability of dependency inference by integrating concrete API executions. By deriving candidate dependencies from OpenAPI specifications and validating them through actual execution, APIPilot constructs coverage-aware workflows that significantly improve test generation. Empirical results show that APIPilot achieves 92.3% operation coverage and detects numerous failures, outperforming existing LLM-based and traditional testing methods.
Execution validation of LLM-inferred dependencies boosts REST API testing success rates to 88.1%, revealing critical failures that traditional methods miss.
Testing RESTful APIs requires generating sequences of API calls that satisfy dependencies among operations, parameters, and runtime-created resources. Recent LLM-based approaches infer such dependencies and generate test sequences from OpenAPI specifications, but they often treat LLM-inferred relationships as correct without execution-based validation. This can introduce spurious dependencies, miss feasible operation chains, and produce infeasible tests. In this paper, we propose APIPilot}, an execution-validated framework for REST API testing. APIPilot first derives candidate producer-consumer dependencies from OpenAPI specifications using structural heuristics and LLM-based semantic reasoning. It then treats these dependencies as hypotheses and validates them through concrete API executions before using them for test generation. The validated dependencies are organized into a dependency graph from which APIPilot constructs coverage-aware workflows via bounded top-k graph traversal, separating semantic dependency inference from sequence construction. To improve subsequent tests, APIPilot further performs response-driven refinement: runtime responses are analyzed to update resource pools, adjust input-generation constraints, and prune or revise invalid dependency mappings. Empirical evaluation on 16 real-world REST API services shows that APIPilot achieves 92.3% operation coverage, up to 58.6% code coverage, and an 88.1% workflow execution success rate, outperforming both LLM-based and traditional REST API testing baselines. APIPilot also detects 197 unique 5xx failures and specification-execution mismatches, demonstrating the benefit of grounding dependency inference in execution feedback.