arXiv Science⌕ Search

arXiv subjects

Kennett Puerto

Publications and source records attributed to Kennett Puerto.

1 recordsLinked to original sources

MockMaster: How to Automock Your Friends and Services

Modern cloud applications are built from independent components that communicate over APIs. Testing these applications is challenging because their components may be difficult to deploy, be owned by other teams, or have test-disrupting side-effects. Developers therefore turn to mocks to simulate such components. Manually written mocks are, however, brittle, costly to maintain, prone to errors, and typically cover only a small fraction of possible behaviors; relying on them confronts developers with the testing version of the infamous regular-expression adage: "I had a testing problem, so I wrote a mock. Now I have two problems." We present MockMaster, a system that automatically generates mocks for cloud APIs and service-based applications from their API specifications. MockMaster combines LLM agents with symbolic techniques, eliminating the need for developers to implement mocks by hand. MockMaster can repeatedly execute a test while varying mock behavior, including failures and edge cases. Across 10 RESTful service benchmarks comprising 65kloc, MockMaster achieves industry standard code coverage of excellent/acceptable for 9 of the 10, discovers a total of 119 distinct 500 errors, and eliminates flaky tests, all while costing less than $0.20 per service.

cs.SE↗