TycheTyche (pronounced /ˈtaɪki/) is a tool that helps developers to understand the effectiveness of their property-based tests. It works with PBT frameworks like Python's Hypothesis, Haskell's QuickCheck, Java's JQF, and Coq's QuickChick, and it is easy to implement in your framework of choice if it is not currently supported. Tyche is available as an extension for Visual Studio Code, but it can also be accessed in the browser. Tyche is described in detail in a paper that is appearing at UIST'24. MotivationCurrent property-based testing frameworks give insufficient feedback about the specific values that were used to test a given program and about the distributional trends in those values. In the worst case, this lack of visibility process may give users false confidence, encouraging them to believe their testing was thorough when, in fact, it had critical gaps. Tyche provides an interactive interface for understanding testing effectiveness, surfacing both "pre-testing" information about test inputs and their distributions and "post-testing" information like code coverage. Using TycheIn HypothesisTyche is supported natively in Hypothesis via its Observability
API. Simply run a Hypothesis test
with the You can add features to your Tyche visualization using Hypothesis's
In QuickCheckWe have an experimental library that adds limited support for Tyche to QuickCheck. As of now it needs to be installed via GitHub and it is not very fully featured, but we hope to make this support more robust over time. ElsewhereYou can implement support for Tyche in any PBT framework by having each property output data in a
specific JSON lines format. The Hypothesis
documentation has more information
about the details of the format. Once you have valid JSON lines files, simply run Please contact Harry Goldstein if you need help. If you implement Tyche support for a PBT framework, please let us know so we can provide pointers to the appropriate documentation from here. DevelopingProject StructureThis project is two nested NPM projects. The outer project is the source for the whole extension.
The inner project, in the Running in Debug ModeWhen working on the webview itself, run:
This will allow you to connect to the webview itself via a browser and iterate quickly. When working on the extension as a whole, run:
Then press |