Design and implementation of traffic recording playback test tool
Fangxu Guo, Wei Wei · 2023
As software products become increasingly complex and product iteration speeds up, there is an urgent need for a more efficient testing method to ensure software quality. Traffic recording playback provides a new interface automation testing method. Based on the traffic recording and playback strategy, we propose a scheme which uses data capture to conduct traffic recording and utilizes firewall user agent (iptables) technology and socket technology to implement Mock. For result verification, we design a comparison result algorithm based on the Diff idea to make the playback verification result more accurate. Compared with some other solutions (GoReplay, Jvm-Sandbox-Repeater, ngx_http_mirror_module, etc.), this solution can support multiple protocols and regression testing without intruding into the application under test. After a large number of tests, the success rate has reached over 96%, the efficiency of interface regression test has increased by 66.7%, and the efficiency of overall test has increased by 40%.