Mining Service Behavior for Stateful Service Emulation
Md Arafat Hossain, Jun Han, Muhammad Ashad Kabir, Steve Versteeg, Jean-Guy Schneider, Jiaojiao Jiang
TL;DR
This work tackles accurate testing of enterprise systems by modeling stateful service behavior from interaction traces to produce realistic virtual services. It introduces a message dependency model and a two-track dependency separation (key payload vs non-key) combined with PTA/kTail-based inference to capture stateful interactions, and a payload-population mechanism guided by message formats and equality rules for runtime responses. Across LDAP, SOAP, and REST datasets, the method achieves higher identical and data-consistent responses than strong baselines while avoiding malformed outputs, demonstrating practical gains in accuracy and efficiency. The approach offers significant implications for scalable, realistic service virtualization, with future work focusing on automatic key-payload discovery, richer payload dynamics, and asynchronous protocol handling.
Abstract
Enterprise software systems are increasingly integrating with diverse services to meet expanding business demands. Testing these highly interconnected systems presents a challenge due to the need for access to the connected services. Service virtualization has emerged as a widely used technique to derive service models from recorded interactions, for service response generation during system testing. Various methods have been proposed to emulate actual service behavior based on these interactions, but most fail to account for the service's state, which reduces the accuracy of service emulation and the realism of the testing environment, especially when dealing with stateful services. This paper proposes an approach to deriving service models from service interactions, which enhance the accuracy of response generation by considering service state. This is achieved by uncovering contextual dependencies among interaction messages and analyzing the relationships between message data values. The approach is evaluated using interaction traces collected from both stateful and stateless services, and the results reveal notable enhancements in accuracy and efficiency over existing approaches in service response generation.
