Property Based Testing in Rust, How is it Used?

A case study of the ‘quickcheck‘ crate used in open source repositories

Bachelor Thesis (2025)
Author(s)

M. Derbenwick (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Contributor(s)

S. Juhošová – Mentor (TU Delft - Programming Languages)

M.A. Costea – Mentor (TU Delft - Programming Languages)

Marco Zúñiga Zuñiga Zamalloa – Graduation committee member (TU Delft - Networked Systems)

Faculty
Electrical Engineering, Mathematics and Computer Science
More Info
expand_more
Publication Year
2025
Language
English
Graduation Date
27-06-2025
Awarding Institution
Delft University of Technology
Project
CSE3000 Research Project
Programme
Computer Science and Engineering
Faculty
Electrical Engineering, Mathematics and Computer Science
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Property-based testing (PBT) is a method of verifying software correctness in which a property, a statement about the behavior of the program which should always hold true, is verified with a large number of arbitrary inputs. While it is a powerful method, properties can be complex and fail on obscure inputs, making them difficult to reason about. We qualitatively analyze a large number of property-based tests (PBTs) written with Quickcheck for Rust from public repositories, in order to gather insights about how PBT is utilized in practice. We find that the majority of analyzed PBTs verify by comparing against a known correct implementation, composing inverse operations to form an identity, or asserting a desired contract about a system's state. These findings offer valuable direction to the development of PBT, aiming to tailor PBT frameworks to developer needs and make them more natural to work with.

Files

Research_Paper.pdf
(pdf | 0.225 Mb)
License info not available