Model-Based Testing of Networked Applications

Yishuai Li, Benjamin C. Pierce, Steve Zdancewic
1/31/2021
cs.SEcs.PL

Official code: liyishuai/coq-http (19 stars, Rocq Prover, MPL-2.0, last commit 2026-02-22).

Abstract

We present a principled automatic testing framework for application-layer protocols. The key innovation is a domain-specific embedded language for writing nondeterministic models of the behavior of networked servers.

Show full abstract

These models are defined within the Coq interactive theorem prover, supporting a smooth transition from testing to formal verification. Given a server model, we show how to automatically derive a tester that probes the server for unexpected behaviors. We address the uncertainties caused by both the server's internal choices and the network delaying messages nondeterministically. The derived tester accepts server implementations whose possible behaviors are a subset of those allowed by the nondeterministic model. We demonstrate the effectiveness of this framework by using it to specify and test a fragment of the HTTP/1.1 protocol, showing that the automatically derived tester can capture RFC violations in buggy server implementations, including the latest versions of Apache and Nginx.

View on arXivView PDF

Code Implementations(1)

liyishuai/coq-httpOfficial100%
MPL-2.0

HTTP specification in Coq, testable and verifiable

192Rocq Prover, MakefileMay 20, 20209 months agoMPL-2.0

Similar Papers

Cite this paper

@article{li2021modelbased,
  title  = {Model-Based Testing of Networked Applications},
  author = {Yishuai Li and Benjamin C. Pierce and Steve Zdancewic},
  year   = {2021},
  eprint = {2102.00378},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.00378}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.00378.svg)](https://codeofpaper.com/paper/2102.00378)

Discussion